Lost changes

This commit is contained in:
Theo Arends 2017-12-16 20:11:12 +01:00
parent f9ce916e0b
commit ca643ab223
2 changed files with 8 additions and 2 deletions

View File

@ -339,6 +339,9 @@ void LightInit(void)
if (light_type < LT_PWM6) { // PWM if (light_type < LT_PWM6) { // PWM
for (byte i = 0; i < light_type; i++) { for (byte i = 0; i < light_type; i++) {
Settings.pwm_value[i] = 0; // Disable direct PWM control Settings.pwm_value[i] = 0; // Disable direct PWM control
if (pin[GPIO_PWM1 +i] < 99) {
pinMode(pin[GPIO_PWM1 +i], OUTPUT);
}
} }
if (LT_PWM1 == light_type) { if (LT_PWM1 == light_type) {
Settings.light_color[0] = 255; // One PWM channel only supports Dimmer but needs max color Settings.light_color[0] = 255; // One PWM channel only supports Dimmer but needs max color

View File

@ -59,6 +59,8 @@ void CounterUpdate4()
CounterUpdate(4); CounterUpdate(4);
} }
/********************************************************************************************/
void CounterSaveState() void CounterSaveState()
{ {
for (byte i = 0; i < MAX_COUNTERS; i++) { for (byte i = 0; i < MAX_COUNTERS; i++) {
@ -68,8 +70,6 @@ void CounterSaveState()
} }
} }
/********************************************************************************************/
void CounterInit() void CounterInit()
{ {
typedef void (*function) () ; typedef void (*function) () ;
@ -143,6 +143,9 @@ boolean Xsns01(byte function)
CounterShow(0); CounterShow(0);
break; break;
#endif // USE_WEBSERVER #endif // USE_WEBSERVER
case FUNC_XSNS_SAVE_STATE:
CounterSaveState();
break;
} }
return result; return result;
} }