From 712f08cafa689f37790fe6052a14a2d35475f58c Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Tue, 9 Jun 2015 15:03:08 +0200 Subject: ui: Default timer upon startup 3 min --- ui.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ui.c') diff --git a/ui.c b/ui.c index a284ade..f821ae0 100644 --- a/ui.c +++ b/ui.c @@ -55,6 +55,9 @@ THE SOFTWARE. #define FLASH_CONFIRM_FINE_OFF FLASH_ENTER_FINE_OFF #define FLASH_CONFIRM_FINE_NUM (2) +/* timer defaults to 3 min upon startup */ +#define DEFAULT_TIMER_VALUE ((uint32_t) 3*60*1000*1000) + /* UI modes, enum would take 16 bits */ typedef uint8_t uimode; /* initialize */ @@ -87,7 +90,7 @@ static uint8_t flashCount = 0; /* Temporary persistence while selecting */ static signed char coarseValue = 0, fineValue = 0; /* Actual elapsed/alarm time in us */ -static uint32_t timerElapsed, timerValue; +static uint32_t timerElapsed, timerValue = DEFAULT_TIMER_VALUE; static uint8_t brightness[PWM_LED_COUNT]; static uint8_t currLed; static horizon h = HORIZON_NONE; -- cgit v1.2.3