[Taranis] Splash on SD fix. Still not tested.
This commit is contained in:
+2
-2
@@ -41,10 +41,10 @@ const pm_char * bmpLoad(uint8_t *dest, const char *filename, const xcoord_t widt
|
|||||||
FIL bmpFile;
|
FIL bmpFile;
|
||||||
UINT read;
|
UINT read;
|
||||||
uint8_t palette[16];
|
uint8_t palette[16];
|
||||||
uint8_t bmpBuf[64]; /* maximum with 64px */
|
uint8_t bmpBuf[LCD_W]; /* maximum with LCD_W */
|
||||||
uint8_t *buf = &bmpBuf[0];
|
uint8_t *buf = &bmpBuf[0];
|
||||||
|
|
||||||
assert(width <= 64);
|
assert(width <= LCD_W);
|
||||||
|
|
||||||
FRESULT result = f_open(&bmpFile, filename, FA_OPEN_EXISTING | FA_READ);
|
FRESULT result = f_open(&bmpFile, filename, FA_OPEN_EXISTING | FA_READ);
|
||||||
if (result != FR_OK) {
|
if (result != FR_OK) {
|
||||||
|
|||||||
+1
-1
@@ -1602,7 +1602,7 @@ void doSplash()
|
|||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
if (!secondSplash && get_tmr10ms() >= tgtime-SPLASH_TIMEOUT/2) {
|
if (!secondSplash && get_tmr10ms() >= tgtime-SPLASH_TIMEOUT/2) {
|
||||||
secondSplash = true;
|
secondSplash = true;
|
||||||
static uint8_t sdSplash[2+4*(LCD_W*LCD_H/8)];
|
uint8_t sdSplash[2+4*(LCD_W*LCD_H/8)];
|
||||||
if (!bmpLoad(sdSplash, BITMAPS_PATH "/splash.bmp", LCD_W, LCD_H)) {
|
if (!bmpLoad(sdSplash, BITMAPS_PATH "/splash.bmp", LCD_W, LCD_H)) {
|
||||||
lcd_clear();
|
lcd_clear();
|
||||||
lcd_bmp(0, 0, sdSplash);
|
lcd_bmp(0, 0, sdSplash);
|
||||||
|
|||||||
Reference in New Issue
Block a user