|
|
|
@ -9,8 +9,6 @@ |
|
|
|
|
|
|
|
|
|
void screen_program_prehled(GuiEvent event) |
|
|
|
|
{ |
|
|
|
|
char buf[100]; |
|
|
|
|
|
|
|
|
|
switch (event) { |
|
|
|
|
case GUI_EVENT_SCREEN_INIT: |
|
|
|
|
break; |
|
|
|
@ -19,28 +17,28 @@ void screen_program_prehled(GuiEvent event) |
|
|
|
|
LcdBuffer_Write(&lcd, 0, 0, "Zvolte slot ke změně"); |
|
|
|
|
|
|
|
|
|
if (settings_scratch.schedules[0].enable) { |
|
|
|
|
snprintf(buf, 100, "1. %02d:%02d ", settings_scratch.schedules[0].h, settings_scratch.schedules[0].m); |
|
|
|
|
snprintf(sbuf, sbuf_len, "1. %02d:%02d ", settings_scratch.schedules[0].h, settings_scratch.schedules[0].m); |
|
|
|
|
} else { |
|
|
|
|
snprintf(buf, 100, "1. --:-- "); |
|
|
|
|
snprintf(sbuf, sbuf_len, "1. --:-- "); |
|
|
|
|
} |
|
|
|
|
if (settings_scratch.schedules[2].enable) { |
|
|
|
|
snprintf(buf+10, 90, "3. %02d:%02d ", settings_scratch.schedules[2].h, settings_scratch.schedules[2].m); |
|
|
|
|
snprintf(sbuf+10, sbuf_len-10, "3. %02d:%02d ", settings_scratch.schedules[2].h, settings_scratch.schedules[2].m); |
|
|
|
|
} else { |
|
|
|
|
snprintf(buf+10, 90, "3. --:-- "); |
|
|
|
|
snprintf(sbuf+10, sbuf_len-10, "3. --:-- "); |
|
|
|
|
} |
|
|
|
|
LcdBuffer_Write(&lcd, 1, 0, buf); |
|
|
|
|
LcdBuffer_Write(&lcd, 1, 0, sbuf); |
|
|
|
|
|
|
|
|
|
if (settings_scratch.schedules[1].enable) { |
|
|
|
|
snprintf(buf, 100, "2. %02d:%02d ", settings_scratch.schedules[1].h, settings_scratch.schedules[1].m); |
|
|
|
|
snprintf(sbuf, sbuf_len, "2. %02d:%02d ", settings_scratch.schedules[1].h, settings_scratch.schedules[1].m); |
|
|
|
|
} else { |
|
|
|
|
snprintf(buf, 100, "2. --:-- "); |
|
|
|
|
snprintf(sbuf, sbuf_len, "2. --:-- "); |
|
|
|
|
} |
|
|
|
|
if (settings_scratch.schedules[3].enable) { |
|
|
|
|
snprintf(buf+10, 90, "4. %02d:%02d ", settings_scratch.schedules[3].h, settings_scratch.schedules[3].m); |
|
|
|
|
snprintf(sbuf+10, sbuf_len-10, "4. %02d:%02d ", settings_scratch.schedules[3].h, settings_scratch.schedules[3].m); |
|
|
|
|
} else { |
|
|
|
|
snprintf(buf+10, 90, "4. --:-- "); |
|
|
|
|
snprintf(sbuf+10, sbuf_len-10, "4. --:-- "); |
|
|
|
|
} |
|
|
|
|
LcdBuffer_Write(&lcd, 2, 0, buf); |
|
|
|
|
LcdBuffer_Write(&lcd, 2, 0, sbuf); |
|
|
|
|
|
|
|
|
|
LcdBuffer_Write(&lcd, 3, 0, "🅳Zpět"); |
|
|
|
|
break; |
|
|
|
|