fixed some bugs

This commit is contained in:
Dmitry Borisenko
2020-11-02 04:09:15 +03:00
parent 0bfc876c65
commit 50590bc90e
6 changed files with 92 additions and 88 deletions

View File

@@ -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);
}
};