[stock] Flash saving

[sky9x] Timer > 1hour fixed
This commit is contained in:
bsongis
2012-10-06 09:11:00 +00:00
parent 1085b8b7b2
commit 50616680fa
17 changed files with 418 additions and 153 deletions
+11 -4
View File
@@ -709,9 +709,9 @@ all: begin gccversion sizebefore build sizeafter end
# Change the build target to build a HEX file or a library.
ifeq ($(PCB), SKY9X)
build: stamp_header font.lbm font_dblsize.lbm sticks.lbm s9xsplash.lbm asterisk.lbm allsrc.cpp elf remallsrc bin lss
build: stamp_header lbm allsrc.cpp elf remallsrc bin lss
else
build: stamp_header font.lbm font_dblsize.lbm sticks.lbm s9xsplash.lbm asterisk.lbm allsrc.cpp elf remallsrc hex eep lss sym
build: stamp_header lbm allsrc.cpp elf remallsrc hex eep lss sym
endif
elf: $(TARGET).elf
@@ -721,6 +721,8 @@ eep: $(TARGET).eep
lss: $(TARGET).lss
sym: $(TARGET).sym
lbm: font.lbm font_dblsize.lbm sticks.lbm splash_9x.lbm splash_X9D.lbm asterisk.lbm
# Build stamp-file
stamp_header:
@echo
@@ -777,9 +779,14 @@ sticks.lbm: sticks_4x1.xbm
@echo "Convert sticks from xbm to lbm:"
$(IMG2LBM) $< $@ img 4
s9xsplash.lbm: s9xsplash.xbm
splash_9x.lbm: splash_9x.xbm
@echo
@echo "Convert splash from xbm to lbm:"
@echo "Convert 9x splash from xbm to lbm:"
$(IMG2LBM) $< $@ img
splash_X9D.lbm: splash_X9D.xbm
@echo
@echo "Convert X9D splash from xbm to lbm:"
$(IMG2LBM) $< $@ img
asterisk.lbm: asterisk.xbm
-1
View File
@@ -538,7 +538,6 @@ void frskyTransmitBuffer( uint32_t size )
txPdcUsart( frskyTxBuffer, size ) ;
}
#else
// TODO inline ? pass parameter? to avoid #ifdef?
void frskyTransmitBuffer()
{
UCSR0B |= (1 << UDRIE0); // enable UDRE0 interrupt
+40 -39
View File
@@ -50,7 +50,7 @@ void lcd_clear()
memset(displayBuf, 0, sizeof(displayBuf));
}
void lcd_img(uint8_t x, uint8_t y, const pm_uchar * img, uint8_t idx, uint8_t mode)
void lcd_img(xcoord_t x, uint8_t y, const pm_uchar * img, uint8_t idx, uint8_t mode)
{
const pm_uchar *q = img;
uint8_t w = pgm_read_byte(q++);
@@ -74,7 +74,7 @@ uint8_t lcdLock;
uint32_t lcdInputs;
#endif
void lcd_putcAtt(uint8_t x, uint8_t y, const unsigned char c, uint8_t mode)
void lcd_putcAtt(xcoord_t x, uint8_t y, const unsigned char c, uint8_t mode)
{
uint8_t *p = &displayBuf[ y / 8 * DISPLAY_W + x ];
@@ -160,19 +160,19 @@ void lcd_putcAtt(uint8_t x, uint8_t y, const unsigned char c, uint8_t mode)
}
}
void lcd_putc(uint8_t x, uint8_t y, const unsigned char c)
void lcd_putc(xcoord_t x, uint8_t y, const unsigned char c)
{
lcd_putcAtt(x,y,c,0);
}
void lcd_putsiAtt(uint8_t x,uint8_t y,const pm_char * s,uint8_t idx, uint8_t flags)
void lcd_putsiAtt(xcoord_t x,uint8_t y,const pm_char * s,uint8_t idx, uint8_t flags)
{
uint8_t length;
length = pgm_read_byte(s++) ;
lcd_putsnAtt(x,y,s+length*idx,length,flags & ~(BSS|ZCHAR));
}
void lcd_putsnAtt(uint8_t x,uint8_t y,const pm_char * s,uint8_t len,uint8_t mode)
void lcd_putsnAtt(xcoord_t x,uint8_t y,const pm_char * s,uint8_t len,uint8_t mode)
{
while(len!=0) {
unsigned char c;
@@ -202,17 +202,17 @@ void lcd_putsnAtt(uint8_t x,uint8_t y,const pm_char * s,uint8_t len,uint8_t mode
lcdLastPos = x;
}
void lcd_putsn(uint8_t x,uint8_t y,const pm_char * s,uint8_t len)
void lcd_putsn(xcoord_t x,uint8_t y,const pm_char * s,uint8_t len)
{
lcd_putsnAtt(x, y, s, len, 0);
}
void lcd_putsAtt(uint8_t x,uint8_t y,const pm_char * s,uint8_t mode)
void lcd_putsAtt(xcoord_t x,uint8_t y,const pm_char * s,uint8_t mode)
{
lcd_putsnAtt(x, y, s, 255, mode);
}
void lcd_puts(uint8_t x,uint8_t y,const pm_char * s)
void lcd_puts(xcoord_t x,uint8_t y,const pm_char * s)
{
lcd_putsAtt( x, y, s, 0);
}
@@ -222,7 +222,7 @@ void lcd_putsLeft(uint8_t y, const pm_char * s)
lcd_putsAtt(0, y, s, 0);
}
void lcd_outhex4(uint8_t x,uint8_t y,uint16_t val)
void lcd_outhex4(xcoord_t x,uint8_t y,uint16_t val)
{
x+=FWNUM*4;
for(int i=0; i<4; i++)
@@ -234,12 +234,12 @@ void lcd_outhex4(uint8_t x,uint8_t y,uint16_t val)
val>>=4;
}
}
void lcd_outdez8(uint8_t x, uint8_t y, int8_t val)
void lcd_outdez8(xcoord_t x, uint8_t y, int8_t val)
{
lcd_outdezAtt(x, y, val);
}
void lcd_outdezAtt(uint8_t x, uint8_t y, int16_t val, LcdFlags flags)
void lcd_outdezAtt(xcoord_t x, uint8_t y, int16_t val, LcdFlags flags)
{
lcd_outdezNAtt(x, y, val, flags);
}
@@ -257,7 +257,7 @@ USAGE:
LEADING0 means pad 0 to the left of sig. digits up to 'len' total characters
*/
void lcd_outdezNAtt(uint8_t x, uint8_t y, int16_t val, LcdFlags flags, uint8_t len)
void lcd_outdezNAtt(xcoord_t x, uint8_t y, int16_t val, LcdFlags flags, uint8_t len)
{
uint8_t fw = FWNUM;
int8_t mode = MODE(flags);
@@ -267,7 +267,7 @@ void lcd_outdezNAtt(uint8_t x, uint8_t y, int16_t val, LcdFlags flags, uint8_t l
if (flags & UNSIGN) { flags -= UNSIGN; }
else if (val < 0) { neg=true; val=-val; }
uint8_t xn = 0;
xcoord_t xn = 0;
uint8_t ln = 2;
if (mode != MODE(LEADING0)) {
@@ -362,17 +362,16 @@ void lcd_mask(uint8_t *p, uint8_t mask, uint8_t att)
*p ^= mask;
}
void lcd_plot(uint8_t x,uint8_t y, uint8_t att)
void lcd_plot(xcoord_t x,uint8_t y, uint8_t att)
{
uint8_t *p = &displayBuf[ y / 8 * DISPLAY_W + x ];
if (p<DISPLAY_END)
lcd_mask(p, BITMASK(y%8), att);
}
void lcd_hlineStip(int8_t x, uint8_t y, uint8_t w, uint8_t pat, uint8_t att)
void lcd_hlineStip(xcoord_t x, uint8_t y, xcoord_t w, uint8_t pat, uint8_t att)
{
if (y >= DISPLAY_H) return;
if (x<0) { w+=x; x=0; }
if (x+w > DISPLAY_W) { w = DISPLAY_W - x; }
uint8_t *p = &displayBuf[ y / 8 * DISPLAY_W + x ];
@@ -390,14 +389,14 @@ void lcd_hlineStip(int8_t x, uint8_t y, uint8_t w, uint8_t pat, uint8_t att)
}
}
void lcd_hline(uint8_t x, uint8_t y, uint8_t w, uint8_t att)
void lcd_hline(xcoord_t x, uint8_t y, xcoord_t w, uint8_t att)
{
lcd_hlineStip(x, y, w, 0xff, att);
}
#if 0
// allows the att parameter... perhaps will be needed later!
void lcd_vlineStip(uint8_t x, int8_t y, int8_t h, uint8_t pat, uint8_t att)
void lcd_vlineStip(xcoord_t x, int8_t y, int8_t h, uint8_t pat, uint8_t att)
{
if (x >= DISPLAY_W) return;
if (h<0) { y+=h; h=-h; }
@@ -430,7 +429,7 @@ void lcd_vlineStip(uint8_t x, int8_t y, int8_t h, uint8_t pat, uint8_t att)
}
}
#else
void lcd_vlineStip(uint8_t x, int8_t y, int8_t h, uint8_t pat)
void lcd_vlineStip(xcoord_t x, int8_t y, int8_t h, uint8_t pat)
{
if (x >= DISPLAY_W) return;
if (h<0) { y+=h; h=-h; }
@@ -463,12 +462,12 @@ void lcd_vlineStip(uint8_t x, int8_t y, int8_t h, uint8_t pat)
}
#endif
void lcd_vline(uint8_t x, int8_t y, int8_t h)
void lcd_vline(xcoord_t x, int8_t y, int8_t h)
{
lcd_vlineStip(x, y, h, 0xff);
}
void lcd_rect(uint8_t x, uint8_t y, uint8_t w, uint8_t h, uint8_t pat, uint8_t att)
void lcd_rect(xcoord_t x, uint8_t y, xcoord_t w, uint8_t h, uint8_t pat, uint8_t att)
{
if (!((att & BLINK) && BLINK_ON_PHASE)) {
lcd_vlineStip(x, y, h, pat);
@@ -479,7 +478,7 @@ void lcd_rect(uint8_t x, uint8_t y, uint8_t w, uint8_t h, uint8_t pat, uint8_t a
}
}
void lcd_filled_rect(uint8_t x, int8_t y, uint8_t w, uint8_t h, uint8_t pat, uint8_t att)
void lcd_filled_rect(xcoord_t x, int8_t y, xcoord_t w, uint8_t h, uint8_t pat, uint8_t att)
{
for (int8_t i=y; i<y+h; i++) {
if (i>=0 && i<64) lcd_hlineStip(x, i, w, pat, att);
@@ -487,10 +486,12 @@ void lcd_filled_rect(uint8_t x, int8_t y, uint8_t w, uint8_t h, uint8_t pat, uin
}
}
void putsTime(uint8_t x, uint8_t y, putstime_t tme, uint8_t att, uint8_t att2)
void putsTime(xcoord_t x, uint8_t y, putstime_t tme, uint8_t att, uint8_t att2)
{
div_t qr;
tme+=32660;
if (att & LEFT) x+=3*FW;
if (tme<0) {
@@ -501,7 +502,7 @@ void putsTime(uint8_t x, uint8_t y, putstime_t tme, uint8_t att, uint8_t att2)
qr = div(tme, 60);
#if defined(PCBSKY9X)
if (tme >= 3600) {
if (tme >= 3600 && (~att & DBLSIZE)) {
qr = div(qr.quot, 60);
lcd_outdezAtt(x+2*FWNUM, y, qr.quot, att);
lcd_putcAtt(lcdLastPos-((att & DBLSIZE) ? 1 : 0), y, 'h', att&att2);
@@ -516,25 +517,25 @@ void putsTime(uint8_t x, uint8_t y, putstime_t tme, uint8_t att, uint8_t att2)
}
// TODO to be optimized with putsTelemetryValue
void putsVolts(uint8_t x, uint8_t y, uint16_t volts, uint8_t att)
void putsVolts(xcoord_t x, uint8_t y, uint16_t volts, uint8_t att)
{
lcd_outdezAtt(x, y, (int16_t)volts, (~NO_UNIT) & (att | ((att&PREC2)==PREC2 ? 0 : PREC1)));
if (~att & NO_UNIT) lcd_putcAtt(lcdLastPos, y, 'v', att&(~INVERS));
}
void putsVBat(uint8_t x, uint8_t y, uint8_t att)
void putsVBat(xcoord_t x, uint8_t y, uint8_t att)
{
putsVolts(x, y, g_vbat100mV, att);
}
void putsStrIdx(uint8_t x, uint8_t y, const pm_char *str, uint8_t idx, uint8_t att)
void putsStrIdx(xcoord_t x, uint8_t y, const pm_char *str, uint8_t idx, uint8_t att)
{
lcd_putsAtt(x, y, str, att & ~BSS); // TODO use something else than BSS for LEADING0
lcd_outdezNAtt(lcdLastPos, y, idx, att|LEFT, 2);
lcd_putsAtt(x, y, str, att & ~BSS); // TODO use something else than BSS for LEADING0
}
void putsChnRaw(uint8_t x, uint8_t y, uint8_t idx, uint8_t att)
void putsChnRaw(xcoord_t x, uint8_t y, uint8_t idx, uint8_t att)
{
if (idx==0)
lcd_putsiAtt(x, y, STR_MMMINV, 0, att);
@@ -548,13 +549,13 @@ void putsChnRaw(uint8_t x, uint8_t y, uint8_t idx, uint8_t att)
lcd_putsiAtt(x, y, STR_VTELEMCHNS, idx-(NUM_STICKS+NUM_POTS+NUM_ROTARY_ENCODERS+NUM_STICKS+2+NUM_CYC+NUM_PPM+NUM_CHNOUT), att);
}
void putsChn(uint8_t x, uint8_t y, uint8_t idx, uint8_t att)
void putsChn(xcoord_t x, uint8_t y, uint8_t idx, uint8_t att)
{
if (idx > 0 && idx <= NUM_CHNOUT)
putsChnRaw(x, y, idx+(NUM_STICKS+NUM_POTS+NUM_ROTARY_ENCODERS+NUM_STICKS+2+NUM_CYC+NUM_PPM), att);
}
void putsMixerSource(uint8_t x, uint8_t y, uint8_t idx, uint8_t att)
void putsMixerSource(xcoord_t x, uint8_t y, uint8_t idx, uint8_t att)
{
if (idx<=NUM_STICKS+NUM_POTS+NUM_ROTARY_ENCODERS+NUM_STICKS+2)
putsChnRaw(x, y, idx, att);
@@ -564,12 +565,12 @@ void putsMixerSource(uint8_t x, uint8_t y, uint8_t idx, uint8_t att)
putsChnRaw(x, y, idx-MAX_SWITCH, att);
}
void putsChnLetter(uint8_t x, uint8_t y, uint8_t idx, uint8_t attr)
void putsChnLetter(xcoord_t x, uint8_t y, uint8_t idx, uint8_t attr)
{
lcd_putsiAtt(x, y, STR_RETA123, idx-1, attr);
}
void putsModelName(uint8_t x, uint8_t y, char *name, uint8_t id, uint8_t att)
void putsModelName(xcoord_t x, uint8_t y, char *name, uint8_t id, uint8_t att)
{
uint8_t len = sizeof(g_model.name);
while (len>0 && !name[len-1]) --len;
@@ -581,7 +582,7 @@ void putsModelName(uint8_t x, uint8_t y, char *name, uint8_t id, uint8_t att)
}
}
void putsSwitches(uint8_t x, uint8_t y, int8_t idx, uint8_t att)
void putsSwitches(xcoord_t x, uint8_t y, int8_t idx, uint8_t att)
{
if (idx == 0)
return lcd_putsiAtt(x, y, STR_MMMINV, 0, att);
@@ -603,7 +604,7 @@ void putsSwitches(uint8_t x, uint8_t y, int8_t idx, uint8_t att)
}
#ifdef FLIGHT_PHASES
void putsFlightPhase(uint8_t x, uint8_t y, int8_t idx, uint8_t att)
void putsFlightPhase(xcoord_t x, uint8_t y, int8_t idx, uint8_t att)
{
if (idx==0) { lcd_putsiAtt(x, y, STR_MMMINV, 0, att); return; }
if (idx < 0) { lcd_vlineStip(x-2, y, 8, 0x5E/*'!'*/); idx = -idx; }
@@ -614,7 +615,7 @@ void putsFlightPhase(uint8_t x, uint8_t y, int8_t idx, uint8_t att)
}
#endif
void putsCurve(uint8_t x, uint8_t y, int8_t idx, uint8_t att)
void putsCurve(xcoord_t x, uint8_t y, int8_t idx, uint8_t att)
{
if (idx < 0) {
lcd_putcAtt(x-1*FW, y, '!', att);
@@ -626,7 +627,7 @@ void putsCurve(uint8_t x, uint8_t y, int8_t idx, uint8_t att)
putsStrIdx(x, y, PSTR("c"), idx-CURVE_BASE+1, att);
}
void putsTmrMode(uint8_t x, uint8_t y, int8_t mode, uint8_t att)
void putsTmrMode(xcoord_t x, uint8_t y, int8_t mode, uint8_t att)
{
if (mode < 0) {
mode = TMR_VAROFS - mode - 1;
@@ -640,7 +641,7 @@ void putsTmrMode(uint8_t x, uint8_t y, int8_t mode, uint8_t att)
putsSwitches(x, y, mode-(TMR_VAROFS-1), att);
}
void putsTrimMode(uint8_t x, uint8_t y, uint8_t phase, uint8_t idx, uint8_t att)
void putsTrimMode(xcoord_t x, uint8_t y, uint8_t phase, uint8_t idx, uint8_t att)
{
int16_t v = getRawTrimValue(phase, idx);
@@ -655,7 +656,7 @@ void putsTrimMode(uint8_t x, uint8_t y, uint8_t phase, uint8_t idx, uint8_t att)
}
#if defined(ROTARY_ENCODERS)
void putsRotaryEncoderMode(uint8_t x, uint8_t y, uint8_t phase, uint8_t idx, uint8_t att)
void putsRotaryEncoderMode(xcoord_t x, uint8_t y, uint8_t phase, uint8_t idx, uint8_t att)
{
#if defined(EXTRA_ROTARY_ENCODERS)
int16_t v;
@@ -1031,7 +1032,7 @@ void refreshDisplay()
#endif
PORTC_LCD_CTRL |= (1<<OUT_C_LCD_A0);
PORTC_LCD_CTRL &= ~(1<<OUT_C_LCD_RnW);
for(uint8_t x=DISPLAY_W; x>0; --x) {
for (xcoord_t x=DISPLAY_W; x>0; --x) {
PORTA_LCD_DAT = *p++;
PORTC_LCD_CTRL |= (1<<OUT_C_LCD_E);
PORTC_LCD_CTRL &= ~(1<<OUT_C_LCD_E);
+37 -35
View File
@@ -37,9 +37,11 @@
#if defined(PCBX9D)
#define DISPLAY_W 192
#define DISPLAY_H 64
#define xcoord_t uint16_t
#else
#define DISPLAY_W 128
#define DISPLAY_H 64
#define xcoord_t uint8_t
#endif
#define FW 6
@@ -107,41 +109,41 @@ extern uint8_t lcdLock ;
extern uint32_t lcdInputs ;
#endif
extern void lcd_putc(uint8_t x,uint8_t y,const unsigned char c);
extern void lcd_putcAtt(uint8_t x,uint8_t y,const unsigned char c,uint8_t mode);
extern void lcd_putc(xcoord_t x,uint8_t y,const unsigned char c);
extern void lcd_putcAtt(xcoord_t x,uint8_t y,const unsigned char c,uint8_t mode);
extern void lcd_putsAtt(uint8_t x,uint8_t y,const pm_char * s,uint8_t mode);
extern void lcd_putsiAtt(uint8_t x,uint8_t y,const pm_char * s,uint8_t idx, uint8_t mode);
extern void lcd_putsnAtt(uint8_t x,uint8_t y,const pm_char * s,unsigned char len,uint8_t mode);
extern void lcd_puts(uint8_t x,uint8_t y,const pm_char * s);
extern void lcd_putsAtt(xcoord_t x,uint8_t y,const pm_char * s,uint8_t mode);
extern void lcd_putsiAtt(xcoord_t x,uint8_t y,const pm_char * s,uint8_t idx, uint8_t mode);
extern void lcd_putsnAtt(xcoord_t x,uint8_t y,const pm_char * s,unsigned char len,uint8_t mode);
extern void lcd_puts(xcoord_t x,uint8_t y,const pm_char * s);
extern void lcd_putsLeft(uint8_t y, const pm_char * s);
extern void lcd_putsn(uint8_t x,uint8_t y,const pm_char * s,unsigned char len);
extern void lcd_putsn(xcoord_t x,uint8_t y,const pm_char * s,unsigned char len);
extern void lcd_outhex4(uint8_t x,uint8_t y,uint16_t val);
extern void lcd_outhex4(xcoord_t x,uint8_t y,uint16_t val);
extern void lcd_outdezAtt(uint8_t x, uint8_t y, int16_t val, LcdFlags mode=0);
extern void lcd_outdezNAtt(uint8_t x, uint8_t y, int16_t val, LcdFlags mode=0, uint8_t len=0);
extern void lcd_outdez8(uint8_t x, uint8_t y, int8_t val);
extern void lcd_outdezAtt(xcoord_t x, uint8_t y, int16_t val, LcdFlags mode=0);
extern void lcd_outdezNAtt(xcoord_t x, uint8_t y, int16_t val, LcdFlags mode=0, uint8_t len=0);
extern void lcd_outdez8(xcoord_t x, uint8_t y, int8_t val);
extern void putsStrIdx(uint8_t x, uint8_t y, const pm_char *str, uint8_t idx, uint8_t att=0);
extern void putsStrIdx(xcoord_t x, uint8_t y, const pm_char *str, uint8_t idx, uint8_t att=0);
extern void putsModelName(uint8_t x, uint8_t y, char *name, uint8_t id, uint8_t att);
extern void putsSwitches(uint8_t x, uint8_t y, int8_t swtch, uint8_t att=0);
extern void putsMixerSource(uint8_t x, uint8_t y, uint8_t idx, uint8_t att=0);
extern void putsFlightPhase(uint8_t x, uint8_t y, int8_t idx, uint8_t att=0);
extern void putsCurve(uint8_t x, uint8_t y, int8_t idx, uint8_t att=0);
extern void putsTmrMode(uint8_t x, uint8_t y, int8_t mode, uint8_t att);
extern void putsTrimMode(uint8_t x, uint8_t y, uint8_t phase, uint8_t idx, uint8_t att);
extern void putsModelName(xcoord_t x, uint8_t y, char *name, uint8_t id, uint8_t att);
extern void putsSwitches(xcoord_t x, uint8_t y, int8_t swtch, uint8_t att=0);
extern void putsMixerSource(xcoord_t x, uint8_t y, uint8_t idx, uint8_t att=0);
extern void putsFlightPhase(xcoord_t x, uint8_t y, int8_t idx, uint8_t att=0);
extern void putsCurve(xcoord_t x, uint8_t y, int8_t idx, uint8_t att=0);
extern void putsTmrMode(xcoord_t x, uint8_t y, int8_t mode, uint8_t att);
extern void putsTrimMode(xcoord_t x, uint8_t y, uint8_t phase, uint8_t idx, uint8_t att);
#if defined(ROTARY_ENCODERS)
void putsRotaryEncoderMode(uint8_t x, uint8_t y, uint8_t phase, uint8_t idx, uint8_t att);
void putsRotaryEncoderMode(xcoord_t x, uint8_t y, uint8_t phase, uint8_t idx, uint8_t att);
#endif
extern void putsChnRaw(uint8_t x,uint8_t y,uint8_t idx1,uint8_t att);
extern void putsChn(uint8_t x,uint8_t y,uint8_t idx1,uint8_t att);
extern void putsChnLetter(uint8_t x, uint8_t y, uint8_t idx, uint8_t attr);
extern void putsChnRaw(xcoord_t x,uint8_t y,uint8_t idx1,uint8_t att);
extern void putsChn(xcoord_t x,uint8_t y,uint8_t idx1,uint8_t att);
extern void putsChnLetter(xcoord_t x, uint8_t y, uint8_t idx, uint8_t attr);
extern void putsVolts(uint8_t x, uint8_t y, uint16_t volts, uint8_t att);
extern void putsVBat(uint8_t x, uint8_t y, uint8_t att);
extern void putsVolts(xcoord_t x, uint8_t y, uint16_t volts, uint8_t att);
extern void putsVBat(xcoord_t x, uint8_t y, uint8_t att);
#if defined(PCBSKY9X)
#define putstime_t int32_t
@@ -149,21 +151,21 @@ extern void putsVBat(uint8_t x, uint8_t y, uint8_t att);
#define putstime_t int16_t
#endif
extern void putsTime(uint8_t x,uint8_t y, putstime_t tme, uint8_t att, uint8_t att2);
extern void putsTime(xcoord_t x, uint8_t y, putstime_t tme, uint8_t att, uint8_t att2);
#define SOLID 0xff
#define DOTTED 0x55
extern void lcd_plot(uint8_t x, uint8_t y, uint8_t att=0);
extern void lcd_hline(uint8_t x, uint8_t y, uint8_t w, uint8_t att=0);
extern void lcd_hlineStip(int8_t x, uint8_t y, uint8_t w, uint8_t pat, uint8_t att=0);
extern void lcd_vline(uint8_t x, int8_t y, int8_t h);
extern void lcd_vlineStip(uint8_t x, int8_t y, int8_t h, uint8_t pat);
extern void lcd_plot(xcoord_t x, uint8_t y, uint8_t att=0);
extern void lcd_hline(xcoord_t x, uint8_t y, xcoord_t w, uint8_t att=0);
extern void lcd_hlineStip(xcoord_t x, uint8_t y, xcoord_t w, uint8_t pat, uint8_t att=0);
extern void lcd_vline(xcoord_t x, int8_t y, int8_t h);
extern void lcd_vlineStip(xcoord_t x, int8_t y, int8_t h, uint8_t pat);
extern void lcd_rect(uint8_t x, uint8_t y, uint8_t w, uint8_t h, uint8_t pat=SOLID, uint8_t att=0);
extern void lcd_filled_rect(uint8_t x, int8_t y, uint8_t w, uint8_t h, uint8_t pat=SOLID, uint8_t att=0);
extern void lcd_rect(xcoord_t x, uint8_t y, xcoord_t w, uint8_t h, uint8_t pat=SOLID, uint8_t att=0);
extern void lcd_filled_rect(xcoord_t x, int8_t y, xcoord_t w, uint8_t h, uint8_t pat=SOLID, uint8_t att=0);
#define lcd_status_line() lcd_filled_rect(0, 7*FH, DISPLAY_W, 8)
inline void lcd_square(uint8_t x, uint8_t y, uint8_t w, uint8_t att=0) { lcd_rect(x, y, w, w, SOLID, att); }
inline void lcd_square(xcoord_t x, uint8_t y, xcoord_t w, uint8_t att=0) { lcd_rect(x, y, w, w, SOLID, att); }
#define DO_CROSS(xx,yy,ww) \
lcd_vline(xx,yy-ww/2,ww); \
@@ -175,7 +177,7 @@ inline void lcd_square(uint8_t x, uint8_t y, uint8_t w, uint8_t att=0) { lcd_rec
lcd_vline(xx ,yy-ll,ll); \
lcd_vline(xx+1,yy-ll,ll);
extern void lcd_img(uint8_t x, uint8_t y, const pm_uchar * img, uint8_t idx, uint8_t mode);
extern void lcd_img(xcoord_t x, uint8_t y, const pm_uchar * img, uint8_t idx, uint8_t mode);
extern void lcdSetRefVolt(unsigned char val);
extern void lcd_init();
extern void lcd_clear();
+40 -13
View File
@@ -36,13 +36,11 @@
#define BOX_WIDTH 23
#define BAR_HEIGHT (BOX_WIDTH-1l)
#define MARKER_WIDTH 5
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
#define BOX_LIMIT (BOX_WIDTH-MARKER_WIDTH)
#define LBOX_CENTERX ( SCREEN_WIDTH/4 + 10)
#define LBOX_CENTERY (SCREEN_HEIGHT-9-BOX_WIDTH/2)
#define RBOX_CENTERX (3*SCREEN_WIDTH/4 - 10)
#define RBOX_CENTERY (SCREEN_HEIGHT-9-BOX_WIDTH/2)
#define LBOX_CENTERX (DISPLAY_W/4 + 10)
#define LBOX_CENTERY (DISPLAY_H-9-BOX_WIDTH/2)
#define RBOX_CENTERX (3*DISPLAY_W/4 - 10)
#define RBOX_CENTERY (DISPLAY_H-9-BOX_WIDTH/2)
void doMainScreenGrphics()
{
@@ -67,7 +65,7 @@ void doMainScreenGrphics()
for( x = -5, y = 4 ; y < 7 ; x += 5, y += 1 )
{
len = ((calibratedStick[y]+RESX)*BAR_HEIGHT/(RESX*2))+1l; // calculate once per loop
V_BAR(SCREEN_WIDTH/2+x,SCREEN_HEIGHT-8, len)
V_BAR(DISPLAY_W/2+x,DISPLAY_H-8, len)
}
}
}
@@ -92,10 +90,14 @@ void menuMainView(uint8_t event)
}
break;
*/
#if !defined(READONLY)
case EVT_KEY_LONG(KEY_MENU):// go to last menu
pushMenu(lastPopMenu());
killEvents(event);
break;
#endif
case EVT_KEY_BREAK(KEY_RIGHT):
case EVT_KEY_BREAK(KEY_LEFT):
if (view_base <= e_inputs) {
@@ -111,6 +113,8 @@ void menuMainView(uint8_t event)
AUDIO_KEYPAD_UP();
}
break;
#if !defined(READONLY)
case EVT_KEY_LONG(KEY_RIGHT):
pushMenu(menuModelSelect);
killEvents(event);
@@ -119,6 +123,8 @@ void menuMainView(uint8_t event)
pushMenu(menuGeneralSetup);
killEvents(event);
break;
#endif
case EVT_KEY_BREAK(KEY_UP):
case EVT_KEY_BREAK(KEY_DOWN):
g_eeGeneral.view = (event == EVT_KEY_BREAK(KEY_UP) ? (view_base == MAIN_VIEW_MAX ? 0 : view_base + 1) : (view_base == 0 ? MAIN_VIEW_MAX : view_base - 1));
@@ -199,7 +205,12 @@ void menuMainView(uint8_t event)
{
// Flight Phase Name
uint8_t phase = s_perout_flight_phase;
#if defined(PCBX9D)
lcd_putsnAtt(21*FW-1, 5, g_model.phaseData[phase].name, sizeof(g_model.phaseData[phase].name), ZCHAR);
lcd_rect(21*FW-3, 5-2, lcdLastPos-20*FW, FH+3);
#else
lcd_putsnAtt(6*FW, 2*FH, g_model.phaseData[phase].name, sizeof(g_model.phaseData[phase].name), ZCHAR);
#endif
// Model Name
putsModelName(2*FW-2, 0*FH, g_model.name, g_eeGeneral.currModel, DBLSIZE);
@@ -225,19 +236,35 @@ void menuMainView(uint8_t event)
lcd_putcAtt(20*FW-3, 0*FH, '!', INVERS);
}
#if defined(PCBX9D)
// Main timer
if (g_model.timers[0].mode) {
uint8_t att = DBLSIZE | (s_timerState[0]==TMR_BEEPING ? BLINK|INVERS : 0);
putsTime(12*FW-2, FH*2, s_timerVal[0], att, att);
putsTmrMode(s_timerVal[0] >= 0 ? 9*FW-FW/2 : 9*FW-FW/2-7, FH*3, g_model.timers[0].mode, SWCONDENSED);
}
// Second timer
if (g_model.timers[1].mode) {
uint8_t att = DBLSIZE | (s_timerState[1]==TMR_BEEPING ? BLINK|INVERS : 0);
putsTime(23*FW+1, FH*2, s_timerVal[1], att, att);
putsTmrMode(s_timerVal[1] >= 0 ? 20*FW-FW/2+4 : 20*FW-FW/2-3, FH*3, g_model.timers[1].mode, SWCONDENSED);
}
#else
// Main timer
if (g_model.timers[0].mode) {
uint8_t att = DBLSIZE | (s_timerState[0]==TMR_BEEPING ? BLINK|INVERS : 0);
putsTime(12*FW+3, FH*2, s_timerVal[0], att, att);
putsTmrMode(s_timerVal[0] >= 0 ? 9*FW-FW/2+5 : 9*FW-FW/2-2, FH*3, g_model.timers[0].mode, SWCONDENSED);
}
#endif
// Trim sliders
for(uint8_t i=0; i<4; i++)
{
#define TL 27
// LH LV RV RH
static uint8_t x[4] = {128*1/4+2, 3, 128-4, 128*3/4-2};
static uint8_t x[4] = {DISPLAY_W*1/4+2, 3, DISPLAY_W-4, DISPLAY_W*3/4-2};
static uint8_t vert[4] = {0,1,1,0};
uint8_t xm, ym;
xm = x[CONVERT_MODE(i+1)-1];
@@ -308,7 +335,7 @@ void menuMainView(uint8_t event)
case e_outputBars:
#define WBAR2 (50/2)
x0 = i<4 ? 128/4+2 : 128*3/4-2;
x0 = i<4 ? DISPLAY_W/4+2 : DISPLAY_W*3/4-2;
y0 = 38+(i%4)*5;
uint16_t lim = g_model.extendedLimits ? 640*2 : 512*2;
@@ -345,18 +372,18 @@ void menuMainView(uint8_t event)
int8_t len = limit((int16_t)0, (int16_t)(((val+1024) * BAR_HEIGHT) / 2048), (int16_t)BAR_HEIGHT);
#if defined(EXTRA_ROTARY_ENCODERS)
#define V_BAR_W 5
V_BAR(SCREEN_WIDTH/2-8+V_BAR_W*i, SCREEN_HEIGHT-8, len)
V_BAR(DISPLAY_W/2-8+V_BAR_W*i, DISPLAY_H-8, len)
#else //EXTRA_ROTARY_ENCODERS
#define V_BAR_W 5
V_BAR(SCREEN_WIDTH/2-3+V_BAR_W*i, SCREEN_HEIGHT-8, len)
V_BAR(DISPLAY_W/2-3+V_BAR_W*i, DISPLAY_H-8, len)
#endif //EXTRA_ROTARY_ENCODERS
}
#endif // ROTARY_ENCODERS
#if defined(PCBSKY9X)
for (uint8_t i=0; i<NUM_CSW; i++) {
int8_t len = getSwitch(10+i, 0) ? BAR_HEIGHT : 1;
lcd_vline(16+3*i-1,SCREEN_HEIGHT-8-len,len);
lcd_vline(16+3*i ,SCREEN_HEIGHT-8-len,len);
lcd_vline(16+3*i-1,DISPLAY_H-8-len,len);
lcd_vline(16+3*i ,DISPLAY_H-8-len,len);
}
#elif defined(PCBGRUVIN9X) && defined(EXTRA_ROTARY_ENCODERS)
for (uint8_t i=0; i<NUM_CSW; i++)
+9 -9
View File
@@ -56,9 +56,9 @@ void menu_lcd_onoff(uint8_t x,uint8_t y, uint8_t value, uint8_t attr)
void DisplayScreenIndex(uint8_t index, uint8_t count, uint8_t attr)
{
lcd_outdezAtt(128,0,count,attr);
lcd_putcAtt(1+128-FW*(count>9 ? 3 : 2),0,'/',attr);
lcd_outdezAtt(1+128-FW*(count>9 ? 3 : 2),0,index+1,attr);
lcd_outdezAtt(DISPLAY_W,0,count,attr);
lcd_putcAtt(1+DISPLAY_W-FW*(count>9 ? 3 : 2),0,'/',attr);
lcd_outdezAtt(1+DISPLAY_W-FW*(count>9 ? 3 : 2),0,index+1,attr);
}
#if defined(ROTARY_ENCODERS)
@@ -537,8 +537,8 @@ const pm_char * s_global_warning = 0;
void displayBox()
{
lcd_filled_rect(10, 16, 108, 40, SOLID, WHITE);
lcd_rect(10, 16, 108, 40);
lcd_filled_rect(10, 16, DISPLAY_W-20, 40, SOLID, WHITE);
lcd_rect(10, 16, DISPLAY_W-20, 40);
lcd_puts(16, 3*FH, s_warning);
// could be a place for a s_warning_info
}
@@ -606,7 +606,7 @@ int8_t switchMenuItem(uint8_t x, uint8_t y, int8_t value, uint8_t attr, uint8_t
#if defined(SDCARD)
const char *s_menu[MENU_MAX_LINES];
char s_bss_menu[MENU_MAX_LINES*MENU_LINE_LENGTH];
char s_bss_menu[MENU_MAX_LINES][MENU_LINE_LENGTH]; // TODO in reusable buffer?
uint8_t s_menu_item = 0;
uint8_t s_menu_count = 0;
uint8_t s_menu_flags = 0;
@@ -616,12 +616,12 @@ const char * displayMenu(uint8_t event)
{
const char * result = NULL;
lcd_filled_rect(10, 16, 108, s_menu_count * (FH+1) + 2, SOLID, WHITE);
lcd_rect(10, 16, 108, s_menu_count * (FH+1) + 2);
lcd_filled_rect(10, 16, DISPLAY_W-20, s_menu_count * (FH+1) + 2, SOLID, WHITE);
lcd_rect(10, 16, DISPLAY_W-20, s_menu_count * (FH+1) + 2);
for (uint8_t i=0; i<s_menu_count; i++) {
lcd_putsAtt(16, i*(FH+1) + 2*FH + 2, s_menu[i], s_menu_flags);
if (i == s_menu_item) lcd_filled_rect(11, i*(FH+1) + 2*FH + 1, 106, 9);
if (i == s_menu_item) lcd_filled_rect(11, i*(FH+1) + 2*FH + 1, DISPLAY_W-22, 9);
}
switch(event) {
+1 -1
View File
@@ -231,7 +231,7 @@ void displayWarning(uint8_t event);
# define MENU_LINE_LENGTH (8+1)
#endif
extern const char *s_menu[MENU_MAX_LINES];
extern char s_bss_menu[MENU_MAX_LINES*MENU_LINE_LENGTH];
extern char s_bss_menu[MENU_MAX_LINES][MENU_LINE_LENGTH];
extern uint8_t s_menu_count;
extern uint8_t s_menu_flags;
extern uint8_t s_menu_offset;
+102 -36
View File
@@ -34,7 +34,7 @@
#include "open9x.h"
#define WCHART 32
#define X0 (128-WCHART-2)
#define X0 (DISPLAY_W-WCHART-2)
#define Y0 32
enum EnumTabModel {
@@ -123,6 +123,21 @@ bool listSdFiles(const char *path, const char *extension)
s_menu_flags = BSS;
uint8_t offset = 0;
#if 0
static uint16_t s_last_menu_offset = 65535;
char hidden_line[MENU_LINE_LENGTH] = "";
if (s_menu_offset == 0)
s_last_menu_offset = 0;
/* else if (s_menu_offset >= reusableBuffer.sd.count-7)
s_last_menu_offset = s_pgOfs+1; */
else if (s_menu_offset > s_last_menu_offset)
memcpy(hidden_line, &s_bss_menu[0], MENU_LINE_LENGTH);
else
memcpy(hidden_line, &s_bss_menu[MENU_MAX_LINES-1], MENU_LINE_LENGTH);
memset(s_bss_menu, 0, sizeof(s_bss_menu));
FRESULT res = f_opendir(&dir, path); /* Open the directory */
if (res == FR_OK) {
for (;;) {
@@ -136,28 +151,73 @@ bool listSdFiles(const char *path, const char *extension)
#endif
uint8_t len = strlen(fn);
if (len < 5 || strcmp(fn+len-4, extension)) continue;
if (len < 5 || strcmp(fn+len-4, extension) || (fno.fattrib & AM_DIR)) continue;
if (~fno.fattrib & AM_DIR) { /* It is a file. */
if (offset < s_menu_offset) {
offset++;
continue;
}
if (s_menu_count == MENU_MAX_LINES) {
s_menu_more = true;
break;
}
char *menu_entry = &s_bss_menu[s_menu_count*MENU_LINE_LENGTH];
memclear(menu_entry, MENU_LINE_LENGTH);
for (uint8_t i=0; i<MENU_LINE_LENGTH-1; i++) {
if (fn[i] == '.')
printf("Fichier %s\n", fn);
for (uint8_t i=0; i<MENU_MAX_LINES; i++) {
char *line;
if (s_menu_offset >= s_last_menu_offset) {
line = s_bss_menu[i];
if ((!hidden_line[0] || (strcmp(hidden_line, fn) < 0)) && (line[0] == '\0' || strcmp(fn, line) < 0)) {
if (i < MENU_MAX_LINES-1) {
memmove(s_bss_menu[i+1], line, sizeof(s_bss_menu[i]) * (MENU_MAX_LINES-1-i));
}
strncpy(line, fn, MENU_LINE_LENGTH);
break;
menu_entry[i] = fn[i];
}
}
s_menu[s_menu_count++] = menu_entry;
else {
line = s_bss_menu[MENU_MAX_LINES-1-i];
if ((!hidden_line[0] || (strcmp(hidden_line, fn) > 0)) && (line[0] == '\0' || strcmp(fn, line) > 0)) {
if (i < MENU_MAX_LINES-1) {
memmove(s_bss_menu, s_bss_menu[1], sizeof(s_bss_menu[0]) * (MENU_MAX_LINES-1-i));
}
strncpy(line, fn, MENU_LINE_LENGTH);
break;
}
}
s_menu[i] = line;
}
}
s_menu_count = MENU_MAX_LINES;
s_menu_more = true;
}
#else
FRESULT res = f_opendir(&dir, path); /* Open the directory */
if (res == FR_OK) {
for (;;) {
res = f_readdir(&dir, &fno); /* Read a directory item */
if (res != FR_OK || fno.fname[0] == 0) break; /* Break on error or end of dir */
#if _USE_LFN
fn = *fno.lfname ? fno.lfname : fno.fname;
#else
fn = fno.fname;
#endif
uint8_t len = strlen(fn);
if (len < 5 || strcmp(fn+len-4, extension) || (fno.fattrib & AM_DIR)) continue;
if (offset < s_menu_offset) {
offset++;
continue;
}
if (s_menu_count == MENU_MAX_LINES) {
s_menu_more = true;
break;
}
char *menu_entry = s_bss_menu[s_menu_count];
memclear(menu_entry, MENU_LINE_LENGTH);
for (uint8_t i=0; i<MENU_LINE_LENGTH-1; i++) {
if (fn[i] == '.')
break;
menu_entry[i] = fn[i];
}
s_menu[s_menu_count++] = menu_entry;
}
}
#endif
return s_menu_count;
}
@@ -383,7 +443,7 @@ void menuModelSelect(uint8_t event)
if (k == sub) {
if (s_copyMode == COPY_MODE) {
k = s_copySrcRow;
lcd_putc(20*FW+2, y, '+');
lcd_putc(DISPLAY_W-FW, y, '+');
}
else {
k = sub + s_copyTgtOfs;
@@ -470,7 +530,7 @@ void menuModelSelect(uint8_t event)
#endif
}
void EditName(uint8_t x, uint8_t y, char *name, uint8_t size, uint8_t event, bool active, uint8_t & cur)
void editName(uint8_t x, uint8_t y, char *name, uint8_t size, uint8_t event, bool active, uint8_t & cur)
{
lcd_putsLeft(y, STR_NAME);
@@ -575,7 +635,7 @@ void menuModelSetup(uint8_t event)
switch(k) {
case ITEM_MODEL_NAME:
EditName(MODEL_PARAM_OFS, y, g_model.name, sizeof(g_model.name), event, attr, m_posHorz);
editName(MODEL_PARAM_OFS, y, g_model.name, sizeof(g_model.name), event, attr, m_posHorz);
#if defined(PCBSKY9X)
memcpy(ModelNames[g_eeGeneral.currModel], g_model.name, sizeof(g_model.name));
#endif
@@ -585,7 +645,7 @@ void menuModelSetup(uint8_t event)
case ITEM_MODEL_TIMER2:
{
TimerData *timer = &g_model.timers[k-ITEM_MODEL_TIMER1];
putsStrIdx(0*FW, y, STR_TIMER, k-ITEM_MODEL_TIMER1+1); // TODO keep that?
putsStrIdx(0*FW, y, STR_TIMER, k-ITEM_MODEL_TIMER1+1);
putsTmrMode(MODEL_PARAM_OFS, y, timer->mode, (attr && m_posHorz==0) ? blink : 0);
putsTime(15*FW, y, timer->val,
(attr && m_posHorz==1 ? blink:0),
@@ -808,7 +868,13 @@ static uint8_t s_currIdx;
#define MIXES_2ND_COLUMN (10*FW)
#endif
#if defined(PCBX9D)
#define EXPO_ONE_2ND_COLUMN (DISPLAY_W - 88)
#define EXPO_ONE_FP_WIDTH (9*FW)
#else
#define EXPO_ONE_2ND_COLUMN (7*FW+2)
#define EXPO_ONE_FP_WIDTH (5*FW)
#endif
uint8_t editDelay(const uint8_t y, const uint8_t event, const uint8_t attr, const pm_char *str, uint8_t delay)
{
@@ -830,12 +896,12 @@ PhasesType editPhases(uint8_t x, uint8_t y, uint8_t event, PhasesType value, uin
{
lcd_putsLeft(y, STR_FPHASE);
#if defined(PCBSKY9X)
#if defined(PCBSKY9X) && !defined(PCBX9D)
bool expoMenu = (x==EXPO_ONE_2ND_COLUMN-2*FW);
#endif
for (uint8_t p=0; p<MAX_PHASES; p++) {
#if defined(PCBSKY9X)
#if defined(PCBSKY9X) && !defined(PCBX9D)
if (expoMenu && ((attr && p < m_posHorz-4) || (x > EXPO_ONE_2ND_COLUMN+2*FW)))
continue;
#endif
@@ -871,7 +937,7 @@ void menuModelPhaseOne(uint8_t event)
uint8_t attr = (sub==k ? (s_editMode>0 ? BLINK|INVERS : INVERS) : 0);
switch(i) {
case 0:
EditName(MIXES_2ND_COLUMN, y, phase->name, sizeof(phase->name), event, attr, m_posHorz);
editName(MIXES_2ND_COLUMN, y, phase->name, sizeof(phase->name), event, attr, m_posHorz);
break;
case 1:
phase->swtch = switchMenuItem(MIXES_2ND_COLUMN, y, phase->swtch, attr, event);
@@ -992,21 +1058,21 @@ void menuModelPhasesAll(uint8_t event)
#endif
lcd_putsnAtt(4*FW+NAME_OFS, y, p->name, sizeof(p->name), ZCHAR);
if (i == 0) {
lcd_puts(11*FW+SWITCH_OFS, y, STR_DEFAULT);
lcd_puts((5+LEN_FP_NAME)*FW+SWITCH_OFS, y, STR_DEFAULT);
}
else {
putsSwitches(11*FW+SWITCH_OFS, y, p->swtch, 0);
putsSwitches((5+LEN_FP_NAME)*FW+SWITCH_OFS, y, p->swtch, 0);
for (uint8_t t=0; t<NUM_STICKS; t++) {
putsTrimMode((15+t)*FW+TRIMS_OFS, y, i, t, 0);
putsTrimMode((9+LEN_FP_NAME+t)*FW+TRIMS_OFS, y, i, t, 0);
}
#if defined PCBGRUVIN9X
#if defined(PCBGRUVIN9X)
for (uint8_t t=0; t<NUM_ROTARY_ENCODERS; t++) {
putsRotaryEncoderMode((19+t)*FW+TRIMS_OFS+ROTARY_ENC_OFS, y, i, t, 0);
putsRotaryEncoderMode((13+LEN_FP_NAME+t)*FW+TRIMS_OFS+ROTARY_ENC_OFS, y, i, t, 0);
}
#endif
}
if (p->fadeIn || p->fadeOut)
lcd_putc(20*FW+2, y, (p->fadeIn && p->fadeOut) ? '*' : (p->fadeIn ? 'I' : 'O'));
lcd_putc(DISPLAY_W-FW, y, (p->fadeIn && p->fadeOut) ? '*' : (p->fadeIn ? 'I' : 'O'));
}
#if defined(PCBSKY9X)
@@ -1466,7 +1532,7 @@ void menuModelExpoOne(uint8_t event)
{
#if defined(PCBSKY9X)
case EXPO_FIELD_NAME:
EditName(EXPO_ONE_2ND_COLUMN-3*FW, y, ed->name, sizeof(ed->name), event, attr, m_posHorz);
editName(EXPO_ONE_2ND_COLUMN+3*FW-sizeof(ed->name)*FW, y, ed->name, sizeof(ed->name), event, attr, m_posHorz);
break;
#endif
case EXPO_FIELD_WIDTH:
@@ -1506,7 +1572,7 @@ void menuModelExpoOne(uint8_t event)
#endif
#if defined(FLIGHT_PHASES)
case EXPO_FIELD_FLIGHT_PHASE:
ed->phases = editPhases(EXPO_ONE_2ND_COLUMN-2*FW, y, event, ed->phases, attr);
ed->phases = editPhases(EXPO_ONE_2ND_COLUMN+3*FW-EXPO_ONE_FP_WIDTH, y, event, ed->phases, attr);
break;
#endif
case EXPO_FIELD_SWITCH:
@@ -1524,8 +1590,8 @@ void menuModelExpoOne(uint8_t event)
int16_t x512 = calibratedStick[ed->chn];
int16_t y512 = expoFn(x512);
lcd_outdezAtt(20*FW, 6*FH, x512*25/256, 0);
lcd_outdezAtt(14*FW, 1*FH, y512*25/256, 0);
lcd_outdezAtt(DISPLAY_W-8, 6*FH, x512*25/256, 0);
lcd_outdezAtt(DISPLAY_W-8-6*FW, 1*FH, y512*25/256, 0);
x512 = X0+x512/(RESXu/WCHART);
y512 = (DISPLAY_H-1) - (uint16_t)((y512+RESX)/2) * (DISPLAY_H-1) / RESX;
@@ -1569,7 +1635,7 @@ void menuModelMixOne(uint8_t event)
switch(i) {
#if defined(PCBSKY9X)
case MIX_FIELD_NAME:
EditName(MIXES_2ND_COLUMN, y, md2->name, sizeof(md2->name), event, attr, m_posHorz);
editName(MIXES_2ND_COLUMN, y, md2->name, sizeof(md2->name), event, attr, m_posHorz);
break;
#endif
case MIX_FIELD_SOURCE:
@@ -2175,7 +2241,7 @@ void menuModelLimits(uint8_t event)
#endif
#if defined(PPM_LIMITS_SYMETRICAL)
case ITEM_LIMITS_SYMETRICAL:
lcd_putcAtt(20*FW+2, y, ld->symetrical ? '=' : '^', attr);
lcd_putcAtt(DISPLAY_W-FW, y, ld->symetrical ? '=' : '^', attr);
if (active) {
CHECK_INCDEC_MODELVAR(event, ld->symetrical, 0, 1);
}
+15 -5
View File
@@ -136,7 +136,7 @@ PACK(typedef struct t_EEGeneral {
int8_t backlightMode;
TrainerData trainer;
uint8_t view; //index of subview in main scrren
uint8_t btBaudrate:3; // TODO only needed on SKY9X
uint8_t btBaudrate:3; // only used on SKY9X board
int8_t beeperMode:2;
uint8_t spare1:1;
uint8_t disableMemoryWarning:1;
@@ -157,7 +157,7 @@ PACK(typedef struct t_EEGeneral {
uint8_t templateSetup; //RETA order according to chout_ar array
int8_t PPM_Multiplier;
int8_t hapticLength;
uint8_t reNavigation; // TODO not needed on stock board
uint8_t reNavigation; // not used on STOCK board
int8_t beeperLength:3;
uint8_t hapticStrength:3;
uint8_t gpsFormat:1;
@@ -174,6 +174,16 @@ PACK(typedef struct t_EEGeneral {
// eeprom modelspec
#if defined(PCBX9D)
#define LEN_EXPOMIX_NAME 10
#define LEN_FP_NAME 10
#elif defined(PCBSKY9X)
#define LEN_EXPOMIX_NAME 6
#define LEN_FP_NAME 6
#else
#define LEN_FP_NAME 6
#endif
#if defined(PCBSKY9X)
PACK(typedef struct t_ExpoData {
uint8_t mode; // 0=end, 1=pos, 2=neg, 3=both
@@ -182,7 +192,7 @@ PACK(typedef struct t_ExpoData {
uint16_t phases;
int8_t weight;
uint8_t curveMode;
char name[6];
char name[LEN_EXPOMIX_NAME];
int8_t curveParam;
}) ExpoData;
#else
@@ -292,7 +302,7 @@ PACK(typedef struct t_MixData {
uint8_t speedDown;
uint8_t srcRaw;
int8_t sOffset;
char name[6];
char name[LEN_EXPOMIX_NAME];
}) MixData;
#else
#define MAX_DELAY 15 /* 7.5 seconds */
@@ -602,7 +612,7 @@ PACK(typedef struct t_SwashRingData { // Swash Ring data
PACK(typedef struct t_PhaseData {
TRIM_ARRAY;
int8_t swtch; // swtch of phase[0] is not used
char name[6];
char name[LEN_FP_NAME];
uint8_t fadeIn:4;
uint8_t fadeOut:4;
ROTARY_ENCODER_ARRAY
+14 -5
View File
@@ -68,7 +68,11 @@ OS_MutexID mixerMutex;
#if defined(SPLASH)
const pm_uchar splashdata[] PROGMEM = { 'S','P','S',0,
#include "s9xsplash.lbm"
#if defined(PCBX9D)
#include "splash_X9D.lbm"
#else
#include "splash_9x.lbm"
#endif
'S','P','E',0};
const pm_uchar * splash_lbm = splashdata+4;
#endif
@@ -291,13 +295,13 @@ int16_t intpol(int16_t x, uint8_t idx) // -100, -75, -50, -25, 0 ,25 ,50, 75, 10
erg = (int16_t)crv.crv[crv.points-1] * (RESX/4);
}
else {
uint16_t a=0, b=0; // TODO init not needed
uint16_t a=0, b=0;
uint8_t i;
if (crv.custom) {
for (i=0; i<crv.points-1; i++) {
a = (i==0 ? 0 : (100 * (RESX/4) / 25 + crv.crv[crv.points+i-1] * (RESX/4) / 25));
a = b;
b = (i==crv.points-2 ? 2*RESX : (100 * (RESX/4) / 25 + crv.crv[crv.points+i] * (RESX/4) / 25));
if ((uint16_t)x>=a && (uint16_t)x<=b) break;
if ((uint16_t)x<=b) break;
}
}
else {
@@ -1219,6 +1223,9 @@ void message(const pm_char *title, const pm_char *t, const char *last MESSAGE_SO
{
lcd_clear();
#if defined(PCBX9D)
lcd_img(DISPLAY_W-29, 0, asterisk_lbm, 0, 0);
#endif
#if defined(PCBGRUVIN9X) || defined(PCBSKY9X) || defined(M128) || defined(EXTSTD)
lcd_img(2, 0, asterisk_lbm, 0, 0);
#else
@@ -1231,7 +1238,7 @@ void message(const pm_char *title, const pm_char *t, const char *last MESSAGE_SO
lcd_putsAtt(6*FW, 0, title, DBLSIZE);
lcd_putsAtt(6*FW, 2*FH, STR_WARNING, DBLSIZE);
#endif
lcd_filled_rect(0, 0, 128, 32);
lcd_filled_rect(0, 0, DISPLAY_W, 32);
if (t) lcd_putsLeft(5*FH, t);
if (last) {
lcd_putsLeft(7*FH, last);
@@ -3429,7 +3436,9 @@ int main(void)
stack_paint();
g_menuStack[0] = menuMainView;
#if !defined(READONLY)
g_menuStack[1] = menuModelSelect;
#endif
lcdSetRefVolt(25);
+1 -1
View File
@@ -584,7 +584,7 @@ extern uint8_t pxxFlag;
#endif
#define PXX_SEND_RXNUM 0x01
#define PXX_SEND_FAILSAFE 0x02 // TODO where is it used?
#define PXX_SEND_FAILSAFE 0x02
#define ZCHAR_MAX (40 + LEN_SPECIAL_CHARS)
+4
View File
@@ -539,6 +539,10 @@ extern uint32_t transSpeed;
#define SD_CSD_MULT(pSd) (1 << (SD_CSD_C_SIZE_MULT(pSd) + 2))
#define SD_CSD_READ_BL_LEN(pSd) SD_CSD(pSd, 80, 4) ///< Max. read data block length
#define SD_CSD_BLOCK_LEN(pSd) (1 << SD_CSD_READ_BL_LEN(pSd))
#define SD_CSD_BLOCKNR(pSd) ((SD_CSD_C_SIZE(pSd) + 1) * SD_CSD_MULT(pSd))
#define SD_CSD_BLOCKNR_HC(pSd) ((SD_CSD_C_SIZE_HC(pSd) + 1) * 1024)
+3 -3
View File
@@ -1,6 +1,6 @@
#define s9xsplash_width 128
#define s9xsplash_height 64
static unsigned char s9xsplash_bits[] = {
#define splash_width 128
#define splash_height 64
static unsigned char splash_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+9
View File
@@ -0,0 +1,9 @@
192,64,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfb,0xe3,0x03,0x03,0x03,0x03,0x1f,0xff,0xff,0xff,0x7f,0x3f,0x0f,0x07,0x03,0x03,0x83,0xe3,0xf3,0xfb,0xff,0x7f,0x1f,0x0f,0x07,0x07,0x83,0x83,0xc3,0xc3,0xc3,0x03,0x07,0x07,0x0f,0x1f,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x03,0x03,0x03,0x03,0x83,0x83,0x83,0x83,0x83,0x03,0x07,0x07,0x07,0x0f,0x1f,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x0f,0x07,0x03,0x01,0x81,0xe0,0xe0,0xf0,0xf0,0xf0,0xe0,0xc0,0x01,0x01,0x03,0x07,0x0f,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x80,0xe3,0xe1,0xf1,0xf0,0xf0,0xc0,0x00,0x00,0x01,0x03,0x0f,0xff,0xff,0xff,0x3f,0x0f,0x07,0x03,0x03,0x81,0xe0,0xe0,0xf0,0xf0,0xf0,0xe0,0xe0,0x01,0x01,0x03,0x07,0x1f,0xff,0xff,0xff,0xff,0x7f,0x03,0x00,0x00,0x00,0x00,0xc0,0xe3,0xf1,0xf0,0xf0,0x00,0x00,0x00,0x00,0x01,0x03,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x60,0x00,0x00,0x00,0x03,0x00,0x80,0xe0,0xf0,0xf8,0xfe,0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x3c,0xff,0xff,0xff,0xff,0x3f,0x0f,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0x3f,0x01,0x00,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0x7e,0x00,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x80,0x00,0x00,0x00,0x00,0x3e,0x7f,0xff,0xff,0xff,0x7f,0x7f,0x3f,0x07,0x00,0x00,0x00,0x80,0xf0,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x3c,0xff,0xff,0xff,0x7f,0x7f,0x3f,0x07,0x00,0x00,0x00,0xc0,0xf8,0xff,0xff,0x80,0x00,0x00,0x00,0x00,0x30,0x70,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0x70,0x70,0xf0,0xf0,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0xff,0x3f,0x1f,0x0f,0x07,0x03,0x00,0xc0,0xe0,0xf0,0xe0,0x00,0x00,0x00,0x03,0x1f,0x7f,0xff,0xff,0xff,0xff,0xff,0x3f,0x7f,0x7c,0xf8,0xf8,0xf0,0xf0,0xf0,0x70,0x30,0x18,0x08,0x00,0x00,0x80,0xe0,0xf8,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x70,0x7f,0x7f,0x7f,0x7f,0x3f,0x1f,0x1f,0x07,0x00,0x00,0x80,0xc0,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xfc,0xf8,0xf8,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf8,0xf8,0xfc,0xfe,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0xf8,0xf8,0xf8,0xf8,0xf0,0xf0,0xf0,0xf0,0xf0,0xf8,0xfc,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xfc,0xf8,0xf8,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf8,0xf8,0xfc,0xff,0xff,0xff,0xff,0xf1,0xf0,0xf0,0xf0,0xf0,0xfc,0xff,0xff,0xff,0xff,0xff,0xf0,0xf0,0xf0,0xf0,0xf0,0xfc,0xf7,0xf3,0xf1,0xf0,0xf0,0xf0,0xf8,0xfc,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0xf0,0xf0,0xf0,0xf0,0xf3,0xff,0xff,0xff,0xf9,0xf8,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf8,0xf8,0xf8,0xfc,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf1,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf8,0xf8,0xfc,0xfe,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x18,0x18,0x18,0x18,0x18,0x1e,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+131
View File
@@ -0,0 +1,131 @@
#define splash_X9D_width 192
#define splash_X9D_height 64
static unsigned char splash_X9D_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0x7f, 0xe0, 0x1f, 0xf8, 0x81, 0xff, 0x07, 0xe0, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xe0, 0x0f, 0x7c, 0x00, 0xfe, 0x07, 0x00, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xe0, 0x07, 0x3e, 0x00, 0xfc, 0x03, 0x00, 0xfe, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xc1, 0x07, 0x1f, 0x00, 0xf8, 0x03, 0x00, 0xfc, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xc1, 0x03, 0x1f, 0x38, 0xf8, 0x03, 0x00, 0xfc, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xc1, 0x81, 0x0f, 0x3e, 0xf0, 0x83, 0x0f, 0xf8, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x01, 0xff, 0xc1, 0xc1, 0xff, 0x03, 0xfe, 0x0f,
0x06, 0xfe, 0x83, 0xc0, 0x0f, 0x7e, 0xf0, 0x83, 0x1f, 0xf8, 0xff, 0xff,
0xff, 0xff, 0xff, 0x7f, 0x00, 0xfc, 0x41, 0x80, 0xff, 0x01, 0xf8, 0x0f,
0x02, 0xfc, 0x83, 0xe0, 0x07, 0x7e, 0xf0, 0x81, 0x3f, 0xf8, 0xff, 0xff,
0xff, 0xff, 0xff, 0x3f, 0x00, 0xf8, 0x00, 0x00, 0x7f, 0x00, 0xf0, 0x07,
0x00, 0xf8, 0x07, 0xe0, 0x07, 0x7f, 0xf0, 0xc1, 0x3f, 0xf8, 0xff, 0xff,
0xff, 0xff, 0xff, 0x1f, 0x00, 0xf0, 0x00, 0x00, 0x3f, 0x00, 0xe0, 0x07,
0x00, 0xf8, 0x07, 0xf0, 0x07, 0x7f, 0xf0, 0xc1, 0x3f, 0xf8, 0xff, 0xff,
0xff, 0xff, 0xff, 0x0f, 0x38, 0xe0, 0x00, 0x07, 0x1e, 0x70, 0xe0, 0x07,
0x1c, 0xf8, 0x07, 0xf8, 0x07, 0x3f, 0xf0, 0xc1, 0x3f, 0xf8, 0xff, 0xff,
0xff, 0xff, 0xff, 0x0f, 0x7e, 0xe0, 0xc0, 0x07, 0x1e, 0xfc, 0xc1, 0x07,
0x1e, 0xf8, 0x0f, 0xfc, 0x07, 0x3f, 0xf0, 0xc1, 0x3f, 0xf8, 0xff, 0xff,
0xff, 0xff, 0xff, 0x07, 0xfe, 0xe0, 0xc0, 0x0f, 0x0e, 0xfc, 0xc1, 0x07,
0x1f, 0xf8, 0x0f, 0xfc, 0x07, 0x1e, 0xf0, 0xc0, 0x3f, 0xf8, 0xff, 0xff,
0xff, 0xff, 0xff, 0x07, 0xff, 0xe0, 0xe0, 0x0f, 0x0e, 0xfe, 0xc1, 0x03,
0x1f, 0xf8, 0x07, 0xfe, 0x07, 0x1e, 0xf8, 0xc0, 0x1f, 0xfc, 0xff, 0xff,
0xff, 0xff, 0xff, 0x03, 0xff, 0x60, 0xe0, 0x0f, 0x06, 0x00, 0xc0, 0x83,
0x1f, 0xfc, 0x03, 0xfc, 0x0f, 0x00, 0xf8, 0xe0, 0x1f, 0xfc, 0xff, 0xff,
0xff, 0xff, 0xff, 0x83, 0xff, 0x60, 0xe0, 0x0f, 0x06, 0x00, 0xc0, 0x83,
0x1f, 0xfc, 0x03, 0xfc, 0x0f, 0x00, 0xf8, 0xe0, 0x1f, 0xfc, 0xff, 0xff,
0xff, 0xff, 0xff, 0x83, 0xff, 0x60, 0xf0, 0x0f, 0x06, 0x00, 0xc0, 0x83,
0x1f, 0xfc, 0x01, 0xf8, 0x1f, 0x00, 0xf8, 0xe0, 0x1f, 0xfc, 0xff, 0xff,
0xff, 0xff, 0xff, 0x83, 0x7f, 0x60, 0xf0, 0x07, 0x07, 0x00, 0xc0, 0x83,
0x1f, 0xfc, 0x00, 0xf8, 0x7f, 0x30, 0xfc, 0xe0, 0x0f, 0xfe, 0xff, 0xff,
0xff, 0xff, 0xff, 0x83, 0x7f, 0x70, 0xf0, 0x07, 0x07, 0xff, 0xff, 0x81,
0x0f, 0x7c, 0x20, 0xf8, 0xff, 0x1f, 0x7c, 0xf0, 0x0f, 0xfe, 0xff, 0xff,
0xff, 0xff, 0xff, 0x83, 0x7f, 0x30, 0xf0, 0x07, 0x07, 0xff, 0xff, 0xc1,
0x0f, 0x3e, 0x70, 0xf0, 0xff, 0x0f, 0x7e, 0xf0, 0x03, 0xfe, 0xff, 0xff,
0xff, 0xff, 0xff, 0x03, 0x3f, 0x30, 0xe0, 0x83, 0x07, 0xfe, 0xff, 0xc1,
0x0f, 0x1e, 0x78, 0xf0, 0xfb, 0x07, 0x7e, 0xf0, 0x01, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x07, 0x0e, 0x38, 0xe0, 0x80, 0x0f, 0xfc, 0xf3, 0xc1,
0x0f, 0x1e, 0x78, 0xe0, 0xe3, 0x03, 0x7f, 0x00, 0x80, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x07, 0x00, 0x3c, 0x00, 0xc0, 0x0f, 0x00, 0xf0, 0xc1,
0x07, 0x0e, 0xfc, 0xe0, 0x03, 0x80, 0x7f, 0x00, 0x80, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x0f, 0x00, 0x3e, 0x00, 0xe0, 0x1f, 0x00, 0xf0, 0xc0,
0x07, 0x06, 0xfe, 0xe0, 0x01, 0xc0, 0x3f, 0x00, 0xe0, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x1f, 0x00, 0x1f, 0x00, 0xf0, 0x3f, 0x00, 0xf8, 0xe0,
0x07, 0x03, 0xff, 0xc1, 0x01, 0xe0, 0x3f, 0x00, 0xf0, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x7f, 0xc0, 0x1f, 0x3c, 0xf8, 0xff, 0x00, 0xfe, 0xe0,
0x07, 0x81, 0xff, 0xc1, 0x07, 0xfc, 0x3f, 0x00, 0xfc, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+1 -1
View File
@@ -157,7 +157,7 @@ const pm_char STR_RANGE[] PROGMEM = TR_RANGE;
const pm_char STR_BAR[] PROGMEM = TR_BAR;
const pm_char STR_ALARM[] PROGMEM = TR_ALARM;
const pm_char STR_USRDATA[] PROGMEM = TR_USRDATA;
const pm_char STR_BLADES[] PROGMEM = TR_BLADES; // TODO check that it is optimized away when no FRSKY
const pm_char STR_BLADES[] PROGMEM = TR_BLADES;
const pm_char STR_BARS[] PROGMEM = TR_BARS;
const pm_char STR_DISPLAY[] PROGMEM = TR_DISPLAY;
const pm_char STR_BEEPERMODE[] PROGMEM = TR_BEEPERMODE;