aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2015-06-09 15:03:08 +0200
committerLars-Dominik Braun <lars@6xq.net>2015-06-09 15:03:08 +0200
commit712f08cafa689f37790fe6052a14a2d35475f58c (patch)
tree1f87da2337f817e35fdac58b000b7f1d6534ac81
parent339c4c7e3d9bcab5b64d0c5bbfcdf91933d09dea (diff)
downloadhourglass-master.tar.gz
hourglass-master.tar.bz2
hourglass-master.zip
ui: Default timer upon startup 3 minHEADmaster
-rw-r--r--ui.c5
1 files changed, 4 insertions, 1 deletions
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;