mirror of https://github.com/arendst/Tasmota.git
Fix compilation
This commit is contained in:
parent
8bd6a7eabc
commit
522abfbf1f
|
@ -2087,6 +2087,11 @@ void LightApplyPower(uint8_t new_color[LST_MAX], power_t power) {
|
||||||
void LightSetOutputs(const uint16_t *cur_col_10) {
|
void LightSetOutputs(const uint16_t *cur_col_10) {
|
||||||
// now apply the actual PWM values, adjusted and remapped 10-bits range
|
// now apply the actual PWM values, adjusted and remapped 10-bits range
|
||||||
if (TasmotaGlobal.light_type < LT_PWM6) { // only for direct PWM lights, not for Tuya, Armtronix...
|
if (TasmotaGlobal.light_type < LT_PWM6) { // only for direct PWM lights, not for Tuya, Armtronix...
|
||||||
|
#ifdef ESP32
|
||||||
|
uint32_t pwm_phase = 0; // dephase each PWM channel with the value of the previous
|
||||||
|
uint32_t pwm_modulus = (1 << _pwm_bit_num) - 1; // 1023
|
||||||
|
#endif // ESP32
|
||||||
|
|
||||||
#ifdef USE_PWM_DIMMER
|
#ifdef USE_PWM_DIMMER
|
||||||
uint16_t max_col = 0;
|
uint16_t max_col = 0;
|
||||||
#ifdef USE_I2C
|
#ifdef USE_I2C
|
||||||
|
@ -2099,10 +2104,6 @@ void LightSetOutputs(const uint16_t *cur_col_10) {
|
||||||
} else
|
} else
|
||||||
#endif // USE_I2C
|
#endif // USE_I2C
|
||||||
#endif // USE_PWM_DIMMER
|
#endif // USE_PWM_DIMMER
|
||||||
uint32_t pwm_phase = 0; // dephase each PWM channel with the value of the previous
|
|
||||||
#ifdef ESP32
|
|
||||||
uint32_t pwm_modulus = (1 << _pwm_bit_num) - 1; // 1023
|
|
||||||
#endif // ESP32
|
|
||||||
for (uint32_t i = 0; i < (Light.subtype - Light.pwm_offset); i++) {
|
for (uint32_t i = 0; i < (Light.subtype - Light.pwm_offset); i++) {
|
||||||
uint16_t cur_col = cur_col_10[i + Light.pwm_offset];
|
uint16_t cur_col = cur_col_10[i + Light.pwm_offset];
|
||||||
#ifdef USE_PWM_DIMMER
|
#ifdef USE_PWM_DIMMER
|
||||||
|
|
Loading…
Reference in New Issue