diff --git a/data/set.device.json b/data/set.device.json index a8438cc1..3f4cd654 100644 --- a/data/set.device.json +++ b/data/set.device.json @@ -43,7 +43,7 @@ }, { "type": "h4", - "title": "Версия файловой системы: 267" + "title": "Версия файловой системы: 268" }, { "type": "h4", diff --git a/src/ItemsList.cpp b/src/ItemsList.cpp index 290380f2..ee865c2b 100644 --- a/src/ItemsList.cpp +++ b/src/ItemsList.cpp @@ -23,9 +23,12 @@ void itemsListInit() { void addItem(String name) { String item = readFile("items/" + name + ".txt", 1024); - name = deleteToMarkerLast(name, "."); + name = selectToMarker(name, "-"); - item.replace("id", name + "-" + String(getNewElementNumber("id.txt"))); + randomSeed(micros()); + unsigned int num = random(0, 1000); + + item.replace("id", name + String(num)); // "-" + String(getNewElementNumber("id.txt"))); item.replace("order", String(getNewElementNumber("order.txt"))); if (item.indexOf("pin") != -1) { //all cases (random pins from available)