From 56e23d237c38d1b7503e0e3bed710942c5eb04c8 Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Mon, 12 Sep 2016 10:56:08 +0200 Subject: [PATCH] simplify startup display pattern, extend default timeout --- src/display.c | 10 ++-------- src/main.c | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/display.c b/src/display.c index e32173e..f8613da 100644 --- a/src/display.c +++ b/src/display.c @@ -55,14 +55,8 @@ uint8_t digitValues[] = { EMPTY_ID, EMPTY_ID, EMPTY_ID }; void displayInit(void *handleArg) { - for (tPin d = DIGIT_0; d <= DIGIT_2; d++) { - gpioSetPin(d, LOW); - for (tPin s = SEG_A; s <= SEG_F; s++) { - gpioSetPin(s, HIGH); - ms_active_delay(INIT_CYCLE_DELAY); - gpioSetPin(s, LOW); - } - gpioSetPin(d, HIGH); + for (tPin s = SEG_A; s <= SEG_F; s++) { + gpioSetPin(s, LOW); } for (tPin d = DIGIT_2; d >= DIGIT_0; d--) { gpioSetPin(d, LOW); diff --git a/src/main.c b/src/main.c index 914c99b..307016a 100644 --- a/src/main.c +++ b/src/main.c @@ -41,7 +41,7 @@ int main() { timeInit(); schInit(); - schAdd(powerDown, NULL, 600000, 0); + schAdd(powerDown, NULL, 1800000, 0); // default thermometer power down timeout: 30min // interrupts are required for delay function in displayInit(); __enable_interrupt();