mirror of
https://github.com/anklimov/lighthub
synced 2025-12-06 11:49:51 +03:00
modbus pooling/tomeout fix
This commit is contained in:
@@ -1137,9 +1137,6 @@ int Item::checkModbusDimmer() {
|
|||||||
data = node.getResponseBuffer(0);
|
data = node.getResponseBuffer(0);
|
||||||
debugSerial << F("MB: ") << itemArr->name << F(" Val: ") << _HEX(data) << endl;
|
debugSerial << F("MB: ") << itemArr->name << F(" Val: ") << _HEX(data) << endl;
|
||||||
checkModbusDimmer(data);
|
checkModbusDimmer(data);
|
||||||
} else
|
|
||||||
debugSerial << F("Modbus polling error=") << _HEX(result) << endl;
|
|
||||||
modbusBusy = 0;
|
|
||||||
|
|
||||||
// Looking 1 step ahead for modbus item, which uses same register
|
// Looking 1 step ahead for modbus item, which uses same register
|
||||||
Item nextItem(pollingItem->next);
|
Item nextItem(pollingItem->next);
|
||||||
@@ -1150,6 +1147,11 @@ int Item::checkModbusDimmer() {
|
|||||||
if (!pollingItem)
|
if (!pollingItem)
|
||||||
pollingItem = items->child;
|
pollingItem = items->child;
|
||||||
}
|
}
|
||||||
|
} else
|
||||||
|
debugSerial << F("Modbus polling error=") << _HEX(result) << endl;
|
||||||
|
modbusBusy = 0;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ env_default =
|
|||||||
; mega2560-5100
|
; mega2560-5100
|
||||||
|
|
||||||
; Arduino Mega + Ethernet shield Wiznet 5500
|
; Arduino Mega + Ethernet shield Wiznet 5500
|
||||||
mega2560-5500
|
; mega2560-5500
|
||||||
|
|
||||||
; LightHub controller HW revision 2.1 and above (Wiznet 5500 CS on pin 53)
|
; LightHub controller HW revision 2.1 and above (Wiznet 5500 CS on pin 53)
|
||||||
; lighthub21
|
; lighthub21
|
||||||
@@ -29,7 +29,7 @@ env_default =
|
|||||||
; due-5100
|
; due-5100
|
||||||
|
|
||||||
; Arduino DUE + Ethernet shield Wiznet 5500
|
; Arduino DUE + Ethernet shield Wiznet 5500
|
||||||
; due-5500
|
due-5500
|
||||||
|
|
||||||
; ESP 8266
|
; ESP 8266
|
||||||
; esp8266-wifi
|
; esp8266-wifi
|
||||||
|
|||||||
Reference in New Issue
Block a user