aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
authorSelene ToyKeeper2019-11-19 00:25:54 -0700
committerSelene ToyKeeper2019-11-19 00:25:54 -0700
commitbac2e2572bf2d12aed8f0eecdd2b47bf4c29c001 (patch)
tree8c28d5c4f702739ed03c658503703a74fc7de261 /spaghetti-monster
parentfixed ADC cycles running 2X as fast as intended (diff)
downloadanduril-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')
-rw-r--r--spaghetti-monster/fsm-main.c12
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();
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.