Applied patch #88 from @Aviateur17. This fixes the compile issues for sensor sketches. Gateway sketches still do not compile. Will check if this can be just applied the same way as the fix for the sensors.
After the local and global settings have been checked, the corresponding FDRS_xxx must be used. Changed this as not doing so leads to compile errors if the local setting is not set but the global one.
- moved configuration checkup to external file to make sensor and gateway files smaller.
- for sensors the config now only is shown if the sensor does NOT return from Deep Sleep. For example when pressing the reset button or after a crash.
- for gateways the configuration is shown once and also can be forced to be shown with a reset. Code should work for ESP32 and ESP8266 - have only tested it with ESP32.
- fixed issue in fdrs_functions.h - if MQTT_AUTH was enabled but WIFI disabled, the compile crashed.
Not immediately useful, but it is interesting to know how low an FDRS ping is (in ms). I won't ruin the surprise, but it's pretty low.
More importantly however, I laid out how SystemPackets will work. I might rename those.
Further work on #71 :
- Added config code to fdrs_functions.h.
- Commented all local config settings -> global config settings will be taken by default.
- added a debugConfig function, to check from where settings have been taken. May be moved to a place where sensors and gateways can share code as this is needed only once. For the sake of simplicity the function made it into fdrs_sensor.h and fdrs_functions.h Needs to be refined, as there is redundancy right now.