mirror of
https://github.com/anklimov/lighthub
synced 2025-12-06 11:49:51 +03:00
modbus speedup update
This commit is contained in:
@@ -1097,10 +1097,10 @@ int Item::isActive() {
|
||||
if (val) return 1; else return 0;
|
||||
}
|
||||
|
||||
void Item::resumeModbus()
|
||||
bool Item::resumeModbus()
|
||||
{
|
||||
// return;
|
||||
if (modbusBusy) return;
|
||||
|
||||
if (modbusBusy) return false;
|
||||
configLocked++;
|
||||
if (items) {
|
||||
aJsonObject * item = items->child;
|
||||
@@ -1119,17 +1119,16 @@ if (items) {
|
||||
} //if
|
||||
}
|
||||
configLocked--;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
int Item::Poll(int cause) {
|
||||
|
||||
#ifndef MODBUS_DISABLE
|
||||
if (isPendedModbusWrites)
|
||||
{
|
||||
resumeModbus();
|
||||
if (isPendedModbusWrites && resumeModbus())
|
||||
isPendedModbusWrites=false;
|
||||
}
|
||||
|
||||
#endif
|
||||
switch (cause)
|
||||
{
|
||||
|
||||
@@ -151,7 +151,7 @@ class Item
|
||||
boolean checkVCRetry();
|
||||
boolean checkHeatRetry();
|
||||
void sendDelayedStatus();
|
||||
void resumeModbus();
|
||||
bool resumeModbus();
|
||||
|
||||
|
||||
int checkFM();
|
||||
|
||||
Reference in New Issue
Block a user