From 1961c3a6950cefa05cdb6e4b0d1967371f7da9f4 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Tue, 14 May 2019 03:16:33 -0600 Subject: the lantern middle-tint power correction factor wasn't quite right... ... so I adjusted it to make the result closer to a flat curve --- spaghetti-monster/fsm-ramping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'spaghetti-monster') 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; -- cgit v1.2.3