Gast
#2438633
Liebe Leute, ich bin wieder mal ratlos! Im AVR-Studio 4 mag sprintf wieder mal nicht richtig: // hier das relevante Codeschnipsel:------------------------- char str16 [17], command [33]; double hispeeddelay; else if(strncmp(command,"#HID=",5) == 0) { memcpy(str16,&command[ 5],strlen(command)-5); // command ist z.B. "#HID=123.4" str16[strlen(command)-5] = 0; // str16 ist z.B. "123.4" hispeeddelay = atof(str16); //ob das funktioniert, weiss ich nicht if (BT_CONNECTED ) { uart_puts ( "str16=" ); uart_putl ( str16 ); sprintf ( command,"##: %6.1f us", hispeeddelay); //ergibt "## ? us" uart_putl(command); } } //----------------------------------------------------------- Warum gibt das sprintf "## ? us" aus?? Vielen Dank für jede Hilfe! Thomas





