Avoid float-double-conversion by dirkmueller · Pull Request #7559 · esp8266/Arduino (original) (raw)
so there are examples that use the code, but they're not run in the ci checks. no idea why :-(
Here's what I did to reproduce:
add a (nonsensical) usage:
--- a/libraries/esp8266/examples/TestEspApi/TestEspApi.ino +++ b/libraries/esp8266/examples/TestEspApi/TestEspApi.ino @@ -242,6 +242,7 @@ void setup() { // messages are also readable.
Serial.begin(74880);
Serial.parseFloat();
// Try pushing frequency to 160MHz. system_update_cpu_freq(SYS_CPU_160MHZ);
then build it:
$ pio ci ./libraries/esp8266/examples/TestEspApi --board nodemcuv2 ... RAM: [=== ] 33.9% (used 27752 bytes from 81920 bytes) Flash: [=== ] 25.5% (used 265836 bytes from 1044464 bytes) .pio/build/nodemcuv2/firmware.elf : section size addr .data 1248 1073643520 .noinit 4 1073644768 .text 232 1074790400 .irom0.text 236132 1075843088 .text1 26656 1074790632 .rodata 1568 1073644784 .bss 24936 1073646352 .comment 5065 0
then I applied the patch to ~/.platformio/packages/framework-arduinoespressif8266/cores/esp8266/Stream.cpp
and built again:
$ pio ci ./libraries/esp8266/examples/TestEspApi --board nodemcuv2 ... RAM: [=== ] 33.9% (used 27752 bytes from 81920 bytes) Flash: [=== ] 25.4% (used 265804 bytes from 1044464 bytes) .pio/build/nodemcuv2/firmware.elf : section size addr .data 1248 1073643520 .noinit 4 1073644768 .text 232 1074790400 .irom0.text 236100 1075843088 .text1 26656 1074790632 .rodata 1568 1073644784 .bss 24936 1073646352