1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-23 16:25:16 +03:00

Bitmaps splitted into different directories

This commit is contained in:
bsongis 2014-12-03 21:11:01 +01:00
parent 4a5f5432dd
commit e19684063a
16 changed files with 28 additions and 38 deletions

View file

@ -907,7 +907,7 @@ endif
ifeq ($(TURNIGY_TRANSMITTER_FIX), YES)
ifeq ($(PCB), TARANIS)
$(warning TURNIGY_TRANSMITTER_FIX is not available on Taranis)
$(warning TURNIGY_TRANSMITTER_FIX is not available on this radio)
else
CPPDEFS += -DMODULE_ALWAYS_SEND_PULSES
endif
@ -1328,18 +1328,18 @@ fonts: $(patsubst %.png,%.lbm,$(wildcard fonts/*/*.png))
fonts/%.lbm: fonts/%.png
$(IMG2LBM) $^ $@
bitmaps/sticks.lbm: bitmaps/sticks_4x1.xbm bitmaps/splash_9x.xbm bitmaps/splash_taranis.png bitmaps/logo_taranis.bmp bitmaps/icons.png bitmaps/asterisk.xbm bitmaps/about_9x.png bitmaps/about_taranis.png bitmaps/asterisk_4bits.png
bitmaps/sticks.lbm: bitmaps/sticks_4x1.xbm bitmaps/9X/splash.xbm bitmaps/Taranis/splash.png bitmaps/Taranis/logo.bmp bitmaps/Taranis/icons.png bitmaps/9X/asterisk.xbm bitmaps/9X/about.png bitmaps/Taranis/about.png bitmaps/Taranis/asterisk.png
@echo
@echo "Convert bitmaps from xbm to lbm:"
$(IMG2LBM) bitmaps/sticks_4x1.xbm bitmaps/sticks.lbm img 4
$(IMG2LBM) bitmaps/splash_9x.xbm bitmaps/splash_9x.lbm img
$(IMG2LBM) bitmaps/splash_taranis.png bitmaps/splash_taranis.lbm bmp
$(IMG2LBM) bitmaps/logo_taranis.bmp bitmaps/logo_taranis.lbm bmp
$(IMG2LBM) bitmaps/icons.png bitmaps/icons.lbm bmp
$(IMG2LBM) bitmaps/asterisk.xbm bitmaps/asterisk.lbm img
$(IMG2LBM) bitmaps/about_taranis.png bitmaps/about_taranis.lbm bmp
$(IMG2LBM) bitmaps/about_9x.png bitmaps/about_9x.lbm img
$(IMG2LBM) bitmaps/asterisk_4bits.png bitmaps/asterisk_4bits.lbm bmp
$(IMG2LBM) bitmaps/sticks_4x1.xbm bitmaps/sticks.lbm 1bit 4
$(IMG2LBM) bitmaps/9X/asterisk.xbm bitmaps/9X/asterisk.lbm 1bit
$(IMG2LBM) bitmaps/9X/splash.xbm bitmaps/9X/splash.lbm 1bit
$(IMG2LBM) bitmaps/9X/about.png bitmaps/9X/about.lbm 1bit
$(IMG2LBM) bitmaps/Taranis/splash.png bitmaps/Taranis/splash.lbm 4bits
$(IMG2LBM) bitmaps/Taranis/logo.bmp bitmaps/Taranis/logo.lbm 4bits
$(IMG2LBM) bitmaps/Taranis/icons.png bitmaps/Taranis/icons.lbm 4bits
$(IMG2LBM) bitmaps/Taranis/about.png bitmaps/Taranis/about.lbm 4bits
$(IMG2LBM) bitmaps/Taranis/asterisk.png bitmaps/Taranis/asterisk.lbm 4bits
ifeq ($(OS),Windows_NT)
PARSER = avr-cpp

View file

Before

Width:  |  Height:  |  Size: 212 B

After

Width:  |  Height:  |  Size: 212 B

Before After
Before After

View file

View file

View file

Before

Width:  |  Height:  |  Size: 740 B

After

Width:  |  Height:  |  Size: 740 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 583 B

After

Width:  |  Height:  |  Size: 583 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 502 B

After

Width:  |  Height:  |  Size: 502 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Before After
Before After

View file

@ -70,11 +70,11 @@
#define BOX_LIMIT (BOX_WIDTH-MARKER_WIDTH)
const pm_uchar logo_taranis[] PROGMEM = {
#include "../../bitmaps/logo_taranis.lbm"
#include "../../bitmaps/Taranis/logo.lbm"
};
const pm_uchar icons[] PROGMEM = {
#include "../../bitmaps/icons.lbm"
#include "../../bitmaps/Taranis/icons.lbm"
};
#define ICON_RSSI 0, 9

View file

@ -3321,6 +3321,8 @@ void drawOffsetBar(uint8_t x, uint8_t y, MixData * md)
}
}
}
#undef GAUGE_WIDTH
#undef GAUGE_HEIGHT
#endif
void menuModelMixOne(uint8_t event)

View file

@ -38,11 +38,11 @@
#if defined(PCBTARANIS)
const pm_uchar about_bmp[] PROGMEM = {
#include "../bitmaps/about_taranis.lbm"
#include "../bitmaps/Taranis/about.lbm"
};
#else
const pm_uchar about_bmp[] PROGMEM = {
#include "../bitmaps/about_9x.lbm"
#include "../bitmaps/9X/about.lbm"
};
#endif

View file

@ -142,6 +142,7 @@
#if defined(PCBTARANIS)
#define GREY(x) ((x) * 0x010000)
#define WHITE GREY(0xf)
#define GREY_DEFAULT GREY(11)
#define COLOUR_MASK(x) ((x) & 0x0F0000)
#endif
@ -276,8 +277,8 @@ void lcdDrawTelemetryTopBar();
void lcd_img(coord_t x, coord_t y, const pm_uchar * img, uint8_t idx, LcdFlags att=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)
void lcd_bmp(coord_t x, coord_t y, const uint8_t * img, coord_t offset=0, coord_t width=0);
#define LCD_ICON(x, y, icon) lcd_bmp(x, y, icons, icon)
#endif
void lcdSetRefVolt(unsigned char val);

View file

@ -151,7 +151,7 @@ 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 uint8_t * img, uint8_t offset, uint8_t width)
void lcd_bmp(coord_t x, coord_t y, const uint8_t * img, coord_t offset, coord_t width)
{
const uint8_t *q = img;
uint8_t w = *q++;

View file

@ -39,21 +39,21 @@
#if defined(SPLASH)
const pm_uchar splashdata[] PROGMEM = { 'S','P','S',0,
#if defined(PCBTARANIS)
#include "bitmaps/splash_taranis.lbm"
#include "bitmaps/Taranis/splash.lbm"
#else
#include "bitmaps/splash_9x.lbm"
#include "bitmaps/9X/splash.lbm"
#endif
'S','P','E',0};
const pm_uchar * const splash_lbm = splashdata+4;
#endif
#if LCD_W >= 212
#if defined(PCBTARANIS)
const pm_uchar asterisk_lbm[] PROGMEM = {
#include "bitmaps/asterisk_4bits.lbm"
#include "bitmaps/Taranis/asterisk.lbm"
};
#else
const pm_uchar asterisk_lbm[] PROGMEM = {
#include "bitmaps/asterisk.lbm"
#include "bitmaps/9X/asterisk.lbm"
};
#endif

View file

@ -16,20 +16,7 @@ else:
what = s
break
if what == "largimg":
rows = 1
if len(sys.argv) > 4:
rows = int(sys.argv[4])
f.write("255,%d, %d,\n" % (width-255, height/rows))
for y in range(0, height, 8):
for x in range(width):
value = 0
for z in range(8):
if y+z < height and image.pixel(x, y+z) == Qt.qRgb(0, 0, 0):
value += 1 << z
f.write("0x%02x," % value)
f.write("\n")
elif what == "img":
if what == "1bit":
rows = 1
if len(sys.argv) > 4:
rows = int(sys.argv[4])
@ -42,7 +29,7 @@ elif what == "img":
value += 1 << z
f.write("0x%02x," % value)
f.write("\n")
elif what == "bmp":
elif what == "4bits":
colors = []
f.write("%d,%d,\n" % (width, height))
for y in range(0, height, 2):