aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster/fsm-ramping.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fixed a bug in gradual_tick(), I think.Selene ToyKeeper2017-09-101-2/+4
| | | | | | | | | | It was off by one, and caused actual_level to be off by one, which caused other parts of the code to do weird things... - end-of-ramp blink would happen repeatedly. - ramping up went slower (or not at all, with gradual_tick on each tick) - would sometimes trigger underheating code at moon level, and then glide up to the minimum regulation floor
* Rewrote gradual_tick(). Is smaller, better, and safer now.Selene ToyKeeper2017-09-091-116/+28
| | | | | Decreased gradual adjustment speed again to make thermal regulation less stair-stepped.
* Made thermal regulation adjust smoothly (1 PWM step at a time) to make ↵Selene ToyKeeper2017-09-091-0/+146
| | | | | | | | | | | adjustments less noticeable. Added set_level_gradually() and gradual_tick() to ramping lib. Not terribly happy with it yet, but it at least works in practice. Added extra thermal regulation checks because I was running into stupid behavior in edge cases. Increased lowest thermal stepdown level to MAX_LEVEL/3 because it was going down way too low before. (is still pretty low, but not quite as bad)
* Added a ramping UI example.Selene ToyKeeper2017-08-241-0/+62
Added ramping support in general.