Merge branch 'development' into release-7.1

This commit is contained in:
Theo Arends 2019-11-25 19:29:47 +01:00
commit c8de06814f
2 changed files with 6 additions and 5 deletions

View File

@ -118,6 +118,7 @@ People helping to keep the show on the road:
- Stephan Hadinger for refactoring light driver, enhancing HueEmulation and Zigbee support - Stephan Hadinger for refactoring light driver, enhancing HueEmulation and Zigbee support
- tmo for designing the official Tasmota logo - tmo for designing the official Tasmota logo
- Stefan Bode for his Shutter and Deep sleep drivers - Stefan Bode for his Shutter and Deep sleep drivers
- Jacek Ziółkowski for his [TDM](https://github.com/jziolkowski/tdm) management tool
- Many more providing Tips, Wips, Pocs, PRs and Donations - Many more providing Tips, Wips, Pocs, PRs and Donations
## License ## License

View File

@ -1070,17 +1070,17 @@ void HandleRoot(void)
'd', 0); // d0 - Value id is related to lc("d0", value) and WebGetArg("d0", tmp, sizeof(tmp)); 'd', 0); // d0 - Value id is related to lc("d0", value) and WebGetArg("d0", tmp, sizeof(tmp));
} else { // Settings.flag3.pwm_multi_channels - SetOption68 1 - Enable multi-channels PWM instead of Color PWM } else { // Settings.flag3.pwm_multi_channels - SetOption68 1 - Enable multi-channels PWM instead of Color PWM
uint32_t pwm_channels = light_subtype > LST_MAX ? LST_MAX : light_subtype; uint32_t pwm_channels = light_subtype > LST_MAX ? LST_MAX : light_subtype;
stemp[0] = 'd'; stemp[1] = '0'; stemp[2] = '\0'; // d0 stemp[0] = 'e'; stemp[1] = '0'; stemp[2] = '\0'; // d0
for (uint32_t i = 0; i < pwm_channels; i++) { for (uint32_t i = 0; i < pwm_channels; i++) {
stemp[1]++; // d1 to d5 - Make unique ids stemp[1]++; // e1 to e5 - Make unique ids
WSContentSend_P(HTTP_MSG_SLIDER_GRADIENT, // Channel brightness - Black to White WSContentSend_P(HTTP_MSG_SLIDER_GRADIENT, // Channel brightness - Black to White
stemp, // d1 to d5 - Unique HTML id stemp, // e1 to e5 - Unique HTML id
"#000", "#fff", // Black to White "#000", "#fff", // Black to White
i+1, // sl1 to sl5 - Unique range HTML id - Not used i+1, // sl1 to sl5 - Unique range HTML id - Not used
1, 100, // Range 1 to 100% 1, 100, // Range 1 to 100%
changeUIntScale(Settings.light_color[i], 0, 255, 0, 100), changeUIntScale(Settings.light_color[i], 0, 255, 0, 100),
'd', i+1); // d1 to d5 - Value id 'e', i+1); // e1 to e5 - Value id
} }
} // Settings.flag3.pwm_multi_channels } // Settings.flag3.pwm_multi_channels
} }
@ -1192,7 +1192,7 @@ bool HandleRootStatusRefresh(void)
} }
uint32_t pwm_channels = (light_type & 7) > LST_MAX ? LST_MAX : (light_type & 7); uint32_t pwm_channels = (light_type & 7) > LST_MAX ? LST_MAX : (light_type & 7);
for (uint32_t j = 1; j <= pwm_channels; j++) { for (uint32_t j = 1; j <= pwm_channels; j++) {
snprintf_P(webindex, sizeof(webindex), PSTR("d%d"), j); snprintf_P(webindex, sizeof(webindex), PSTR("e%d"), j);
WebGetArg(webindex, tmp, sizeof(tmp)); // 0 - 100 percent WebGetArg(webindex, tmp, sizeof(tmp)); // 0 - 100 percent
if (strlen(tmp)) { if (strlen(tmp)) {
snprintf_P(svalue, sizeof(svalue), PSTR(D_CMND_CHANNEL "%d %s"), j, tmp); snprintf_P(svalue, sizeof(svalue), PSTR(D_CMND_CHANNEL "%d %s"), j, tmp);