aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster/fsm-main.c
diff options
context:
space:
mode:
authorSelene ToyKeeper2017-09-24 20:54:07 -0600
committerSelene ToyKeeper2017-09-24 20:54:07 -0600
commit520f5cdb983045c5518325f3c3665f59ca85435e (patch)
treedb05070d81d080743555075150e8133c6e5e84dd /spaghetti-monster/fsm-main.c
parentForgot to include a copy of the GPL before. (diff)
downloadanduril-520f5cdb983045c5518325f3c3665f59ca85435e.tar.gz
anduril-520f5cdb983045c5518325f3c3665f59ca85435e.tar.bz2
anduril-520f5cdb983045c5518325f3c3665f59ca85435e.zip
Added idle_mode() for slightly lower power use without turning off any regular functions.
(PWM, ADC, WDT all still enabled; only useful in moon mode) Changed default ceilings in Anduril FW3A config.
Diffstat (limited to '')
-rw-r--r--spaghetti-monster/fsm-main.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/spaghetti-monster/fsm-main.c b/spaghetti-monster/fsm-main.c
index d526455..a47a4bf 100644
--- a/spaghetti-monster/fsm-main.c
+++ b/spaghetti-monster/fsm-main.c
@@ -72,8 +72,8 @@ int main() {
PORTB = (1 << SWITCH_PIN); // e-switch is the only input
PCMSK = (1 << SWITCH_PIN); // pin change interrupt uses this pin
- // configure sleep mode
- set_sleep_mode(SLEEP_MODE_PWR_DOWN);
+ //// configure sleep mode
+ //set_sleep_mode(SLEEP_MODE_PWR_DOWN);
// Read config values and saved state
@@ -133,8 +133,20 @@ int main() {
standby_mode();
}
+ #ifdef USE_IDLE_MODE
+ /*
+ // enter idle mode if requested
+ // (works better if deferred like this)
+ if (go_to_idle) {
+ go_to_idle = 0;
+ idle_mode();
+ }
+ */
+ #endif
+
// give the recipe some time slices
loop();
+
}
}