aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
authorSelene ToyKeeper2017-09-24 20:56:52 -0600
committerSelene ToyKeeper2017-09-24 20:56:52 -0600
commit08082855cbc7aa0a07f9ddfe6daa86e6c96d5b57 (patch)
treeac9982d30edced7ecff8e9546fcc1894488b4515 /spaghetti-monster
parentAdded idle_mode() for slightly lower power use without turning off any regula... (diff)
downloadanduril-08082855cbc7aa0a07f9ddfe6daa86e6c96d5b57.tar.gz
anduril-08082855cbc7aa0a07f9ddfe6daa86e6c96d5b57.tar.bz2
anduril-08082855cbc7aa0a07f9ddfe6daa86e6c96d5b57.zip
Removed unused code from first idle_mode(); experiment.
Diffstat (limited to 'spaghetti-monster')
-rw-r--r--spaghetti-monster/anduril/anduril.c3
-rw-r--r--spaghetti-monster/fsm-main.c20
-rw-r--r--spaghetti-monster/fsm-standby.h3
3 files changed, 1 insertions, 25 deletions
diff --git a/spaghetti-monster/anduril/anduril.c b/spaghetti-monster/anduril/anduril.c
index d15b5cb..b7c4421 100644
--- a/spaghetti-monster/anduril/anduril.c
+++ b/spaghetti-monster/anduril/anduril.c
@@ -329,9 +329,6 @@ uint8_t steady_state(EventPtr event, uint16_t arg) {
if (!(arg & 7)) gradual_tick();
//if (!(arg & 3)) gradual_tick();
//gradual_tick();
- #ifdef USE_IDLE_MODE
- // go_to_idle = 1; // use less power when nothing is happening
- #endif
return MISCHIEF_MANAGED;
}
#endif
diff --git a/spaghetti-monster/fsm-main.c b/spaghetti-monster/fsm-main.c
index a47a4bf..bc41cd6 100644
--- a/spaghetti-monster/fsm-main.c
+++ b/spaghetti-monster/fsm-main.c
@@ -39,8 +39,6 @@ ISR(TIMER1_COMPA_vect) {
int main() {
// Don't allow interrupts while booting
cli();
- //WDT_off();
- //PCINT_off();
// configure PWM channels
#if PWM_CHANNELS >= 1
@@ -72,13 +70,6 @@ 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);
-
- // Read config values and saved state
-
- // TODO: handle long press vs short press (or even medium press)?
-
#ifdef USE_DEBUG_BLINK
//debug_blink(1);
#endif
@@ -133,17 +124,6 @@ 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();
diff --git a/spaghetti-monster/fsm-standby.h b/spaghetti-monster/fsm-standby.h
index 3a917fd..0b410fa 100644
--- a/spaghetti-monster/fsm-standby.h
+++ b/spaghetti-monster/fsm-standby.h
@@ -29,9 +29,8 @@ volatile uint8_t go_to_standby = 0;
void sleep_until_eswitch_pressed();
#ifdef USE_IDLE_MODE
-// deferred "idle" state trigger
// stops processing until next click or timer tick
-//volatile uint8_t go_to_idle = 0;
+// (I think)
void idle_mode();
#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.