output text module added

This commit is contained in:
Dmitry Borisenko
2020-08-26 16:39:42 +03:00
parent 90e6822d3b
commit ffc5e6c894
13 changed files with 83 additions and 38 deletions

View File

@@ -23,4 +23,4 @@ class CallBackTest {
void setCallback(AsyncActionCb cb);
void setCallback(AsyncParamActionCb pcb);
};
extern CallBackTest* CB;
//extern CallBackTest* CB;

View File

@@ -66,10 +66,11 @@ class LineParsing {
}
}
}
_page.replace("#", " ");
_descr.replace("#", " ");
_page.replace(".", " ");
_descr.replace(".", " ");
_descr.replace("#", " ");
createWidgetClass(_descr, _page, _order, _file, _key);
}
@@ -124,8 +125,6 @@ class LineParsing {
if (!loadWidgetClass(filename, buf)) {
return;
}
descr.replace("#", " ");
page.replace("#", " ");
jsonWriteStr(buf, "page", page);
jsonWriteStr(buf, "order", order);

View File

@@ -0,0 +1,24 @@
#pragma once
#include <Arduino.h>
#include "Class/LineParsing.h"
#include "Global.h"
class OutputModule : public LineParsing {
public:
OutputModule() : LineParsing(){};
void OutputModuleStateSetDefault() {
if (_state != "") {
OutputModuleChange(_key, _state);
}
}
void OutputModuleChange(String key, String state) {
state.replace("#", " ");
eventGen(key, "");
jsonWriteStr(configLiveJson, key, state);
MqttClient::publishStatus(key, state);
}
};
extern OutputModule* myText;

View File

@@ -19,8 +19,8 @@ extern void inputDigitSet();
extern void inputTime();
extern void inputTimeSet();
extern void text();
extern void textSet();
extern void textOut();
extern void textOutSet();
extern void handle_time_init();
extern void stepper();