1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-19 22:35:12 +03:00

[Taranis] Display of shutdown bitmap instead of the message "SHUTDOWN"

in the popup
This commit is contained in:
bsongis 2015-07-14 19:31:06 +02:00
parent 7d9cd8c869
commit f51a313708
5 changed files with 27 additions and 15 deletions

View file

@ -213,6 +213,8 @@ void lcd_invert_line(int8_t line);
#define lcd_status_line() lcd_invert_line(LCD_LINES-1)
inline void lcd_square(coord_t x, coord_t y, coord_t w, LcdFlags att=0) { lcd_rect(x, y, w, w, SOLID, att); }
void displaySleepBitmap();
void lcdDrawTelemetryTopBar();
#define V_BAR(xx, yy, ll) \

View file

@ -36,6 +36,17 @@
#include "../../opentx.h"
const pm_uchar bmp_sleep[] PROGMEM = {
#include "../../bitmaps/Taranis/sleep.lbm"
};
void displaySleepBitmap()
{
lcd_clear();
lcd_bmp(76, 2, bmp_sleep, 0, 60);
lcdRefresh();
}
void drawStick(coord_t centrex, int16_t xval, int16_t yval)
{
#define BOX_CENTERY (LCD_H-BOX_WIDTH/2-10)

View file

@ -1902,9 +1902,11 @@ void opentxClose()
}
#endif
#if !defined(PCBTARANIS)
if (s_eeDirtyMsk & EE_MODEL) {
displayPopup(STR_SAVEMODEL);
}
#endif
g_eeGeneral.unexpectedShutdown = 0;

View file

@ -123,10 +123,6 @@ extern "C" void INTERRUPT_5MS_IRQHandler()
const pm_uchar bmp_lock[] PROGMEM = {
#include "../../bitmaps/Taranis/lock.lbm"
};
const pm_uchar bmp_sleep[] PROGMEM = {
#include "../../bitmaps/Taranis/sleep.lbm"
};
#endif
void boardInit()
@ -177,8 +173,7 @@ void boardInit()
lcd_bmp(76, 2, bmp_startup, index*60, 60);
}
else if (duration >= PWR_PRESS_DURATION_MAX) {
lcd_clear();
lcd_bmp(76, 2, bmp_sleep, 0, 60);
displaySleepBitmap();
turnBacklightOff();
}
else {

View file

@ -182,19 +182,21 @@ void menusTask(void * pdata)
}
}
lcd_clear();
displayPopup(STR_SHUTDOWN);
opentxClose();
lcd_clear();
lcdRefresh();
lcdOff();
BACKLIGHT_OFF();
#if defined(REV9E)
topLcdOff();
#endif
BACKLIGHT_OFF();
#if defined(PCBTARANIS)
displaySleepBitmap();
#else
lcd_clear();
displayPopup(STR_SHUTDOWN);
#endif
opentxClose();
#if !defined(SIMU)
SysTick->CTRL = 0; // turn off systick
#endif