Ускоряем начало выполнения сценариев и добавляем событие onInit

Которое появляется и выполняется до инициализации сети
This commit is contained in:
2023-02-17 22:21:10 +03:00
parent a3b99a9e8d
commit 0f9a185163
2 changed files with 44 additions and 19 deletions

View File

@@ -173,7 +173,7 @@ void IoTItem::checkIntFromNet() {
if (_intFromNet >= 0) {
// если время жизни истекло, то удаляем элемент чуть позже на следующем такте loop
// если это было уведомление не об ошибке или начале работы, то сообщаем, что сетевое событие давно не приходило
if (_intFromNet == 0 && _id.indexOf("onError") == -1 && _id.indexOf("onStart") == -1) {
if (_intFromNet == 0 && _id.indexOf("onError") == -1 && _id.indexOf("onStart") == -1 && _id.indexOf("onInit") == -1) {
SerialPrint("E", _id, "The new data did not come from the network. The level of trust is low.", _id);
}
_intFromNet--;