mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
Merge pull request #105 from DmitryBorisenko33/ver3
добавил название параметра
This commit is contained in:
@@ -38,6 +38,6 @@
|
||||
0;sensor;anyid;anydata;Сенсоры;Параметр;1;c[1];int[10];type[HDC1080_hum];addr[0x76]*
|
||||
0;sensor;anyid;anydata;Сенсоры;Параметр;1;c[1];int[10];type[AHTX0_temp];addr[0x76]
|
||||
0;sensor;anyid;anydata;Сенсоры;Параметр;1;c[1];int[10];type[AHTX0_hum];addr[0x76]*
|
||||
0;sensor;anyid;anydata;Сенсоры;Параметр;1;c[0];k[0];int[10];type[LCD];val[any]
|
||||
0;sensor;anyid;anydata;Сенсоры;Параметр;1;c[8];k[1];int[10];type[LCD];val[any]*
|
||||
0;sensor;anyid;anydata;Page;Tmp;1;c[0];k[0];int[10];type[LCD];val[any]
|
||||
0;sensor;anyid;anydata;Page;Hum;1;c[8];k[1];int[10];type[LCD];val[any]*
|
||||
0;sensor;anyid;anydata;Сенсоры;Параметр;1;c[1];int[10];type[type1];addr[0x76]*
|
||||
@@ -25,6 +25,7 @@ class SensorAny {
|
||||
String _addr;
|
||||
String _type;
|
||||
String _val;
|
||||
String _descr;
|
||||
|
||||
unsigned long prevMillis;
|
||||
unsigned long difference;
|
||||
|
||||
@@ -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