mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 06:32:19 +03:00
output text module added
This commit is contained in:
@@ -23,4 +23,4 @@ class CallBackTest {
|
||||
void setCallback(AsyncActionCb cb);
|
||||
void setCallback(AsyncParamActionCb pcb);
|
||||
};
|
||||
extern CallBackTest* CB;
|
||||
//extern CallBackTest* CB;
|
||||
@@ -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);
|
||||
|
||||
24
include/Class/OutputModule.h
Normal file
24
include/Class/OutputModule.h
Normal 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;
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user