mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 06:32:19 +03:00
добавил название параметра
This commit is contained in:
@@ -45,7 +45,8 @@ float yourSensorReading(String type, String paramsAny) {
|
||||
if (type == "LCD") {
|
||||
LCD_init();
|
||||
LCD.setCursor(jsonReadInt(paramsAny, "с"), jsonReadInt(paramsAny, "k"));
|
||||
LCD.print(jsonReadFloat(configLiveJson, jsonReadStr(paramsAny, "val")));
|
||||
String toPrint = jsonReadStr(paramsAny, "descr") + " " + jsonReadStr(configLiveJson, jsonReadStr(paramsAny, "val"));
|
||||
LCD.print(toPrint);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ SensorAny::SensorAny(const String& paramsAny) {
|
||||
_addr = jsonReadStr(_paramsAny, "addr");
|
||||
_type = jsonReadStr(_paramsAny, "type");
|
||||
_val = jsonReadStr(_paramsAny, "val");
|
||||
_descr = jsonReadStr(_paramsAny, "descr");
|
||||
}
|
||||
|
||||
SensorAny::~SensorAny() {}
|
||||
@@ -59,6 +60,7 @@ void AnySensor() {
|
||||
jsonWriteStr(params, "k", myLineParsing.gk());
|
||||
jsonWriteStr(params, "val", myLineParsing.gval());
|
||||
jsonWriteStr(params, "type", myLineParsing.gtype());
|
||||
jsonWriteStr(params, "descr", myLineParsing.gdescr());
|
||||
myLineParsing.clear();
|
||||
|
||||
static bool firstTime = true;
|
||||
|
||||
Reference in New Issue
Block a user