aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSelene ToyKeeper2018-06-27 03:40:34 -0600
committerSelene ToyKeeper2018-06-27 03:40:34 -0600
commit5391d0364c37013845b83c8dec2862f317fce0fa (patch)
treed04815372408fbfc8e23467fd504f0cc8c3735e3
parentmerged FSM upstream changes (diff)
downloadanduril-5391d0364c37013845b83c8dec2862f317fce0fa.tar.gz
anduril-5391d0364c37013845b83c8dec2862f317fce0fa.tar.bz2
anduril-5391d0364c37013845b83c8dec2862f317fce0fa.zip
Ramp down even faster on high modes. Actually save to eeprom after config modes.
-rw-r--r--spaghetti-monster/anduril/rampingiosv3.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/spaghetti-monster/anduril/rampingiosv3.c b/spaghetti-monster/anduril/rampingiosv3.c
index e4fae2d..1afcbb0 100644
--- a/spaghetti-monster/anduril/rampingiosv3.c
+++ b/spaghetti-monster/anduril/rampingiosv3.c
@@ -33,7 +33,7 @@
#ifdef MAX_Nx7135
#define THERM_DOUBLE_SPEED_LEVEL MAX_Nx7135 // throttle back faster when high
#else
-#define THERM_DOUBLE_SPEED_LEVEL (RAMP_LENGTH*4/5) // throttle back faster when high
+#define THERM_DOUBLE_SPEED_LEVEL (RAMP_SIZE*4/5) // throttle back faster when high
#endif
#ifdef USE_THERMAL_REGULATION
#define USE_SET_LEVEL_GRADUALLY // isn't used except for thermal adjustments
@@ -541,6 +541,8 @@ uint8_t steady_state(EventPtr event, uint16_t arg) {
diff = actual_level - target_level;
}
uint8_t magnitude = 0;
+ // if we're on a really high mode, drop faster
+ if (actual_level >= THERM_DOUBLE_SPEED_LEVEL) { magnitude ++; }
while (diff) {
magnitude ++;
diff >>= 1;
@@ -809,6 +811,7 @@ uint8_t config_state_base(EventPtr event, uint16_t arg,
else {
// TODO: blink out some sort of success pattern
savefunc();
+ save_config();
//set_state(retstate, retval);
pop_state();
}
If you find this content useful please consider a small donation via bitcoin: bitcoin:1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2?amount=0.001&message=Donation Scraping git contents via cgit is very resource intensive. The continued hosting of these git repositories is entirely financed by your bitcoin contributions. For donations of a least 1 mBTC you include your IP address in the message of your bitcoin donation. This will remove this message in the future for requests from your IP, which will significantly reduce token usage. In any case, any contributions to bitcoin address 1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2 are very welcome. Thanks in advance for you contribution to a self-sustaining ecosystem.