Skip to content

Commit

Permalink
Shitf595 dynamic device count (#22543)
Browse files Browse the repository at this point in the history
* Make max Shift595 device count dynamic

* Update xdrv_60_shift595.ino
  • Loading branch information
jziolkowski authored Nov 25, 2024
1 parent e397c11 commit 3ab8727
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tasmota/tasmota_xdrv_driver/xdrv_60_shift595.ino
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ void Shift595SwitchRelay(void) {
}

void CmndShift595Devices(void) {
if ((XdrvMailbox.payload > 0) && (XdrvMailbox.payload <= 3)) {
if ((XdrvMailbox.payload > 0) && (XdrvMailbox.payload * 8 <= MAX_RELAYS_SET - Shift595->first)) {
Settings->shift595_device_count = (1 == XdrvMailbox.payload) ? SHIFT595_DEVICE_COUNT : XdrvMailbox.payload;
TasmotaGlobal.restart_flag = 2;
}
Expand Down

0 comments on commit 3ab8727

Please sign in to comment.