- 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.
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.
Changed those values to be prevent compiling issues with PlatformIO and also as it is good practice not to use names which easily could collide with other libs.
Also removed a duplicate line from keywords.txt
- copied fdrs_functions.h to the root dir.
- removed all local occurances of fdrs_sensor.h and included the global <fdrs_sensor.h> instead.
- removed all local occurances of fdrs_functions.h and included the global <fdrs_functions.h> instead.
- made inclusion of fdrs_globals.h the default instead of using the llocal definitions in the file everywhere were FDRS_xxx is defined correctly.
- Fixed the faulty calls to functions where the local defines instead of the FDRS_xxx defines were used, e.G. BAND instead of FDRS_BAND
- For easier debugging I added some variation to the sensor sketches: Humidity values are randomly choosen between 0-100. For ease of view I made the first digit of the temperature values match the Reading_ID