simplify startup display pattern, extend default timeout
This commit is contained in:
@ -55,14 +55,8 @@ uint8_t digitValues[] = { EMPTY_ID, EMPTY_ID, EMPTY_ID };
|
|||||||
|
|
||||||
|
|
||||||
void displayInit(void *handleArg) {
|
void displayInit(void *handleArg) {
|
||||||
for (tPin d = DIGIT_0; d <= DIGIT_2; d++) {
|
for (tPin s = SEG_A; s <= SEG_F; s++) {
|
||||||
gpioSetPin(d, LOW);
|
gpioSetPin(s, 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 d = DIGIT_2; d >= DIGIT_0; d--) {
|
for (tPin d = DIGIT_2; d >= DIGIT_0; d--) {
|
||||||
gpioSetPin(d, LOW);
|
gpioSetPin(d, LOW);
|
||||||
|
@ -41,7 +41,7 @@ int main() {
|
|||||||
timeInit();
|
timeInit();
|
||||||
schInit();
|
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();
|
// interrupts are required for delay function in displayInit();
|
||||||
__enable_interrupt();
|
__enable_interrupt();
|
||||||
|
Reference in New Issue
Block a user