diff --git a/src/httpserver/http_fns.c b/src/httpserver/http_fns.c
index ed48c22ec..872542b07 100644
--- a/src/httpserver/http_fns.c
+++ b/src/httpserver/http_fns.c
@@ -155,6 +155,7 @@ int http_fn_index(http_request_t* request) {
int iValue;
bool bForceShowRGB;
const char* inputName;
+ int channelType;
bRawPWMs = CFG_HasFlag(OBK_FLAG_LED_RAWCHANNELSMODE);
bForceShowRGBCW = CFG_HasFlag(OBK_FLAG_LED_FORCESHOWRGBCWCONTROLLER);
@@ -271,7 +272,6 @@ int http_fn_index(http_request_t* request) {
poststr(request, "
"); //Table default to 100% width in stylesheet
for (i = 0; i < CHANNEL_MAX; i++) {
- int channelType;
channelType = CHANNEL_GetType(i);
// check ability to hide given channel from gui
@@ -294,7 +294,45 @@ int http_fn_index(http_request_t* request) {
}
}
poststr(request, "
");
+ poststr(request, ""); //Table default to 100% width in stylesheet
+ for (i = 0; i < CHANNEL_MAX; i++) {
+
+ // check ability to hide given channel from gui
+ if (BIT_CHECK(g_hiddenChannels, i)) {
+ continue; // hidden
+ }
+
+ channelType = CHANNEL_GetType(i);
+ if (h_isChannelRelay(i) || channelType == ChType_Toggle) {
+ const char* c;
+ const char *prefix;
+ if (i <= 1) {
+ hprintf255(request, "");
+ }
+ if (CHANNEL_Check(i)) {
+ c = "bgrn";
+ }
+ else {
+ c = "bred";
+ }
+ poststr(request, " | ", c, prefix, CHANNEL_GetLabel(i));
+ if (i == CHANNEL_MAX - 1) {
+ poststr(request, "
");
+ }
+ }
+ }
+ poststr(request, "
");
poststr(request, ""); //Table default to 100% width in stylesheet
for (i = 0; i < PLATFORM_GPIO_MAX; i++) {
int role;
@@ -318,7 +356,6 @@ int http_fn_index(http_request_t* request) {
}
for (i = 0; i < CHANNEL_MAX; i++) {
- int channelType;
// check ability to hide given channel from gui
if (BIT_CHECK(g_hiddenChannels, i)) {
@@ -570,31 +607,7 @@ int http_fn_index(http_request_t* request) {
poststr(request, "");
}
else if (h_isChannelRelay(i) || channelType == ChType_Toggle) {
- const char* c;
- const char *prefix;
- if (i <= 1) {
- hprintf255(request, "");
- }
- if (CHANNEL_Check(i)) {
- c = "bgrn";
- }
- else {
- c = "bred";
- }
- poststr(request, " | ", c, prefix, CHANNEL_GetLabel(i));
- if (i == CHANNEL_MAX - 1) {
- poststr(request, "
");
- }
+ // HANDLED ABOVE in previous loop
}
else if ((bRawPWMs && h_isChannelPWM(i)) || (channelType == ChType_Dimmer) || (channelType == ChType_Dimmer256) || (channelType == ChType_Dimmer1000)) {
int maxValue;