diff options
| author | Selene ToyKeeper | 2019-11-19 00:25:54 -0700 |
|---|---|---|
| committer | Selene ToyKeeper | 2019-11-19 00:25:54 -0700 |
| commit | bac2e2572bf2d12aed8f0eecdd2b47bf4c29c001 (patch) | |
| tree | 8c28d5c4f702739ed03c658503703a74fc7de261 /spaghetti-monster/fsm-main.c | |
| parent | fixed ADC cycles running 2X as fast as intended (diff) | |
| download | anduril-bac2e2572bf2d12aed8f0eecdd2b47bf4c29c001.tar.gz anduril-bac2e2572bf2d12aed8f0eecdd2b47bf4c29c001.tar.bz2 anduril-bac2e2572bf2d12aed8f0eecdd2b47bf4c29c001.zip | |
enabled prevent_reboot_loop() on all builds, to reduce the impact of any potential crashes
(even though I just fixed the only known bug which could trigger an unintentional reboot)
Diffstat (limited to 'spaghetti-monster/fsm-main.c')
| -rw-r--r-- | spaghetti-monster/fsm-main.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/spaghetti-monster/fsm-main.c b/spaghetti-monster/fsm-main.c index c9ab69b..d352a36 100644 --- a/spaghetti-monster/fsm-main.c +++ b/spaghetti-monster/fsm-main.c @@ -79,22 +79,24 @@ inline void hw_setup() { #endif -#ifdef USE_REBOOT -void prevent_reboot_loop() { +//#ifdef USE_REBOOT +static inline void prevent_reboot_loop() { // prevent WDT from rebooting MCU again MCUSR &= ~(1<<WDRF); // reset status flag wdt_disable(); } -#endif +//#endif int main() { // Don't allow interrupts while booting cli(); - #ifdef USE_REBOOT + //#ifdef USE_REBOOT + // prevents cycling after a crash, + // whether intentional (like factory reset) or not (bugs) prevent_reboot_loop(); - #endif + //#endif hw_setup(); |
