Sleep bitmap on X7 (#5125)
This commit is contained in:
committed by
Andre Bernet
parent
e00efb1566
commit
6304f0daf6
Executable
BIN
Binary file not shown.
|
After Width: | Height: | Size: 347 B |
@@ -1510,7 +1510,7 @@ void NAME(coord_t x, coord_t y, TYPE img, uint8_t idx, LcdFlags att) \
|
||||
LCD_IMG_FUNCTION(lcd_imgfar, uint_farptr_t, pgm_read_byte_far)
|
||||
#endif
|
||||
|
||||
LCD_IMG_FUNCTION(lcd_img, const pm_uchar *, pgm_read_byte)
|
||||
LCD_IMG_FUNCTION(lcdDraw1bitBitmap, const pm_uchar *, pgm_read_byte)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -261,7 +261,7 @@ void lcd_imgfar(coord_t x, coord_t y, const uint_farptr_t img, uint8_t idx, LcdF
|
||||
#endif
|
||||
|
||||
void lcdClear(void);
|
||||
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);
|
||||
|
||||
#if defined(BOOT)
|
||||
#define BLINK_ON_PHASE (0)
|
||||
|
||||
@@ -60,7 +60,7 @@ const pm_uchar ASTERISK_BITMAP[] PROGMEM = {
|
||||
void drawAlertBox(const pm_char * title, const pm_char * text, const char * action)
|
||||
{
|
||||
lcdClear();
|
||||
lcd_img(2, 0, ASTERISK_BITMAP, 0, 0);
|
||||
lcdDraw1bitBitmap(2, 0, ASTERISK_BITMAP, 0, 0);
|
||||
|
||||
#define MESSAGE_LCD_OFFSET 6*FW
|
||||
|
||||
|
||||
@@ -45,7 +45,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);
|
||||
}
|
||||
|
||||
|
||||
@@ -575,7 +575,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(5*FW+i*(4*FW+2), y, sticks, i, 0);
|
||||
lcdDraw1bitBitmap(5*FW+i*(4*FW+2), y, sticks, i, 0);
|
||||
#if defined(FRSKY_STICKS)
|
||||
if (g_eeGeneral.stickReverse & (1<<i)) {
|
||||
lcdDrawFilledRect(5*FW+i*(4*FW+2), y, 3*FW, FH-1);
|
||||
|
||||
@@ -54,7 +54,7 @@ void drawSplash()
|
||||
#if defined(PCBMEGA2560) && !defined(SIMU)
|
||||
lcd_imgfar(0, 0, (GET_FAR_ADDRESS(splashdata)+4), 0, 0); // use progmem "far" for splash working with all other options enabled
|
||||
#else
|
||||
lcd_img(0, 0, splash_lbm, 0, 0);
|
||||
lcdDraw1bitBitmap(0, 0, splash_lbm, 0, 0);
|
||||
#endif
|
||||
|
||||
#if MENUS_LOCK == 1
|
||||
@@ -79,7 +79,7 @@ const pm_uchar * const splash2_lbm = splashdata2+4;
|
||||
void drawSecondSplash()
|
||||
{
|
||||
lcdClear();
|
||||
lcd_img(0, 0, splash2_lbm, 0, 0);
|
||||
lcdDraw1bitBitmap(0, 0, splash2_lbm, 0, 0);
|
||||
lcdRefresh();
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -79,7 +79,7 @@ void menuAboutView(event_t event)
|
||||
|
||||
lcdDrawText(17, 0, STR_ABOUTUS, DBLSIZE|INVERS);
|
||||
lcdDrawSolidHorizontalLine(17, 16, LCD_W-17);
|
||||
lcd_img(8, 0, about_bmp, 0);
|
||||
lcdDraw1bitBitmap(8, 0, about_bmp, 0);
|
||||
LcdFlags att = 0;
|
||||
|
||||
uint8_t screenDuration = 150;
|
||||
|
||||
@@ -258,9 +258,17 @@ void drawProgressBar(const char * label, int num, int den)
|
||||
}
|
||||
|
||||
#if defined(CPUARM) || defined(CPUM2560)
|
||||
const pm_uchar SLEEP_BITMAP[] PROGMEM = {
|
||||
#include "sleep.lbm"
|
||||
};
|
||||
|
||||
#define SLEEP_BITMAP_WIDTH 60
|
||||
#define SLEEP_BITMAP_HEIGHT 60
|
||||
|
||||
void drawSleepBitmap()
|
||||
{
|
||||
lcdClear();
|
||||
showMessageBox(STR_SHUTDOWN);
|
||||
lcdDraw1bitBitmap((LCD_W-SLEEP_BITMAP_WIDTH)/2, (LCD_H-SLEEP_BITMAP_HEIGHT)/2, SLEEP_BITMAP, 0);
|
||||
lcdRefresh();
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -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