Go to the source code of this file.
Data Structures | |
struct | Settings |
struct | Settings::HempyModuleSettings |
< Hempy default settings More... | |
struct | Settings::HempyBucketSettings |
< HempyBucket default settings More... | |
struct | Settings::SoundSettings |
< Sound default settings More... | |
struct | Settings::WaterPumpSettings |
< WaterPump default settings More... | |
struct | Settings::WeightSensorSettings |
< WeightSensor default settings More... | |
Functions | |
void | saveSettings (Settings *ToSave) |
Store settings in EEPROM - Only updates changed bits. | |
Settings * | loadSettings (bool ResetEEPROM=false) |
Load settings from EEPROM. | |
void | restoreDefaults () |
Load sketch default settings into EEPROM. | |
Variables | |
constexpr uint8_t | Version = 16 |
Default Settings for each component within the module. Loaded when the Arduino starts. | |
constexpr uint8_t | MaxWordLength = 32 |
Default char * buffer length for storing a word + null terminator. Memory intense! | |
constexpr uint8_t | MaxShotTextLength = 64 |
Default char * buffer length for storing mutiple words. Memory intense! | |
constexpr uint16_t | MaxLongTextLength = 168 |
Default char * buffer length for storing a long text. Memory intense! | |
constexpr uint8_t | QueueDepth = 6 |
Limits the maximum number of active modules. Memory intense! | |
char | LongMessage [MaxLongTextLength] |
Temp storage for assembling long messages (REST API, MQTT reporting) | |
char | ShortMessage [MaxShotTextLength] |
Temp storage for assembling short text messages (Log entries, Error messages,etc) | |
char | CurrentTime [MaxWordLength] |
Buffer for storing current time in text format. | |
constexpr uint8_t | WirelessCSNPin = 9 |
< nRF24L01+ wireless receiver | |
constexpr uint8_t | WirelessCEPin = 10 |
nRF24l01+ wireless transmitter CE pin - Pre-connected on RF-Nano | |
constexpr uint8_t | WirelessChannel [6] = {"Hemp1"} |
This needs to be unique and match with the Name of the HempyModule_Web object in the MainModule_Web.cpp. | |
constexpr uint8_t | WirelessPayloadSize = 32 |
Size of the wireless packages exchanged with the Main module. Max 32 bytes are supported on nRF24L01+. | |
constexpr uint16_t | WirelessMessageTimeout = 500 |
(ms) One package should be exchanged within this timeout (Including retries and delays) | |
constexpr uint16_t | WirelessReceiveTimeout = 60000 |
(ms) If no packages are received from the Main module over this limit, try reseting the nRF24L01+ wireless receiver | |
Settings * loadSettings | ( | bool | ResetEEPROM | ) |
Load settings from EEPROM.
ResetEEPROM | - Force loading the defaults from the sketch and overwriting the EEPROM with it |
ResetEEPROM | if the function contains arguments with default values, they must be declared strictly before they are called, otherwise there is a compilation error: '<function name> was not declared in this scope. https://forum.arduino.cc/index.php?topic=606678.0 |
Definition at line 20 of file Settings.cpp.
void restoreDefaults | ( | ) |
Load sketch default settings into EEPROM.
Definition at line 45 of file Settings.cpp.
void saveSettings | ( | Settings * | ToSave | ) |
Store settings in EEPROM - Only updates changed bits.
Definition at line 10 of file Settings.cpp.
|
extern |
Buffer for storing current time in text format.
Definition at line 30 of file Gbox420_Mega_Main.ino.
|
extern |
Temp storage for assembling long messages (REST API, MQTT reporting)
Definition at line 28 of file Gbox420_Mega_Main.ino.
|
constexpr |
Default char * buffer length for storing a long text. Memory intense!
Definition at line 19 of file Settings.h.
|
constexpr |
Default char * buffer length for storing mutiple words. Memory intense!
Definition at line 18 of file Settings.h.
|
constexpr |
Default char * buffer length for storing a word + null terminator. Memory intense!
Definition at line 17 of file Settings.h.
|
constexpr |
Limits the maximum number of active modules. Memory intense!
Global variables
Definition at line 20 of file Settings.h.
|
extern |
Temp storage for assembling short text messages (Log entries, Error messages,etc)
Definition at line 29 of file Gbox420_Mega_Main.ino.
|
constexpr |
Default Settings for each component within the module. Loaded when the Arduino starts.
Settings are stored in EEPROM and kept between reboots. Stored values are updated by the website controls on user interaction.
Definition at line 12 of file Settings.h.
|
constexpr |
nRF24l01+ wireless transmitter CE pin - Pre-connected on RF-Nano
Definition at line 29 of file Settings.h.
|
constexpr |
This needs to be unique and match with the Name of the HempyModule_Web object in the MainModule_Web.cpp.
Definition at line 30 of file Settings.h.
|
constexpr |
< nRF24L01+ wireless receiver
nRF24l01+ wireless transmitter CSN pin - Pre-connected on RF-Nano
Definition at line 28 of file Settings.h.
|
constexpr |
(ms) One package should be exchanged within this timeout (Including retries and delays)
Definition at line 32 of file Settings.h.
|
constexpr |
Size of the wireless packages exchanged with the Main module. Max 32 bytes are supported on nRF24L01+.
Definition at line 31 of file Settings.h.
|
constexpr |
(ms) If no packages are received from the Main module over this limit, try reseting the nRF24L01+ wireless receiver
SAVED TO EEPROM - Settings struct If you change things here, increase the Version variable in line 12
Definition at line 33 of file Settings.h.