diff options
| author | Selene ToyKeeper | 2021-10-25 12:15:14 -0600 |
|---|---|---|
| committer | Selene ToyKeeper | 2021-10-25 12:15:14 -0600 |
| commit | cb735ab69b7c9f43ef30dec30110107068f3e267 (patch) | |
| tree | dba9b081b362c66b6e471abcd918fbbe973b1256 /spaghetti-monster | |
| parent | don't blink when toggling tint (diff) | |
| download | anduril-cb735ab69b7c9f43ef30dec30110107068f3e267.tar.gz anduril-cb735ab69b7c9f43ef30dec30110107068f3e267.tar.bz2 anduril-cb735ab69b7c9f43ef30dec30110107068f3e267.zip | |
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.
Diffstat (limited to 'spaghetti-monster')
| -rw-r--r-- | spaghetti-monster/fsm-ramping.c | 2 |
1 files changed, 2 insertions, 0 deletions
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 |
