UM BH1750 adapted to "MM style", 8266 build fixes
* UM BH1750 adjustments to use new MM features * UM BH1750 check sensor status before tryig to read new value (avoids blocking LED updates) * UM temperature: ensure that measurements continue with many LEDs running (strip.isUpdating() will be true all the time) * all usermods: solved compile problems on 8266
This commit is contained in:
@@ -390,7 +390,7 @@ void ShtUsermod::addToConfig(JsonObject &root)
|
||||
{
|
||||
JsonObject top = root.createNestedObject(FPSTR(_name)); // usermodname
|
||||
|
||||
top[FPSTR("enabled")] = enabled;
|
||||
top[F("enabled")] = enabled;
|
||||
top[FPSTR(_shtType)] = shtType;
|
||||
top[FPSTR(_unitOfTemp)] = unitOfTemp;
|
||||
top[FPSTR(_haMqttDiscovery)] = haMqttDiscovery;
|
||||
@@ -421,7 +421,7 @@ bool ShtUsermod::readFromConfig(JsonObject &root)
|
||||
byte oldUnitOfTemp = unitOfTemp;
|
||||
bool oldHaMqttDiscovery = haMqttDiscovery;
|
||||
|
||||
getJsonValue(top[FPSTR("enabled")], enabled);
|
||||
getJsonValue(top[F("enabled")], enabled);
|
||||
getJsonValue(top[FPSTR(_shtType)], shtType);
|
||||
getJsonValue(top[FPSTR(_unitOfTemp)], unitOfTemp);
|
||||
getJsonValue(top[FPSTR(_haMqttDiscovery)], haMqttDiscovery);
|
||||
|
||||
Reference in New Issue
Block a user