aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster/fsm-ramping.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Moved indicator_led() from Anduril into FSM. Made it auto-set indicator ↵Selene ToyKeeper2017-10-211-0/+7
| | | | | | | | | level based on ramp level. Made Anduril configure voltage fudge and indicator LED functions based on driver type. Removed "ticks_spent_awake" thing since it's redundant. EV_tick arg does the same thing in fewer bytes. Rearranged some clauses in off_state to put events in a more coherent order.
* Added dynamic underclocking to FSM, instead of doing it manually in Anduril.Selene ToyKeeper2017-09-261-0/+3
|
* 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.