From d3edf9e7cdaab9347e0d8709ce7bff363a4cb48f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Tue, 2 Jan 2018 14:08:29 +0100 Subject: [PATCH] Fix uninitialized muxes for dimmer lights (#356) --- code/espurna/libs/pwm.h | 2 +- code/espurna/light.ino | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/code/espurna/libs/pwm.h b/code/espurna/libs/pwm.h index 1f26a1af..bf5605fb 100755 --- a/code/espurna/libs/pwm.h +++ b/code/espurna/libs/pwm.h @@ -9,7 +9,7 @@ /*NOTE!! : DO NOT CHANGE THIS FILE*/ /*SUPPORT UP TO 8 PWM CHANNEL*/ -#define PWM_CHANNEL_NUM_MAX 8 +//#define PWM_CHANNEL_NUM_MAX 8 struct pwm_param { uint32 period; diff --git a/code/espurna/light.ino b/code/espurna/light.ino index 7565f959..3200fcd2 100644 --- a/code/espurna/light.ino +++ b/code/espurna/light.ino @@ -13,6 +13,7 @@ Copyright (C) 2016-2017 by Xose PĂ©rez #include #if LIGHT_PROVIDER == LIGHT_PROVIDER_DIMMER +#define PWM_CHANNEL_NUM_MAX LIGHT_CHANNELS extern "C" { #include "libs/pwm.h" }