From d34d0e7acb1f1e49d21af7cf1c9e08161ce95dd4 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Sun, 17 Sep 2023 04:37:25 -0600 Subject: fixed builds which weren't using set_level_zero() yet... - emisar-d4 - emisar-d4v2 - emisar-d4v2-nofet - emisar-d4sv2 - emisar-2ch - emisar-2ch-fet - noctigon-dm11-boost - noctigon-k1 - noctigon-kr4 - noctigon-kr4-nofet - sofirn-lt1s-pro ... and removed old build targets for d4sv2-tintramp, because it was replaced by emisar-2ch a while ago. --- hwdef-emisar-2ch-fet.c | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) (limited to 'hwdef-emisar-2ch-fet.c') diff --git a/hwdef-emisar-2ch-fet.c b/hwdef-emisar-2ch-fet.c index 7cf48d3..caf579d 100644 --- a/hwdef-emisar-2ch-fet.c +++ b/hwdef-emisar-2ch-fet.c @@ -7,6 +7,8 @@ #include "chan-rgbaux.c" +void set_level_zero(); + void set_level_ch1(uint8_t level); void set_level_ch2(uint8_t level); void set_level_both(uint8_t level); @@ -92,11 +94,11 @@ void set_pwms(uint8_t ch1_pwm, uint8_t ch2_pwm, uint8_t ch3_pwm, uint16_t top) { if (! was_on) PWM_CNT = 0; } -void set_level_ch1(uint8_t level) { - if (0 == level) - return set_pwms(0, 0, 0, PWM_TOP_INIT); +void set_level_zero() { + return set_pwms(0, 0, 0, PWM_TOP_INIT); +} - level --; +void set_level_ch1(uint8_t level) { uint8_t pwm1 = PWM_GET8 (pwm1_levels, level); uint8_t pwm3 = PWM_GET8 (pwm2_levels, level); uint16_t top = PWM_GET16(pwm3_levels, level); @@ -104,20 +106,12 @@ void set_level_ch1(uint8_t level) { } void set_level_ch2(uint8_t level) { - if (0 == level) - return set_pwms(0, 0, 0, PWM_TOP_INIT); - - level --; uint8_t pwm2 = PWM_GET8 (pwm4_levels, level); uint16_t top = PWM_GET16(pwm5_levels, level); set_pwms(0, pwm2, 0, top); } void set_level_both(uint8_t level) { - if (0 == level) - return set_pwms(0, 0, 0, PWM_TOP_INIT); - - level --; uint8_t pwm1 = PWM_GET8 (pwm1_levels, level); uint8_t pwm3 = PWM_GET8 (pwm2_levels, level); uint16_t top = PWM_GET16(pwm3_levels, level); @@ -125,10 +119,6 @@ void set_level_both(uint8_t level) { } void set_level_blend(uint8_t level) { - if (0 == level) - return set_pwms(0, 0, 0, PWM_TOP_INIT); - - level --; uint16_t pwm1, pwm2; uint8_t pwm3 = PWM_GET8 (pwm2_levels, level); // DD FET //uint16_t brightness = PWM_GET8 (pwm1_levels, level) << 1; @@ -142,10 +132,6 @@ void set_level_blend(uint8_t level) { } void set_level_auto(uint8_t level) { - if (0 == level) - return set_pwms(0, 0, 0, PWM_TOP_INIT); - - level --; uint16_t pwm1, pwm2; uint8_t brightness = PWM_GET8 (pwm4_levels, level); uint16_t top = PWM_GET16(pwm5_levels, level); -- cgit v1.2.3