Merge branch 'master' into dev
This commit is contained in:
@@ -426,8 +426,8 @@ class Animated_Staircase : public Usermod {
|
||||
|
||||
/*
|
||||
* Reads the configuration to internal flash memory before setup() is called.
|
||||
*
|
||||
* The function should return true if configuration was successfully loaded or false if there was no configuration.
|
||||
*
|
||||
* The function should return true if configuration was successfully loaded or false if there was no configuration.
|
||||
*/
|
||||
bool readFromConfig(JsonObject& root) {
|
||||
bool oldUseUSSensorTop = useUSSensorTop;
|
||||
@@ -474,7 +474,7 @@ class Animated_Staircase : public Usermod {
|
||||
// first run: reading from cfg.json
|
||||
DEBUG_PRINTLN(F(" config loaded."));
|
||||
} else {
|
||||
// changing paramters from settings page
|
||||
// changing parameters from settings page
|
||||
DEBUG_PRINTLN(F(" config (re)loaded."));
|
||||
bool changed = false;
|
||||
if ((oldUseUSSensorTop != useUSSensorTop) ||
|
||||
|
||||
@@ -167,8 +167,8 @@ public:
|
||||
}
|
||||
|
||||
/**
|
||||
* readFromConfig() is called before setup() to populate properties from values stored in cfg.json
|
||||
*/
|
||||
* readFromConfig() is called before setup() to populate properties from values stored in cfg.json
|
||||
*/
|
||||
bool readFromConfig(JsonObject &root)
|
||||
{
|
||||
// we look for JSON object.
|
||||
|
||||
@@ -273,7 +273,7 @@ class UsermodTemperature : public Usermod {
|
||||
DEBUG_PRINTLN(F(" config (re)loaded."));
|
||||
}
|
||||
// use "return !top["newestParameter"].isNull();" when updating Usermod with new features
|
||||
return true;
|
||||
return !top[FPSTR(_parasite)].isNull();
|
||||
}
|
||||
|
||||
uint16_t getId()
|
||||
|
||||
@@ -33,7 +33,7 @@ class AutoSaveUsermod : public Usermod {
|
||||
bool enabled = true;
|
||||
|
||||
// configurable parameters
|
||||
uint16_t autoSaveAfterSec = 15; // 15s by default
|
||||
uint16_t autoSaveAfterSec = 15; // 15s by default
|
||||
uint8_t autoSavePreset = 250; // last possible preset
|
||||
bool applyAutoSaveOnBoot = false; // do we load auto-saved preset on boot?
|
||||
|
||||
|
||||
@@ -648,7 +648,7 @@ class FourLineDisplayUsermod : public Usermod {
|
||||
type = newType;
|
||||
DEBUG_PRINTLN(F(" config loaded."));
|
||||
} else {
|
||||
// changing paramters from settings page
|
||||
// changing parameters from settings page
|
||||
if (sclPin!=newScl || sdaPin!=newSda || type!=newType) {
|
||||
if (type != NONE) delete (static_cast<U8X8*>(u8x8));
|
||||
pinManager.deallocatePin(sclPin);
|
||||
|
||||
Reference in New Issue
Block a user