mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-30 11:59:12 +03:00
changes
This commit is contained in:
6
data/widgets/alarm.json
Normal file
6
data/widgets/alarm.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"widget": "anydata",
|
||||||
|
"icon": "body",
|
||||||
|
"color": "red",
|
||||||
|
"descrColor": "red"
|
||||||
|
}
|
||||||
@@ -18,6 +18,8 @@ String deleteBeforeDelimiter(String str, String found);
|
|||||||
|
|
||||||
String deleteBeforeDelimiterTo(String str, String found);
|
String deleteBeforeDelimiterTo(String str, String found);
|
||||||
|
|
||||||
|
String deleteToMarkerLast(String str, String found);
|
||||||
|
|
||||||
String selectFromMarkerToMarker(String str, String found, int number);
|
String selectFromMarkerToMarker(String str, String found, int number);
|
||||||
|
|
||||||
size_t itemsCount(String str, const String& separator);
|
size_t itemsCount(String str, const String& separator);
|
||||||
|
|||||||
@@ -31,10 +31,13 @@ void cmd_init() {
|
|||||||
sCmd.addCommand("button-out", buttonOut);
|
sCmd.addCommand("button-out", buttonOut);
|
||||||
sCmd.addCommand("pwm-out", pwmOut);
|
sCmd.addCommand("pwm-out", pwmOut);
|
||||||
sCmd.addCommand("button-in", buttonIn);
|
sCmd.addCommand("button-in", buttonIn);
|
||||||
|
|
||||||
sCmd.addCommand("input-digit", inputDigit);
|
sCmd.addCommand("input-digit", inputDigit);
|
||||||
sCmd.addCommand("input-time", inputTime);
|
sCmd.addCommand("input-time", inputTime);
|
||||||
sCmd.addCommand("output-text", textOut);
|
sCmd.addCommand("output-text", textOut);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
#include "ItemsList.h"
|
#include "ItemsList.h"
|
||||||
|
#include "Utils\StringUtils.h"
|
||||||
|
|
||||||
static const char* firstLine PROGMEM = "Тип элемента;Id;Виджет;Имя вкладки;Имя виджета;Позиция виджета";
|
static const char* firstLine PROGMEM = "Тип элемента;Id;Виджет;Имя вкладки;Имя виджета;Позиция виджета";
|
||||||
|
|
||||||
void addItem(String name) {
|
void addItem(String name) {
|
||||||
String item = readFile("items/" + name + ".txt", 1024);
|
String item = readFile("items/" + name + ".txt", 1024);
|
||||||
|
name = deleteToMarkerLast(name, "-");
|
||||||
item.replace("id", name + String(getNewElementNumber("id.txt")));
|
item.replace("id", name + String(getNewElementNumber("id.txt")));
|
||||||
item.replace("order", String(getNewElementNumber("order.txt")));
|
item.replace("order", String(getNewElementNumber("order.txt")));
|
||||||
item.replace("pin", "pin[" + String(getFreePin()) + "]");
|
item.replace("pin", "pin[" + String(getFreePin()) + "]");
|
||||||
|
|
||||||
item.replace("\r\n", "");
|
item.replace("\r\n", "");
|
||||||
item.replace("\r", "");
|
item.replace("\r", "");
|
||||||
item.replace("\n", "");
|
item.replace("\n", "");
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
#include "Utils\StringUtils.h"
|
#include "Utils\StringUtils.h"
|
||||||
|
|
||||||
#include "Consts.h"
|
#include "Consts.h"
|
||||||
|
|
||||||
String selectToMarkerLast(String str, String found) {
|
String selectToMarkerLast(String str, String found) {
|
||||||
|
|||||||
Reference in New Issue
Block a user