Reduce the max count of devices to never exceed MAX_RELAYS

This commit is contained in:
jziolkowski 2021-12-04 18:12:41 +01:00
parent d855cc22a0
commit 8288d74bb2
1 changed files with 1 additions and 1 deletions

View File

@ -83,7 +83,7 @@ void Shift595SwitchRelay(void)
} }
void CmndShift595Devices(void) { void CmndShift595Devices(void) {
if ((XdrvMailbox.payload > 0) && (XdrvMailbox.payload <= 4)) { if ((XdrvMailbox.payload > 0) && (XdrvMailbox.payload <= 3)) {
Settings->shift595_device_count = (1 == XdrvMailbox.payload) ? SHIFT595_DEVICE_COUNT : XdrvMailbox.payload; Settings->shift595_device_count = (1 == XdrvMailbox.payload) ? SHIFT595_DEVICE_COUNT : XdrvMailbox.payload;
TasmotaGlobal.restart_flag = 2; TasmotaGlobal.restart_flag = 2;
} }