mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
input completed
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
#include "Class/LineParsing.h"
|
||||
#include "Global.h"
|
||||
|
||||
@@ -14,7 +15,7 @@ class Input : public LineParsing {
|
||||
|
||||
void inputSet(String key, String state) {
|
||||
eventGen(key, "");
|
||||
jsonWriteInt(configLiveJson, key, state.toInt());
|
||||
jsonWriteFloat(configLiveJson, key, state.toFloat());
|
||||
MqttClient::publishStatus(key, state);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
#include "Global.h"
|
||||
|
||||
class LineParsing {
|
||||
class LineParsing {
|
||||
protected:
|
||||
String _key;
|
||||
String _file;
|
||||
@@ -20,22 +21,22 @@ class LineParsing {
|
||||
String _db;
|
||||
|
||||
public:
|
||||
LineParsing() :
|
||||
LineParsing() :
|
||||
|
||||
_key{""},
|
||||
_file{""},
|
||||
_page{""},
|
||||
_descr{""},
|
||||
_order{""},
|
||||
_addr{""},
|
||||
_pin{""},
|
||||
_map{""},
|
||||
_c{""},
|
||||
_inv{""},
|
||||
_state{""},
|
||||
_db{""}
|
||||
_key{""},
|
||||
_file{""},
|
||||
_page{""},
|
||||
_descr{""},
|
||||
_order{""},
|
||||
_addr{""},
|
||||
_pin{""},
|
||||
_map{""},
|
||||
_c{""},
|
||||
_inv{""},
|
||||
_state{""},
|
||||
_db{""}
|
||||
|
||||
{};
|
||||
{};
|
||||
|
||||
void update() {
|
||||
//String order = sCmd.order();
|
||||
@@ -65,6 +66,10 @@ class LineParsing {
|
||||
}
|
||||
}
|
||||
}
|
||||
_page.replace("#", " ");
|
||||
_descr.replace("#", " ");
|
||||
_page.replace(".", " ");
|
||||
_descr.replace(".", " ");
|
||||
createWidgetClass(_descr, _page, _order, _file, _key);
|
||||
}
|
||||
|
||||
|
||||
@@ -177,7 +177,7 @@ void buttonInSet() {
|
||||
}
|
||||
|
||||
//==========================================Модуль ввода цифровых значений==================================
|
||||
//digit-input digit1 inputNum Ввод Введите 1 st[60]
|
||||
//input-digit digit1 inputNum Ввод Введите 4 st[60]
|
||||
//==========================================================================================================
|
||||
void inputDigit() {
|
||||
myInput = new Input();
|
||||
@@ -185,12 +185,13 @@ void inputDigit() {
|
||||
String key = myInput->gkey();
|
||||
sCmd.addCommand(key.c_str(), inputDigitSet);
|
||||
myInput->inputSetDefault();
|
||||
myInput->clear();
|
||||
}
|
||||
|
||||
void inputDigitSet() {
|
||||
|
||||
|
||||
|
||||
String key = sCmd.order();
|
||||
String state = sCmd.next();
|
||||
myInput->inputSet(key, state);
|
||||
}
|
||||
|
||||
//=====================================================================================================================================
|
||||
|
||||
Reference in New Issue
Block a user