Add page indicator for OBP40
This commit is contained in:
parent
10d1046c82
commit
b728d6d643
|
@ -378,6 +378,7 @@ void displayFooter(CommonData &commonData) {
|
||||||
getdisplay().setFont(&Atari16px);
|
getdisplay().setFont(&Atari16px);
|
||||||
getdisplay().setTextColor(commonData.fgcolor);
|
getdisplay().setTextColor(commonData.fgcolor);
|
||||||
|
|
||||||
|
#ifdef HARDWARE_V21
|
||||||
// Frame around key icon area
|
// Frame around key icon area
|
||||||
if (! commonData.keylock) {
|
if (! commonData.keylock) {
|
||||||
// horizontal elements
|
// horizontal elements
|
||||||
|
@ -424,6 +425,21 @@ void displayFooter(CommonData &commonData) {
|
||||||
getdisplay().setCursor(65, 295);
|
getdisplay().setCursor(65, 295);
|
||||||
getdisplay().print("Press 1 and 6 fast to unlock keys");
|
getdisplay().print("Press 1 and 6 fast to unlock keys");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HARDWARE_LIGHT
|
||||||
|
// grapical page indicator
|
||||||
|
static const uint16_t r = 5;
|
||||||
|
static const uint16_t space = 4;
|
||||||
|
uint16_t w = commonData.data.maxpage * r * 2 + (commonData.data.maxpage - 1) * space;
|
||||||
|
uint16_t x0 = (GxEPD_WIDTH - w) / 2 + r * 2;
|
||||||
|
for (int i = 0; i < commonData.data.maxpage; i++) {
|
||||||
|
if (i == (commonData.data.actpage - 1)) {
|
||||||
|
getdisplay().fillCircle(x0 + i * (r * 2 + space), 290, r, commonData.fgcolor);
|
||||||
|
} else {
|
||||||
|
getdisplay().drawCircle(x0 + i * (r * 2 + space), 290, r, commonData.fgcolor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sunset und sunrise calculation
|
// Sunset und sunrise calculation
|
||||||
|
|
|
@ -688,12 +688,10 @@ void OBP60Task(GwApi *api){
|
||||||
}
|
}
|
||||||
//call the page code
|
//call the page code
|
||||||
LOG_DEBUG(GwLog::DEBUG,"calling page %d",pageNumber);
|
LOG_DEBUG(GwLog::DEBUG,"calling page %d",pageNumber);
|
||||||
#ifdef HARDWARE_V21
|
|
||||||
// Show footer if enabled (together with header)
|
// Show footer if enabled (together with header)
|
||||||
if (pages[pageNumber].description && pages[pageNumber].description->header){
|
if (pages[pageNumber].description && pages[pageNumber].description->header){
|
||||||
displayFooter(commonData);
|
displayFooter(commonData);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
currentPage->displayPage(pages[pageNumber].parameters);
|
currentPage->displayPage(pages[pageNumber].parameters);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue