[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-libc-dev] [bug #13226] ERROR of PRINTF_LIB_FLOAT of WinAVR-2005
From: |
Dmitry K. |
Subject: |
Re: [avr-libc-dev] [bug #13226] ERROR of PRINTF_LIB_FLOAT of WinAVR-20050214. |
Date: |
Tue, 31 May 2005 08:47:34 +1100 |
User-agent: |
KMail/1.5 |
On Monday 30 May 2005 19:38, anonymous wrote:
> subject: ERROR of PRINTF_LIB_FLOAT of WinAVR-20050214.
>
> Good moring,
>
> I have met a problem about "PRINTF_LIB_FLOAT". In the
> endless loop, it will occur a problem. After running a
> few minutes, the sentence of "printf("%5.1f
> %9.2f\n",fahrenheit, (5.0/9.0) * (fahrenheit - 32.0))
> " will display wrong characters. How to resolve it?
...
> for(;;){
>
> fdevopen(uart_putchar, NULL, 0);
> printf("Fahrenheit celsius\n");
> printf("╩╙йо иЦйо\n"); // could not
> display the chinese charaters(GB2312) 2004/08/10
>
> for(fahrenheit = lower; fahrenheit <= upper;
> fahrenheit = fahrenheit + step ){
> printf("%5.1f %9.2f\n",fahrenheit, (5.0/9.0)
> * (fahrenheit - 32.0));
> }
> }
>
> return(0);
> }
...
`fdevopen' reduce heap at each loop (`for (;;)').
Regards.
P.S. Yor accept computer may lost synchronization in discontinues
flow of bytes.