mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 06:32:19 +03:00
fixed some bugs
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
#include "Global.h"
|
||||
|
||||
class ButtonOutClass : public LineParsing {
|
||||
public:
|
||||
ButtonOutClass() : LineParsing(){};
|
||||
public:
|
||||
ButtonOutClass() : LineParsing() {};
|
||||
|
||||
void init() {
|
||||
if (_pin != "") {
|
||||
@@ -28,12 +28,13 @@ class ButtonOutClass : public LineParsing {
|
||||
|
||||
if (inv == "") {
|
||||
digitalWrite(pinInt, state.toInt());
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
digitalWrite(pinInt, !state.toInt());
|
||||
}
|
||||
eventGen(key, "");
|
||||
jsonWriteInt(configLiveJson, key, state.toInt());
|
||||
publishStatus(key, state);
|
||||
publishStatus(key, state);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
#include "items/SensorConvertingClass.h"
|
||||
|
||||
class SensorDallasClass : public SensorConvertingClass {
|
||||
public:
|
||||
SensorDallasClass() : SensorConvertingClass(){};
|
||||
public:
|
||||
SensorDallasClass() : SensorConvertingClass() {};
|
||||
|
||||
void SensorDallasInit() {
|
||||
oneWire = new OneWire((uint8_t)_pin.toInt());
|
||||
@@ -36,7 +36,7 @@ class SensorDallasClass : public SensorConvertingClass {
|
||||
float valueFl = this->correction(key, value);
|
||||
eventGen(key, "");
|
||||
jsonWriteStr(configLiveJson, key, String(valueFl));
|
||||
publishStatus(key, String(valueFl));
|
||||
publishStatus(key, String(valueFl));
|
||||
SerialPrint("I", "Sensor", "'" + key + "' data: " + String(valueFl));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user