Skip to content

Commit

Permalink
Tweak sliders
Browse files Browse the repository at this point in the history
  • Loading branch information
arendst committed Nov 24, 2019
1 parent fd9971c commit a0a8197
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tasmota/xdrv_01_webserver.ino
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ const char HTTP_HEAD_STYLE1[] PROGMEM =
"p{margin:0.5em 0;}"
"input{width:100%%;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;background:#%06x;color:#%06x;}" // COLOR_INPUT, COLOR_INPUT_TEXT
"input[type=checkbox],input[type=radio]{width:1em;margin-right:6px;vertical-align:-1px;}"
"input[type=range]{width:99%%;}"
"select{width:100%%;background:#%06x;color:#%06x;}" // COLOR_INPUT, COLOR_INPUT_TEXT
"textarea{resize:none;width:98%%;height:318px;padding:5px;overflow:auto;background:#%06x;color:#%06x;}" // COLOR_CONSOLE, COLOR_CONSOLE_TEXT
"body{text-align:center;font-family:verdana,sans-serif;background:#%06x;}" // COLOR_BACKGROUND
Expand Down Expand Up @@ -520,7 +521,6 @@ const char kUploadErrors[] PROGMEM =
"|" D_UPLOAD_ERR_10 "|" D_UPLOAD_ERR_11 "|" D_UPLOAD_ERR_12 "|" D_UPLOAD_ERR_13
#endif
;
const char kChannelColors[] PROGMEM = "#f00|#0f0|#00f|#fff|#ff0"; // Red, Green, Blue, ColdWhite, WarmWhite

const uint16_t DNS_PORT = 53;
enum HttpOptions {HTTP_OFF, HTTP_USER, HTTP_ADMIN, HTTP_MANAGER, HTTP_MANAGER_RESET_ONLY};
Expand Down Expand Up @@ -1031,8 +1031,7 @@ void HandleRoot(void)
uint32_t pwm_channels = light_subtype > LST_MAX ? LST_MAX : light_subtype;
for (uint32_t i = 0; i < pwm_channels; i++) {
uint8_t index = (pwm_channels < 3) ? i +3 : i;
WSContentSend_P(HTTP_MSG_SLIDER_CHANNEL, GetTextIndexed(stemp, sizeof(stemp), index, kChannelColors),
changeUIntScale(Settings.light_color[i], 0, 255, 0, 100), i+1); // Dark to Light
WSContentSend_P(HTTP_MSG_SLIDER_CHANNEL, "#fff", changeUIntScale(Settings.light_color[i], 0, 255, 0, 100), i+1); // Dark to Light
}
} // Settings.flag3.pwm_multi_channels
}
Expand Down

0 comments on commit a0a8197

Please sign in to comment.