diff options
| author | Selene ToyKeeper | 2018-06-30 19:42:05 -0600 |
|---|---|---|
| committer | Selene ToyKeeper | 2018-06-30 19:42:05 -0600 |
| commit | 667d789caf9b425f2fb1105d47b8aff8c2091ecb (patch) | |
| tree | 845153e0ba1646a190e9a9059ac6f5d103d7b169 /spaghetti-monster | |
| parent | Fixed thermal regulation bug, where it used the wrong target to determine adj... (diff) | |
| download | anduril-667d789caf9b425f2fb1105d47b8aff8c2091ecb.tar.gz anduril-667d789caf9b425f2fb1105d47b8aff8c2091ecb.tar.bz2 anduril-667d789caf9b425f2fb1105d47b8aff8c2091ecb.zip | |
Fixed bug: moon mode flickered a bit in momentary mode
due to constant MCU clock speed adjustments.
(also, reduced code size and made it harder for similar bugs to appear in the future)
Diffstat (limited to 'spaghetti-monster')
| -rw-r--r-- | spaghetti-monster/anduril/anduril.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/spaghetti-monster/anduril/anduril.c b/spaghetti-monster/anduril/anduril.c index 0766361..ab6a0af 100644 --- a/spaghetti-monster/anduril/anduril.c +++ b/spaghetti-monster/anduril/anduril.c @@ -1670,16 +1670,6 @@ void loop() { #endif if (0) {} - #ifdef USE_IDLE_MODE - else if ( (state == steady_state) - || (state == off_state) - || (state == lockout_state) - || (state == goodnight_state) ) { - // doze until next clock tick - idle_mode(); - } - #endif - if (state == strobe_state) { uint8_t st = strobe_type; // bike flasher @@ -1777,4 +1767,12 @@ void loop() { set_level(0); nice_delay_ms(((beacon_seconds) * 1000) - 500); } + + #ifdef USE_IDLE_MODE + else { + // doze until next clock tick + idle_mode(); + } + #endif + } |
