Sleep bitmap on X7 (#5125)
This commit is contained in:
committed by
Andre Bernet
parent
e00efb1566
commit
6304f0daf6
@@ -881,7 +881,7 @@ void lcdInvertLine(int8_t line)
|
||||
}
|
||||
|
||||
#if !defined(BOOT)
|
||||
void lcd_img(coord_t x, coord_t y, const pm_uchar * img, uint8_t idx, LcdFlags att)
|
||||
void lcdDraw1bitBitmap(coord_t x, coord_t y, const pm_uchar * img, uint8_t idx, LcdFlags att)
|
||||
{
|
||||
const pm_uchar *q = img;
|
||||
uint8_t w = pgm_read_byte(q++);
|
||||
|
||||
@@ -180,7 +180,7 @@ void drawTelemetryTopBar();
|
||||
lcdDrawSolidVerticalLine(xx ,yy-ll,ll); \
|
||||
lcdDrawSolidVerticalLine(xx+1,yy-ll,ll)
|
||||
|
||||
void lcd_img(coord_t x, coord_t y, const pm_uchar * img, uint8_t idx, LcdFlags att=0);
|
||||
void lcdDraw1bitBitmap(coord_t x, coord_t y, const pm_uchar * img, uint8_t idx, LcdFlags att=0);
|
||||
|
||||
void lcdDrawBitmap(coord_t x, coord_t y, const uint8_t * img, coord_t offset=0, coord_t width=0);
|
||||
#define LCD_ICON(x, y, icon) lcdDrawBitmap(x, y, icons, icon)
|
||||
|
||||
@@ -37,7 +37,7 @@ void menuRadioDiagKeys(event_t event)
|
||||
|
||||
if (i<8) {
|
||||
y = MENU_HEADER_HEIGHT + FH*3 + FH*(i/2);
|
||||
if (i&1) lcd_img(14*FW, y, sticks, i/2, 0);
|
||||
if (i&1) lcdDraw1bitBitmap(14*FW, y, sticks, i/2, 0);
|
||||
displayKeyState(i&1? 20*FW : 18*FW, y, TRM_BASE+i);
|
||||
}
|
||||
|
||||
|
||||
@@ -488,7 +488,7 @@ void menuRadioSetup(event_t event)
|
||||
case ITEM_SETUP_STICK_MODE_LABELS:
|
||||
lcdDrawTextAlignedLeft(y, NO_INDENT(STR_MODE));
|
||||
for (uint8_t i=0; i<4; i++) {
|
||||
lcd_img((6+4*i)*FW, y, sticks, i, 0);
|
||||
lcdDraw1bitBitmap((6+4*i)*FW, y, sticks, i, 0);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#include "opentx.h"
|
||||
|
||||
const pm_uchar bmp_sleep[] PROGMEM = {
|
||||
const pm_uchar SLEEP_BITMAP[] PROGMEM = {
|
||||
#include "../../bitmaps/212x64/sleep.lbm"
|
||||
};
|
||||
|
||||
@@ -29,12 +29,12 @@ const pm_uchar bmp_sleep[] PROGMEM = {
|
||||
void drawSleepBitmap()
|
||||
{
|
||||
lcdClear();
|
||||
lcdDrawBitmap((LCD_W-SLEEP_BITMAP_WIDTH)/2, (LCD_H-SLEEP_BITMAP_HEIGHT)/2, bmp_sleep, 0, SLEEP_BITMAP_WIDTH);
|
||||
lcdDrawBitmap((LCD_W-SLEEP_BITMAP_WIDTH)/2, (LCD_H-SLEEP_BITMAP_HEIGHT)/2, SLEEP_BITMAP, 0, SLEEP_BITMAP_WIDTH);
|
||||
lcdRefresh();
|
||||
}
|
||||
|
||||
#if defined(PWR_BUTTON_PRESS)
|
||||
const pm_uchar bmp_shutdown[] PROGMEM = {
|
||||
const pm_uchar SHUTDOWN_BITMAP[] PROGMEM = {
|
||||
#include "../../bitmaps/212x64/shutdown.lbm"
|
||||
};
|
||||
|
||||
@@ -45,7 +45,7 @@ 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);
|
||||
lcdDrawBitmap((LCD_W-SHUTDOWN_BITMAP_WIDTH)/2, (LCD_H-SHUTDOWN_BITMAP_HEIGHT)/2, SHUTDOWN_BITMAP, (3 - index) * SHUTDOWN_BITMAP_WIDTH, SHUTDOWN_BITMAP_WIDTH);
|
||||
if (message) {
|
||||
lcdDrawText((LCD_W - getTextWidth(message)) / 2, LCD_H-2*FH, message);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user