From c8a2494631671d602bfb4a7960291e29847239ef Mon Sep 17 00:00:00 2001 From: Adrian Scillato <35405447+ascillato@users.noreply.github.com> Date: Sun, 29 Apr 2018 03:44:01 -0300 Subject: [PATCH] Fix Bug to show all available toggle options Fix Bug to show all available toggle options --- sonoff/xdrv_11_knx.ino | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sonoff/xdrv_11_knx.ino b/sonoff/xdrv_11_knx.ino index f4df76d53..a2d5acf5c 100644 --- a/sonoff/xdrv_11_knx.ino +++ b/sonoff/xdrv_11_knx.ino @@ -741,9 +741,15 @@ void HandleKNXConfiguration() page.replace(F("GAarea"), F("CB_AREA")); page.replace(F("GAfdef"), F("CB_FDEF")); page += FPSTR(HTTP_FORM_KNX4); + + byte j; for (byte i = 0; i < KNX_MAX_device_param ; i++) { - if ( device_param[i].show ) + // Check How many Relays are available and add: RelayX and TogleRelayX + if ( (i > 8) && (i < 16) ) { j=i-8; } else { j=i; } + if ( i == 8 ) { j = 0; } + + if ( device_param[j].show ) { page += FPSTR(HTTP_FORM_KNX_OPT); page.replace(F("{vop}"), String(device_param[i].type));