3djc/rssi poweroff safety (#5126)

Shutdown RSSI Alert
This commit is contained in:
Bertrand Songis
2017-08-01 14:13:25 +02:00
committed by GitHub
parent a7524ba74d
commit 7434e330c8
35 changed files with 1033 additions and 893 deletions
+4 -1
View File
@@ -40,12 +40,15 @@ const pm_uchar bmp_shutdown[] PROGMEM = {
#define SHUTDOWN_BITMAP_WIDTH 60
#define SHUTDOWN_BITMAP_HEIGHT 60
void drawShutdownAnimation(uint32_t index)
void drawShutdownAnimation(uint32_t index, const char * message)
{
index /= (PWR_PRESS_SHUTDOWN_DELAY / 4);
lcdRefreshWait();
lcdClear();
lcdDrawBitmap((LCD_W-SHUTDOWN_BITMAP_WIDTH)/2, (LCD_H-SHUTDOWN_BITMAP_HEIGHT)/2, bmp_shutdown, (3 - index) * SHUTDOWN_BITMAP_WIDTH, SHUTDOWN_BITMAP_WIDTH);
if (message) {
lcdDrawText((LCD_W - getTextWidth(message)) / 2, LCD_H-2*FH, message);
}
lcdRefresh();
}
#endif