aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
authorSelene ToyKeeper2020-07-31 20:13:42 -0600
committerSelene ToyKeeper2020-07-31 20:13:42 -0600
commit41d2a02a8c1b41a118e24058e4ee5fd36a171e57 (patch)
treee65420ce7bd5bbeb6d73f256214c1cc4c607e6c6 /spaghetti-monster
parentadded auto-lock function, mostly contributed by SammysHP (diff)
downloadanduril-41d2a02a8c1b41a118e24058e4ee5fd36a171e57.tar.gz
anduril-41d2a02a8c1b41a118e24058e4ee5fd36a171e57.tar.bz2
anduril-41d2a02a8c1b41a118e24058e4ee5fd36a171e57.zip
fixed bug: sunset timer didn't adjust MCU clock speed at low levels,
so the moon level was way too dim and used too much power also fixed some sunset timer comments
Diffstat (limited to 'spaghetti-monster')
-rw-r--r--spaghetti-monster/anduril/sunset-timer.c6
-rw-r--r--spaghetti-monster/fsm-ramping.c3
2 files changed, 6 insertions, 3 deletions
diff --git a/spaghetti-monster/anduril/sunset-timer.c b/spaghetti-monster/anduril/sunset-timer.c
index 7340ff1..55da935 100644
--- a/spaghetti-monster/anduril/sunset-timer.c
+++ b/spaghetti-monster/anduril/sunset-timer.c
@@ -24,7 +24,7 @@
uint8_t sunset_timer_state(Event event, uint16_t arg) {
- // blink on start
+ // reset on start
if (event == EV_enter_state) {
sunset_timer = 0;
sunset_ticks = 0;
@@ -42,7 +42,7 @@ uint8_t sunset_timer_state(Event event, uint16_t arg) {
else if (event == EV_click4_hold) {
if (0 == (arg % TICKS_PER_SECOND)) {
if (sunset_timer < (255 - SUNSET_TIMER_UNIT)) {
- // add 30m to the timer
+ // add a few minutes to the timer
sunset_timer += SUNSET_TIMER_UNIT;
sunset_timer_peak = sunset_timer; // reset ceiling
sunset_ticks = 0; // reset phase
@@ -57,7 +57,7 @@ uint8_t sunset_timer_state(Event event, uint16_t arg) {
}
return MISCHIEF_MANAGED;
}
- // tick: step down (maybe) or off (maybe)
+ // tick: count down until time expires
else if (event == EV_tick) {
// time passed
sunset_ticks ++;
diff --git a/spaghetti-monster/fsm-ramping.c b/spaghetti-monster/fsm-ramping.c
index c3ad8b4..6c6d0cb 100644
--- a/spaghetti-monster/fsm-ramping.c
+++ b/spaghetti-monster/fsm-ramping.c
@@ -200,6 +200,9 @@ void gradual_tick() {
{
actual_level = gt + 1;
}
+ #ifdef USE_DYNAMIC_UNDERCLOCKING
+ auto_clock_speed();
+ #endif
}
#endif
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.