avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] printf_P question


From: Dmitry K.
Subject: Re: [avr-gcc-list] printf_P question
Date: Fri, 3 Jun 2005 16:07:57 +1100
User-agent: KMail/1.5

On Friday 03 June 2005 15:39, wbounce wrote:
> I am getting missing data on 2 printf that I can not figure out.
...
> volatile int16_t TargetBearing,SlowBearing, CurrentBearing;
> const char gcOutputStatus[] PROGMEM = "Long %10.6f Lat %9.6f H %6.2f Kn
> %6.2f CB %5.1f TB %5.1f V %c\r\n";
>
> //printf
> printf_P(gcOutputStatus,gnLongDegree, gnLatDegree, gntrackgood,
> gngroundspeedknots, CurrentBearing, TargetBearing,(char) gnValidData);
> .. Output
> Long  75.217300 Lat 40.166611 H 263.10 Kn   0.70 CB   0.0 TB  48.5 V
> CB is 0.0 even if I set CurrentBearing = TargetBearing
> And V is either empty or some weird character when it should be either V
> or A.

Use `cast' operator for noninteger values.

Regards.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]