diff options
| author | Selene ToyKeeper | 2020-03-26 03:46:47 -0600 |
|---|---|---|
| committer | Selene ToyKeeper | 2020-03-26 03:46:47 -0600 |
| commit | ef1d96b85485000e70ef5423c9494eb91286d3d7 (patch) | |
| tree | 4b2963bf3670c109a2c8f836f26b314520e4c04c /spaghetti-monster/fsm-adc.c | |
| parent | added dynamic underclocking to KR4 to increase moon runtime, fixed ramp miles... (diff) | |
| download | anduril-ef1d96b85485000e70ef5423c9494eb91286d3d7.tar.gz anduril-ef1d96b85485000e70ef5423c9494eb91286d3d7.tar.bz2 anduril-ef1d96b85485000e70ef5423c9494eb91286d3d7.zip | |
made thermal regulation use a smaller target window, and prioritize cooling more
Diffstat (limited to 'spaghetti-monster/fsm-adc.c')
| -rw-r--r-- | spaghetti-monster/fsm-adc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spaghetti-monster/fsm-adc.c b/spaghetti-monster/fsm-adc.c index e7b7feb..edf1809 100644 --- a/spaghetti-monster/fsm-adc.c +++ b/spaghetti-monster/fsm-adc.c @@ -362,7 +362,7 @@ static inline void ADC_temperature_handler() { // (but a diff of 1 C should only send a warning of magnitude 1) // (this also makes it only respond to small errors at the time the error // happened, not after the temperature has stabilized) - for(uint8_t foo=0; foo<5; foo++) { + for(uint8_t foo=0; foo<3; foo++) { if (offset > 0) { offset --; } else if (offset < 0) { @@ -371,8 +371,8 @@ static inline void ADC_temperature_handler() { } // Too hot? - // (if it's too hot and still getting warmer...) - if ((offset > 0) && (diff > 0)) { + // (if it's too hot and not getting cooler...) + if ((offset > 0) && (diff > -1)) { // accumulated error isn't big enough yet to send a warning if (warning_threshold > 0) { warning_threshold -= offset; |
