From 4436bf39ed713b7f714b5beb8170e1a4259a835e Mon Sep 17 00:00:00 2001 From: Shane Synan Date: Mon, 12 Jul 2021 16:19:26 -0400 Subject: 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. --- spaghetti-monster/anduril/lockout-mode.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3