diff --git a/radio/src/lcd.h b/radio/src/lcd.h index aa0212909..84e4741d7 100644 --- a/radio/src/lcd.h +++ b/radio/src/lcd.h @@ -264,8 +264,12 @@ void lcdDrawTelemetryTopBar(); lcd_vline(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 lcd_bmp(coord_t x, coord_t y, const pm_uchar * img, uint8_t offset=0, uint8_t width=0); + +#if defined(PCBTARANIS) +void lcd_bmp(coord_t x, coord_t y, const uint8_t * img, uint8_t offset=0, uint8_t width=0); #define LCD_ICON(x, y, icon) lcd_bmp(x, y, icons, icon) +#endif + void lcdSetRefVolt(unsigned char val); void lcdInit(); void lcd_clear(); diff --git a/radio/src/lcd_taranis.cpp b/radio/src/lcd_taranis.cpp index c594ae4d5..db001d7c7 100755 --- a/radio/src/lcd_taranis.cpp +++ b/radio/src/lcd_taranis.cpp @@ -141,23 +141,23 @@ void lcd_img(coord_t x, coord_t y, const pm_uchar * img, uint8_t idx, LcdFlags a } } -void lcd_bmp(coord_t x, coord_t y, const pm_uchar * img, uint8_t offset, uint8_t width) +void lcd_bmp(coord_t x, coord_t y, const uint8_t * img, uint8_t offset, uint8_t width) { - const pm_uchar *q = img; - uint8_t w = pgm_read_byte(q++); + const uint8_t *q = img; + uint8_t w = *q++; if (!width || width > w) { width = w; } if (x+width > LCD_W) { width = LCD_W-x; } - uint8_t rows = (pgm_read_byte(q++) + 1) / 2; + uint8_t rows = (*q++ + 1) / 2; for (uint8_t row=0; row> 4);