mirror of https://github.com/arendst/Tasmota.git
Shitf595 dynamic device count (#22543)
* Make max Shift595 device count dynamic * Update xdrv_60_shift595.ino
This commit is contained in:
parent
e397c11e70
commit
3ab87273e6
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue