Skip to content

Commit

Permalink
missed some changes in last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Alois Klingler committed Aug 20, 2023
1 parent 9ebfd82 commit 2f1bb0d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/ModbusDtu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ void ModbusDtuClass::loop()
mb.Hreg(0x9ca1, hexbytes[1]);
mb.Hreg(0x9ca2, hexbytes[0]);
value = (Datastore.getTotalAcYieldTotalEnabled()*1000);
if (value != 0) {
if (value != 0 && Datastore.getIsAllEnabledReachable()) {
mb.Hreg(0x9cc1, hexbytes[1]);
mb.Hreg(0x9cc2, hexbytes[0]);
}
Expand Down
2 changes: 2 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ void loop()
ModbusDtu.init();
MessageOutput.println(F("done"));
yield();
ModbusDtu.loop();
yield();
}
}
MqttHandleDtu.loop();
Expand Down

0 comments on commit 2f1bb0d

Please sign in to comment.