diff options
| -rw-r--r-- | spaghetti-monster/fsm-ramping.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spaghetti-monster/fsm-ramping.c b/spaghetti-monster/fsm-ramping.c index 1dbb969..082f8c9 100644 --- a/spaghetti-monster/fsm-ramping.c +++ b/spaghetti-monster/fsm-ramping.c @@ -85,7 +85,7 @@ void set_level(uint8_t level) { // correction is only necessary when PWM is fast if (level > HALFSPEED_LEVEL) { base_PWM = brightness - + ((brightness>>1) * triangle_wave(mytint) / 255); + + ((((uint16_t)brightness) * 26 / 64) * triangle_wave(mytint) / 255); } cool_PWM = (((uint16_t)mytint * (uint16_t)base_PWM) + 127) / 255; |
