исправление окон ввода даты цифры и времени

This commit is contained in:
Dmitry Borisenko
2022-08-12 16:05:44 +02:00
parent 68d0dd4aad
commit 8011609092
3 changed files with 216 additions and 41 deletions

View File

@@ -11,9 +11,9 @@
"type": "Writing", "type": "Writing",
"subtype": "Timer", "subtype": "Timer",
"id": "timer", "id": "timer",
"widget": "", "widget": "anydataDef",
"page": "", "page": "Таймеры",
"descr": "", "descr": "Таймер",
"int": 1, "int": 1,
"countDown": 15, "countDown": 15,
"ticker": 0, "ticker": 0,
@@ -22,13 +22,13 @@
"num": 1 "num": 1
}, },
{ {
"name": "2. Окно ввода цифры", "name": "2. Окно ввода цифры (переменная)",
"type": "Reading", "type": "Reading",
"subtype": "Variable", "subtype": "Variable",
"id": "dedit", "id": "value",
"widget": "", "widget": "inputDgt",
"page": "", "page": "Ввод",
"descr": "", "descr": "Введите цифру",
"int": "0", "int": "0",
"val": "0", "val": "0",
"num": 2 "num": 2
@@ -37,22 +37,22 @@
"name": "3. Окно ввода времени", "name": "3. Окно ввода времени",
"type": "Reading", "type": "Reading",
"subtype": "Variable", "subtype": "Variable",
"id": "tedit", "id": "time",
"widget": "", "widget": "inputTm",
"page": "", "page": "Ввод",
"descr": "", "descr": "Введите время",
"int": "0", "int": "0",
"val": "0", "val": "0",
"num": 3 "num": 3
}, },
{ {
"name": "4. Переменная", "name": "4. Окно ввода даты",
"type": "Reading", "type": "Reading",
"subtype": "Variable", "subtype": "Variable",
"id": "var", "id": "time",
"widget": "", "widget": "inputDate",
"page": "", "page": "Ввод",
"descr": "", "descr": "Введите дату",
"int": "0", "int": "0",
"val": "0", "val": "0",
"num": 4 "num": 4
@@ -61,7 +61,7 @@
"name": "5. Кнопка", "name": "5. Кнопка",
"type": "Reading", "type": "Reading",
"subtype": "VButton", "subtype": "VButton",
"id": "vbtn", "id": "btn",
"widget": "button", "widget": "button",
"page": "Кнопки", "page": "Кнопки",
"descr": "Кнопка1", "descr": "Кнопка1",
@@ -207,7 +207,7 @@
"num": 15 "num": 15
}, },
{ {
"name": "16. Cенсор температуры ds18b20", "name": "15. Cенсор температуры ds18b20",
"type": "Reading", "type": "Reading",
"subtype": "Ds18b20", "subtype": "Ds18b20",
"id": "dstmp", "id": "dstmp",
@@ -222,7 +222,7 @@
"num": 16 "num": 16
}, },
{ {
"name": "17. Cенсор температуры GY21", "name": "16. Cенсор температуры GY21",
"type": "Reading", "type": "Reading",
"subtype": "GY21t", "subtype": "GY21t",
"id": "tmp4", "id": "tmp4",
@@ -234,7 +234,7 @@
"num": 17 "num": 17
}, },
{ {
"name": "18. Cенсор влажности GY21", "name": "17. Cенсор влажности GY21",
"type": "Reading", "type": "Reading",
"subtype": "GY21h", "subtype": "GY21h",
"id": "Hum4", "id": "Hum4",
@@ -246,7 +246,7 @@
"num": 18 "num": 18
}, },
{ {
"name": "19. Cенсор температуры HDC1080", "name": "18. Cенсор температуры HDC1080",
"type": "Reading", "type": "Reading",
"subtype": "Hdc1080t", "subtype": "Hdc1080t",
"id": "Temp1080", "id": "Temp1080",
@@ -259,7 +259,7 @@
"num": 19 "num": 19
}, },
{ {
"name": "20. Cенсор влажности HDC1080", "name": "19. Cенсор влажности HDC1080",
"type": "Reading", "type": "Reading",
"subtype": "Hdc1080h", "subtype": "Hdc1080h",
"id": "Hum1080", "id": "Hum1080",
@@ -272,7 +272,7 @@
"num": 20 "num": 20
}, },
{ {
"name": "21. Cенсор температуры MAX6675", "name": "20. Cенсор температуры MAX6675",
"type": "Reading", "type": "Reading",
"subtype": "Max6675t", "subtype": "Max6675t",
"id": "maxtmp", "id": "maxtmp",
@@ -286,7 +286,7 @@
"num": 21 "num": 21
}, },
{ {
"name": "22. Сканер кнопок 433 MHz", "name": "21. Сканер кнопок 433 MHz",
"num": 22, "num": 22,
"type": "Reading", "type": "Reading",
"subtype": "RCswitch", "subtype": "RCswitch",
@@ -296,7 +296,7 @@
"pinTx": 12 "pinTx": 12
}, },
{ {
"name": "23. Cенсор температуры Sht20", "name": "22. Cенсор температуры Sht20",
"type": "Reading", "type": "Reading",
"subtype": "Sht20t", "subtype": "Sht20t",
"id": "tmp2", "id": "tmp2",
@@ -308,7 +308,7 @@
"num": 23 "num": 23
}, },
{ {
"name": "24. Cенсор влажности Sht20", "name": "23. Cенсор влажности Sht20",
"type": "Reading", "type": "Reading",
"subtype": "Sht20h", "subtype": "Sht20h",
"id": "Hum2", "id": "Hum2",
@@ -320,7 +320,7 @@
"num": 24 "num": 24
}, },
{ {
"name": "25. Cенсор температуры Sht30", "name": "24. Cенсор температуры Sht30",
"type": "Reading", "type": "Reading",
"subtype": "Sht30t", "subtype": "Sht30t",
"id": "tmp30", "id": "tmp30",
@@ -332,7 +332,7 @@
"num": 25 "num": 25
}, },
{ {
"name": "26. Cенсор влажности Sht30", "name": "25. Cенсор влажности Sht30",
"type": "Reading", "type": "Reading",
"subtype": "Sht30h", "subtype": "Sht30h",
"id": "Hum30", "id": "Hum30",
@@ -344,7 +344,7 @@
"num": 26 "num": 26
}, },
{ {
"name": "27. Сонар HC-SR04", "name": "26. Сонар HC-SR04",
"num": 27, "num": 27,
"type": "Reading", "type": "Reading",
"subtype": "Sonar", "subtype": "Sonar",
@@ -360,7 +360,7 @@
"header": "Исполнительные устройства" "header": "Исполнительные устройства"
}, },
{ {
"name": "28. Кнопка подключенная к пину", "name": "27. Кнопка подключенная к пину",
"type": "Writing", "type": "Writing",
"subtype": "ButtonIn", "subtype": "ButtonIn",
"id": "btn", "id": "btn",
@@ -376,7 +376,7 @@
"num": 28 "num": 28
}, },
{ {
"name": "29. Кнопка управляющая пином (Реле)", "name": "28. Кнопка управляющая пином (Реле)",
"type": "Writing", "type": "Writing",
"subtype": "ButtonOut", "subtype": "ButtonOut",
"id": "btn", "id": "btn",
@@ -389,7 +389,7 @@
"num": 29 "num": 29
}, },
{ {
"name": "30. Поддержка DS1302(1), DS1307(2), DS3231(3), RX8025(4)", "name": "29. Поддержка DS1302(1), DS1307(2), DS3231(3), RX8025(4)",
"type": "Reading", "type": "Reading",
"subtype": "IarduinoRTC", "subtype": "IarduinoRTC",
"id": "RTC", "id": "RTC",
@@ -406,7 +406,7 @@
"num": 30 "num": 30
}, },
{ {
"name": "31. Сервопривод", "name": "30. Сервопривод",
"type": "Writing", "type": "Writing",
"subtype": "IoTServo", "subtype": "IoTServo",
"id": "servo", "id": "servo",
@@ -420,7 +420,7 @@
"num": 31 "num": 31
}, },
{ {
"name": "32. Расширитель портов Mcp23017", "name": "31. Расширитель портов Mcp23017",
"type": "Reading", "type": "Reading",
"subtype": "Mcp23017", "subtype": "Mcp23017",
"id": "Mcp", "id": "Mcp",
@@ -433,7 +433,7 @@
"num": 32 "num": 32
}, },
{ {
"name": "33. MP3 плеер", "name": "32. MP3 плеер",
"type": "Reading", "type": "Reading",
"subtype": "Mp3", "subtype": "Mp3",
"id": "mp3", "id": "mp3",
@@ -446,7 +446,7 @@
"num": 33 "num": 33
}, },
{ {
"name": "34. PWM ESP8266", "name": "33. PWM ESP8266",
"type": "Writing", "type": "Writing",
"subtype": "Pwm8266", "subtype": "Pwm8266",
"id": "pwm", "id": "pwm",
@@ -461,7 +461,7 @@
"num": 34 "num": 34
}, },
{ {
"name": "35. Доп. функции системы", "name": "34. Доп. функции системы",
"type": "Reading", "type": "Reading",
"subtype": "SysExt", "subtype": "SysExt",
"id": "SysExt", "id": "SysExt",
@@ -475,7 +475,7 @@
"header": "Экраны" "header": "Экраны"
}, },
{ {
"name": "36. LCD экран 2004", "name": "35. LCD экран 2004",
"type": "Reading", "type": "Reading",
"subtype": "Lcd2004", "subtype": "Lcd2004",
"id": "Lcd", "id": "Lcd",
@@ -490,7 +490,7 @@
"num": 36 "num": 36
}, },
{ {
"name": "37. LCD экран 1602", "name": "36. LCD экран 1602",
"type": "Reading", "type": "Reading",
"subtype": "Lcd2004", "subtype": "Lcd2004",
"id": "Lcd", "id": "Lcd",

174
myProfile.json Normal file
View File

@@ -0,0 +1,174 @@
{
"iotmSettings": {
"settings": "",
"name": "IoTmanagerVer4",
"apssid": "IoTmanager",
"appass": "",
"routerssid": "rise",
"routerpass": "hostel3333",
"timezone": 1,
"ntp": "pool.ntp.org",
"weblogin": "admin",
"webpass": "admin",
"mqttServer": "m2.wqtt.ru",
"mqttPort": 8021,
"mqttPrefix": "/rise",
"mqttUser": "rise",
"mqttPass": "3hostel3",
"serverip": "http://206.189.49.244:8081",
"log": 0,
"mqttin": 0
},
"projectProp": {
"platformio": {
"default_envs": "esp8266_4mb",
"data_dir": "data_svelte"
}
},
"modules": {
"Виртуальные элементы": [
{
"path": "src\\modules\\virtual\\Timer",
"active": true
},
{
"path": "src\\modules\\virtual\\Variable",
"active": true
},
{
"path": "src\\modules\\virtual\\VButton",
"active": true
}
],
"Сенсоры": [
{
"path": "src\\modules\\sensors\\Ads1115",
"active": false
},
{
"path": "src\\modules\\sensors\\Aht20",
"active": true
},
{
"path": "src\\modules\\sensors\\AnalogAdc",
"active": true
},
{
"path": "src\\modules\\sensors\\Bme280",
"active": true
},
{
"path": "src\\modules\\sensors\\Bmp280",
"active": true
},
{
"path": "src\\modules\\sensors\\Dht1122",
"active": true
},
{
"path": "src\\modules\\sensors\\Ds18b20",
"active": true
},
{
"path": "src\\modules\\sensors\\Emon",
"active": false
},
{
"path": "src\\modules\\sensors\\GY21",
"active": true
},
{
"path": "src\\modules\\sensors\\Hdc1080",
"active": true
},
{
"path": "src\\modules\\sensors\\IoTWiegand",
"active": false
},
{
"path": "src\\modules\\sensors\\Max6675",
"active": true
},
{
"path": "src\\modules\\sensors\\Mhz19",
"active": false
},
{
"path": "src\\modules\\sensors\\RCswitch",
"active": true
},
{
"path": "src\\modules\\sensors\\Sds011",
"active": false
},
{
"path": "src\\modules\\sensors\\Sht20",
"active": true
},
{
"path": "src\\modules\\sensors\\Sht30",
"active": true
},
{
"path": "src\\modules\\sensors\\Sonar",
"active": true
}
],
"Исполнительные устройства": [
{
"path": "src\\modules\\exec\\ButtonIn",
"active": true
},
{
"path": "src\\modules\\exec\\ButtonOut",
"active": true
},
{
"path": "src\\modules\\exec\\EspCam",
"active": false
},
{
"path": "src\\modules\\exec\\IarduinoRTC",
"active": true
},
{
"path": "src\\modules\\exec\\IoTServo",
"active": true
},
{
"path": "src\\modules\\exec\\Mcp23017",
"active": true
},
{
"path": "src\\modules\\exec\\Mp3",
"active": true
},
{
"path": "src\\modules\\exec\\Pwm32",
"active": true
},
{
"path": "src\\modules\\exec\\Pwm8266",
"active": true
},
{
"path": "src\\modules\\exec\\SDcard",
"active": false
},
{
"path": "src\\modules\\exec\\SysExt",
"active": true
},
{
"path": "src\\modules\\exec\\Telegram",
"active": false
}
],
"Экраны": [
{
"path": "src\\modules\\display\\Lcd2004",
"active": true
}
]
}
}

View File

@@ -154,7 +154,8 @@ void externalVariable::doByInterval() { // для данного класса d
IoTItem* myIoTItem; IoTItem* myIoTItem;
IoTItem* findIoTItem(String name) { // поиск элемента модуля в существующей конфигурации // поиск элемента модуля в существующей конфигурации
IoTItem* findIoTItem(String name) {
for (std::list<IoTItem*>::iterator it = IoTItems.begin(); it != IoTItems.end(); ++it) { for (std::list<IoTItem*>::iterator it = IoTItems.begin(); it != IoTItems.end(); ++it) {
if ((*it)->getID() == name) return *it; if ((*it)->getID() == name) return *it;
} }