mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
randomSeed
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
},
|
||||
{
|
||||
"type": "h4",
|
||||
"title": "Версия файловой системы: 267"
|
||||
"title": "Версия файловой системы: 268"
|
||||
},
|
||||
{
|
||||
"type": "h4",
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user