aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
authorShane Synan2021-07-12 16:19:26 -0400
committerShane Synan2021-07-12 16:19:26 -0400
commit4436bf39ed713b7f714b5beb8170e1a4259a835e (patch)
treeff75907596b57d7fecaf80b7ffdba4e9a727afc8 /spaghetti-monster
parentrewrote hybrid memory (manual memory timer) to eliminate corner cases (diff)
downloadanduril-4436bf39ed713b7f714b5beb8170e1a4259a835e.tar.gz
anduril-4436bf39ed713b7f714b5beb8170e1a4259a835e.tar.bz2
anduril-4436bf39ed713b7f714b5beb8170e1a4259a835e.zip
add configurable #define DEFAULT_AUTOLOCK_TIME
Added a new #define DEFAULT_AUTOLOCK_TIME to simplify compiling firmware with the autolock timer enabled by default. If this is not specified, the autolock timer remains disabled by default. This removes the need to modify lockout-mode.h directly.
Diffstat (limited to 'spaghetti-monster')
-rw-r--r--spaghetti-monster/anduril/lockout-mode.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/spaghetti-monster/anduril/lockout-mode.h b/spaghetti-monster/anduril/lockout-mode.h
index 021d34a..1c9c081 100644
--- a/spaghetti-monster/anduril/lockout-mode.h
+++ b/spaghetti-monster/anduril/lockout-mode.h
@@ -24,7 +24,10 @@
uint8_t lockout_state(Event event, uint16_t arg);
#ifdef USE_AUTOLOCK
-uint8_t autolock_time = 0;
+#ifndef DEFAULT_AUTOLOCK_TIME
+#define DEFAULT_AUTOLOCK_TIME 0 // autolock time in minutes, 0 = disabled
+#endif
+uint8_t autolock_time = DEFAULT_AUTOLOCK_TIME;
uint8_t autolock_config_state(Event event, uint16_t arg);
#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.