- 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.
Fixed the configuration system for sensor nodes. Gateway nodes are still to be fixed (work still in process :) )
This has been addressed in #71
Important: For this system to work and make the onboarding easier for new users, global settings must be used by default and therefore local settings must be commented out by default.
Extra tokens at end of #endif directive are not allowed. Arudino IDE does not care but Platform IO does. The specification forbids is as well, so adding a comment behind the endif is a good compromise between overview and conformity.
Just two small additions making debugging a little bit more convenient:
- Added value of data to FDRSBase::load
- Added additional text tp FDRSLoRa::init
I find it very convenient for testing to have altering values within the sensor sketches, as it is easier to see if new values are arriving. Therefore replaced the fixed humidity value to a random value between 0-100.
Added the example sketch.
At the moment this resides in a separate folder but after the Universal_Gateway has been finished this could be moved into the Full_System_Example or a generic Gateway_Examples folder.
Put FDRS_DEBUG to top
Some formatting and further explanations on the settings.
Uncommented local LoRa settings, so by default the global fdrs settings are taken.
This makes the setup process easier and less error-prone.
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