diff options
| author | Selene ToyKeeper | 2018-08-06 21:27:45 -0600 |
|---|---|---|
| committer | Selene ToyKeeper | 2018-08-06 21:27:45 -0600 |
| commit | ce2397cbe9ffd2e5f046f4a51a30becbce3b2fc4 (patch) | |
| tree | ab5b14203adad80505368f31f8dfa6a87a1cb356 /spaghetti-monster/fsm-standby.h | |
| parent | Made it easier to change ramp shape in bin/level_calc.py . (diff) | |
| parent | Added more driver types to Anduril. (diff) | |
| download | anduril-ce2397cbe9ffd2e5f046f4a51a30becbce3b2fc4.tar.gz anduril-ce2397cbe9ffd2e5f046f4a51a30becbce3b2fc4.tar.bz2 anduril-ce2397cbe9ffd2e5f046f4a51a30becbce3b2fc4.zip | |
merged updates from fsm branch, including RampingIOS V3 and Werner UIs...
... plus a bunch of other updates, fixes, improvements, etc.
Diffstat (limited to 'spaghetti-monster/fsm-standby.h')
| -rw-r--r-- | spaghetti-monster/fsm-standby.h | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/spaghetti-monster/fsm-standby.h b/spaghetti-monster/fsm-standby.h index 0b410fa..2cea080 100644 --- a/spaghetti-monster/fsm-standby.h +++ b/spaghetti-monster/fsm-standby.h @@ -25,6 +25,28 @@ // set this to nonzero to enter standby mode next time the system is idle volatile uint8_t go_to_standby = 0; +#ifdef TICK_DURING_STANDBY +#ifndef STANDBY_TICK_SPEED +#define STANDBY_TICK_SPEED 5 // every 0.512 s +/* + * From the Attiny85 manual: + * 0: 16 ms + * 1: 32 ms + * 2: 64 ms + * 3: 0.125 s + * 4: 0.25 s + * 5: 0.5 s + * 6: 1.0 s + * 7: 2.0 s + * 32: 4.0 s + * 33: 8.0 s + * (other values may have unexpected effects; not sure why the final bit is + * separated from the others, in the "32" position instead of "8", but that's + * how it is) + */ +#endif +#endif + #define standby_mode sleep_until_eswitch_pressed void sleep_until_eswitch_pressed(); @@ -34,6 +56,4 @@ void sleep_until_eswitch_pressed(); void idle_mode(); #endif -// TODO: half-sleep "twilight" mode with WDT on but running slowly - #endif |
