From cb735ab69b7c9f43ef30dec30110107068f3e267 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Mon, 25 Oct 2021 12:15:14 -0600 Subject: fixed too-slow thermal regulation bug introduced in d4sv2-tintramp branch (2021-09-10 r619.1.11) The gradual_target var was getting clobbered and causing thermal regulation to stop until the next thermal warning event, every time it reached a new ramp step. So... save/restore it to prevent it from getting clobbered. --- spaghetti-monster/fsm-ramping.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'spaghetti-monster') diff --git a/spaghetti-monster/fsm-ramping.c b/spaghetti-monster/fsm-ramping.c index e8fcde7..05c2e0e 100644 --- a/spaghetti-monster/fsm-ramping.c +++ b/spaghetti-monster/fsm-ramping.c @@ -267,7 +267,9 @@ void gradual_tick() { ) { //actual_level = gt + 1; + uint8_t orig = gradual_target; set_level(gt + 1); + gradual_target = orig; } // is handled in set_level() //#ifdef USE_TINT_RAMPING -- cgit v1.2.3