simplify startup display pattern, extend default timeout

This commit is contained in:
Wolfgang Hottgenroth
2016-09-12 10:56:08 +02:00
parent c0c7d2afd0
commit 56e23d237c
2 changed files with 3 additions and 9 deletions

View File

@ -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);

View File

@ -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();