[Taranis X9E] 2.5s Timer with small graphics for Power OFF

This commit is contained in:
bsongis
2015-03-20 11:34:48 +01:00
parent b80cc973fe
commit 5a2d373edd
6 changed files with 76 additions and 44 deletions
+3
View File
@@ -53,6 +53,9 @@ void displayScrollbar(coord_t x, coord_t y, coord_t h, uint16_t offset, uint16_t
void displayMenuBar(const MenuItem *menu, int index);
void displayProgressBar(const char *label);
void updateProgressBar(int num, int den);
#if defined(REV9E)
void displayShutdownProgress(uint32_t progress);
#endif
extern coord_t scrollbar_X;
#define SET_SCROLLBAR_X(x) scrollbar_X = (x);
+9
View File
@@ -63,6 +63,15 @@ void menu_lcd_onoff(coord_t x, coord_t y, uint8_t value, LcdFlags attr)
lcd_square(x, y, 7);
}
void displayShutdownProgress(uint32_t progress)
{
drawFilledRect((LCD_W-44)/2, LCD_H/2-5, 28, 10, SOLID, ERASE);
lcd_rect((LCD_W-44)/2, LCD_H/2-5, 28, 10);
for (int i=(progress/100); i>=0; i--) {
drawFilledRect((LCD_W-44)/2+3+i*8, LCD_H/2-3, 6, 6, SOLID);
}
}
void displayScreenIndex(uint8_t index, uint8_t count, uint8_t attr)
{
lcd_outdezAtt(LCD_W, 0, count, attr);