Hi
I recently updated the boards package to the lastest version and noticed an issue with dtostrf. It shows a number after the decimal point even when I set it to 0, to not show it.
I tracked the problem and it started with version 2020.11.9 where my skecth is unable to compile with this error:
C:\Users\root\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2020.11.9\cores\maple\avr\dtostrf.c:34:3: error: unknown type name 'uint8_t'
uint8_t negative = 0;
With version 2020.11.14 and later the sketch is able to compile but it shows the mentioned problem. And with version 2020.11.2 it works as expected.
For example, with version 2020.11.2 and before it behaves this way:
dtostrf(Temperature,3,0,text);
The output is "100" , which is fine and expected.
But with version 2020.11.14 and later it behaves this way:
dtostrf(Temperature,3,0,text);
The output is "100.0" , the same output it gives if I use dtostrf(Temperature,3,1,text);
So I'm unable to disable the decimal number.
I'm using a blue pill and Arduino IDE 1.8.13
Hi
I recently updated the boards package to the lastest version and noticed an issue with dtostrf. It shows a number after the decimal point even when I set it to 0, to not show it.
I tracked the problem and it started with version 2020.11.9 where my skecth is unable to compile with this error:
C:\Users\root\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2020.11.9\cores\maple\avr\dtostrf.c:34:3: error: unknown type name 'uint8_t'
uint8_t negative = 0;
With version 2020.11.14 and later the sketch is able to compile but it shows the mentioned problem. And with version 2020.11.2 it works as expected.
For example, with version 2020.11.2 and before it behaves this way:
dtostrf(Temperature,3,0,text);
The output is "100" , which is fine and expected.
But with version 2020.11.14 and later it behaves this way:
dtostrf(Temperature,3,0,text);
The output is "100.0" , the same output it gives if I use dtostrf(Temperature,3,1,text);
So I'm unable to disable the decimal number.
I'm using a blue pill and Arduino IDE 1.8.13