0
Ich arbeite an Stm32f4xx, keil Version 5-ProgrammPrintf Verschiebungsfehler
Ich möchte printf-Funktion verwenden, um mit "A: float1 float2" -Format.
I want to float2 have to start 11.column.
When float1=225.4 and float2=245.1:
A:225.4V 45.1A
When float1=0 and float2=0
A:0.0V 0.0A
Meine Codes-1:
char EA1[10]
char EA2[10]
CHAR line[20]
sprintf(EA1," ");
sprintf(EA1,"A:%3.1fV",float1);
sprintf(EA2,"%3.1fA ",float2);
LCD_Set_Cursor(1,1)
printf(%s %s,EA1,EA2);
Meine Codes-2:
LCD_Set_Cursor(1,1);
printf("A:%3.1fV ",float1);
LCD_Set_Cursor(11,1);
printf("%3.1fA ",float2);
Ausgabe von myCodes-1 float2 mit 8 beginnen, wenn float1 = 0 und float2 = 0
Ausgabe von Mycodes-2 float2 funktioniert nicht, was ich will. manchmal float2 starten 9.column manchmal 11.column
Wahrscheinlich brauche ich einen großen Kaffee, aber es ist total unklar. Völlig raten: Sind Sie sicher, dass Ihr 'printf''% f' Formatbezeichner unterstützt? – LPs
ich nicht einmal was "Y Shift links und rechts und gemischt Bildschirm" ... – usr2564301
Bitte gewünschten Ausgang * klar * (Beispiel zeigen, was Sie wollen) –