Hallo zusammen,
folgendes Problemchen:
--------------------------------------
uint16_t a,b,c,d;
a = 334 * (ReadChannel(0) / 10);
b = 334 * (ReadChannel(1) / 10);
c = 338 * (ReadChannel(2) / 10);
d = 366 * (ReadChannel(3) / 10);
sprintf (TX1Telegramm, "\n[V] %8.3f %8.3f %8.3f %8.3f \n", a, b, c, d);
------------------------------------------
../rain-27.c:746: warning: format '%8.3f' expects type 'double', but
argument 3 has type 'uint16_t'
../rain-27.c:746: warning: format '%8.3f' expects type 'double', but
argument 4 has type 'uint16_t'
../rain-27.c:746: warning: format '%8.3f' expects type 'double', but
argument 5 has type 'uint16_t'
../rain-27.c:746: warning: format '%8.3f' expects type 'double', but
argument 6 has type 'uint16_t'
-----------------------------------------
Ist schon klar, dass uint16_t nicht mit FLOAT harmoniert - aber mein
Problem ist das DOUBLE:
Auch wenn ich a,b,c,d als FLOAT vereinbart habe (und natürlich auch über
ein CAST die Zuweisung von ReadChannel auf FLOAT mache, quatscht AVR
immer noch von einem DOUBLE Konflikt beim Format, obwohl ich doch
wirklich nur mit FLOAT agiere.
Es kommen übrigends Fragezeichen im Output. Kann es sein, dass die
printf FLOAT Libs nicht gefunden wurden und daher diese blödsinnige
DOUBLE Warnung kommt ?
Vielen Dank im voraus.