philbowles / h4plugins

Adds GPIO handling, WiFi, MQTT, Webserver to H4 timer/scheduler. Multi-Platform plugins adding everything needed to create your own multi-function IOT firmware.
45 stars 17 forks source link

Can't compile H4FC_flashLED example #17

Closed julianrendell closed 3 years ago

julianrendell commented 3 years ago

I'm using macOS Big Sur + github version of esp8266 core (required for a fix to pyserial...) and latest Arduino.

Trying to compile what I think is a simpler example- h4fc_flashLED.

It fails with the error:

In file included from /Users/julian/Documents/Arduino/hardware/esp8266com/esp8266/tools/sdk/lwip2/include/lwipopts.h:3635,
                 from /Users/julian/Documents/Arduino/hardware/esp8266com/esp8266/tools/sdk/lwip2/include/lwip/opt.h:51,
                 from /Users/julian/Documents/Arduino/hardware/esp8266com/esp8266/tools/sdk/lwip2/include/lwip/init.h:40,
                 from /Users/julian/Documents/Arduino/hardware/esp8266com/esp8266/cores/esp8266/IPAddress.h:27,
                 from /Users/julian/Documents/Arduino/hardware/esp8266com/esp8266/libraries/ESP8266WiFi/src/ESP8266WiFi.h:31,
                 from /Users/julian/Documents/Arduino/libraries/h4plugins-1.0.1/src/H4P_WiFi.h:35,
                 from /Users/julian/Documents/Arduino/libraries/h4plugins-1.0.1/src/H4Plugins.h:20,
                 from /Users/julian/Documents/Arduino/libraries/h4plugins-1.0.1/examples/FLASHER/H4FC_flashLED/H4FC_flashLED.ino:1:
/Users/julian/Documents/Arduino/libraries/h4plugins-1.0.1/src/H4P_Timekeeper.h: At global scope:
/Users/julian/Documents/Arduino/libraries/h4plugins-1.0.1/src/H4P_Timekeeper.h:87:23: error: expected unqualified-id before numeric constant
   87 |         static  int   DST_USA(uint32_t t);  // DST offset for t in USA.
      |                       ^~~~~~~

I'm not sure if I have a broken environment (though ESP8266 examples for other libraries are working), or have mangled the installation of H4Plugins, or ...

Thanks in advance for any suggestions!

julianrendell commented 3 years ago

Ok- fixed it by using the current esp8266 core v2.7.4 and patching it with the instructions found here (https://www.esp8266.com/viewtopic.php?p=89446). Previous fixes I'd found didn't work. So it seems there are breaking changes in the esp8266 core coming.