Hallo,
Ich habe ein kleines Problem mit Variablen Ausgabe aufs Display
Es kommt beim Aufruf von LCD_puts(150,170,speed,WHITE,RED);
der Fehler:
error: #167: argument of type "u8" is incompatible with parameter of
type "u8 *"
Vielleicht könnt mir einer helfen.
mfg
>error: #167: argument of type "u8" is incompatible with parameter of>type "u8 *"
speed ist kein String sondern eine Zahl.
Mach aus speed einen String und übergib den.
Hiermit bekomme ich den gleichen Fehler wie zuvor
[C]
u8 speed = 155;
u8 speedchan[400];
u8 u8 speedchan[speed];
//Aufruf
LCD_puts(150,170,speedchan[speed],WHITE,RED);
[7C]
>> error: #167: argument of type "u8" is incompatible with parameter of>> type "u8 *"> speed ist kein String sondern eine Zahl.> Mach aus speed einen String und übergib den.
u8 speed = 155; --> u8 *speed ="155";
So jetz Gehts.
Aber ich bekomm bei sprintf( speedshowBuffer, "%3d ", speedchan[speed]
);
folgende Warnung:
warning: #167-D: argument of type "u8 *" is incompatible with parameter
of type "char *restrict"
karl heinz schrieb:> warning: #167-D: argument of type "u8 *" is incompatible with parameter> of type "char *restrict"
Dem Compiler gefällt
> u8 speedshowBuffer[50];
nicht,also einfach char speedshowBuffer[50], dann sollte er Ruhe geben.