mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
кастомный сенсор
This commit is contained in:
@@ -33,4 +33,5 @@
|
||||
0;logging;crtid;chart3;Графики;История;order;val[any];int[23:30];cnt[100];st[0]*
|
||||
0;uptime;uptid;anydataTime;Системные;%name%#uptime;order;int[60]*
|
||||
0;sht20;tmpid;anydataTemp;Сенсоры;Температура;1;c[1]
|
||||
0;sht20;humid;anydataHum;Сенсоры;Влажность;2;c[1];int[50]*
|
||||
0;sht20;humid;anydataHum;Сенсоры;Влажность;2;c[1];int[50]*
|
||||
0;sensor;anyid;anydata;Сенсоры;Параметр;1;c[1];int[10];type[type1]*
|
||||
Binary file not shown.
@@ -1,12 +1,12 @@
|
||||
#include "sensors/YourSensor.h"
|
||||
#include "YourSensor.h"
|
||||
|
||||
float yourSensorReading(String type) {
|
||||
float value;
|
||||
if (type == "name1") {
|
||||
if (type == "type1") {
|
||||
value++;
|
||||
} else if (type == "name2") {
|
||||
} else if (type == "type2") {
|
||||
value--;
|
||||
} else if (type == "name3") {
|
||||
} else if (type == "type3") {
|
||||
value = value + 10;
|
||||
}
|
||||
return value;
|
||||
@@ -5,8 +5,8 @@
|
||||
#include "BufferExecute.h"
|
||||
#include "Class/LineParsing.h"
|
||||
#include "Global.h"
|
||||
#include "YourSensor.h"
|
||||
#include "items/vSensorAny.h"
|
||||
#include "sensors/SensorYour.h"
|
||||
|
||||
SensorAny::SensorAny(const String& paramsAny) {
|
||||
_paramsAny = paramsAny;
|
||||
|
||||
Reference in New Issue
Block a user