API Reference for the SFE_QUAD_Sensors__LittleFS class
Methods to support writing/reading the sensors and menu configuration to/from storage using LittleFS.
Methods
beginStorage()
This method: records the configuration file name; performs a LittleFS.begin()
.
Parameter | Type | Description |
---|---|---|
theFilename |
const char * |
A pointer to the storage filename |
return value | bool |
true is successful, otherwise false |
writeConfigurationToStorage()
This method writes the menu and sensor configuration from the configuration
dynamic char array into the configuration file.
If append
is false
(default) the configuration file will be overwritten.
If append
is true
, the configuration is appended to the end of the file, preserving any existing configuration data.
This can be useful if different sensors are connected for different logging runs. If a sensor configuration is included twice, both will be applied
with the newest configuration superseding the older.
Parameter | Type | Description |
---|---|---|
append |
bool |
If false (default) new data overwrites old. If true , new data is apended to old |
return value | bool |
true if the data is written successfully, otherwise false |
readConfigurationFromStorage()
This method reads the menu and sensor configuration from storage, copying it into the configuration
dynamic char array.
Parameter | Type | Description |
---|---|---|
return value | bool |
true if the data is read successfully, otherwise false |
endStorage()
This method performs a LittleFS.end()
.
Parameter | Type | Description |
---|---|---|
return value | bool |
true if successful, otherwise false |
Member Variables
Parameter | Type | Description |
---|---|---|
_theStorage |
File |
A File object, used to hold the sensor and menu configuration |
_theStorageName |
char * |
A dynamic char array which holds the configuration file name |