1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-24 00:35:18 +03:00

Merge remote-tracking branch 'origin/next' into

bsongis/Issue592_sticky_switches

Conflicts:
	radio/src/gui/menu_model.cpp
This commit is contained in:
Bertrand Songis 2014-02-05 08:01:40 +01:00
commit 873d2c4377
54 changed files with 32441 additions and 30508 deletions

View file

@ -64,7 +64,8 @@ void lcd_img(xcoord_t x, uint8_t y, const pm_uchar * img, uint8_t idx, LcdFlags
for (uint8_t yb = 0; yb < hb; yb++) {
uint8_t *p = &displayBuf[ (y / 8 + yb) * LCD_W + x ];
for (xcoord_t i=0; i<w; i++){
uint8_t b = pgm_read_byte(q++);
uint8_t b = pgm_read_byte(q);
q++;
ASSERT_IN_DISPLAY(p);
#if defined(PCBTARANIS)
uint8_t val = inv ? ~b : b;
@ -199,7 +200,7 @@ void lcd_putcAtt(xcoord_t x, uint8_t y, const unsigned char c, LcdFlags flags)
b1 = ~b1;
b2 = ~b2;
}
uint8_t ym8 = (y & 0x07);
const uint8_t ym8 = (y & 0x07);
if (&p[LCD_W+1] < DISPLAY_END) {
LCD_BYTE_FILTER(p, ~(0xff << ym8), b1 << ym8);
uint8_t *r = p + LCD_W;
@ -220,7 +221,7 @@ void lcd_putcAtt(xcoord_t x, uint8_t y, const unsigned char c, LcdFlags flags)
}
else if (flags & SMLSIZE) {
q = (c < 0xC0) ? &font_4x6[(c-0x20)*5] : &font_4x6_extra[(c-0xC0)*5];
uint8_t ym8 = (y & 0x07);
const uint8_t ym8 = (y & 0x07);
for (int8_t i=0; i<=6; i++) {
uint8_t b = 0;
if (!i) {
@ -247,7 +248,7 @@ void lcd_putcAtt(xcoord_t x, uint8_t y, const unsigned char c, LcdFlags flags)
}
else if (flags & TINSIZE) {
q = &font_3x5[((uint16_t)c-0x2D)*3];
uint8_t ym8 = (y & 0x07);
const uint8_t ym8 = (y & 0x07);
for (int8_t i=0; i<=4; i++) {
uint8_t b = 0;
if (!i) {
@ -273,7 +274,7 @@ void lcd_putcAtt(xcoord_t x, uint8_t y, const unsigned char c, LcdFlags flags)
}
#endif
else {
uint8_t ym8 = (y & 0x07);
const uint8_t ym8 = (y & 0x07);
#if defined(BOLD_FONT) && defined(CPUM64) && !defined(EXTSTD)
uint8_t bb = 0;
if (inv) bb = 0xff;
@ -360,11 +361,9 @@ void lcd_putsiAtt(xcoord_t x, uint8_t y,const pm_char * s,uint8_t idx, LcdFlags
void lcd_putsnAtt(xcoord_t x, uint8_t y, const pm_char * s, uint8_t len, LcdFlags mode)
{
#if defined(CPUARM)
xcoord_t orig_x = x;
#endif
bool setx = false;
while(len!=0) {
while(len--) {
unsigned char c;
switch (mode & (BSS+ZCHAR)) {
case BSS:
@ -394,21 +393,20 @@ void lcd_putsnAtt(xcoord_t x, uint8_t y, const pm_char * s, uint8_t len, LcdFlag
else if (c == 0x1F) { //X-coord prefix
setx = true;
}
#if defined(CPUARM)
else if (c == 0x1E) { //NEWLINE
x = orig_x;
y += FH;
#if defined(CPUARM)
if (mode & DBLSIZE) y += FH;
else if (mode & MIDSIZE) y += 4;
else if (mode & SMLSIZE) y--;
#endif
if (y >= LCD_H) break;
}
#endif
else {
x += (c*FW/2); //EXTENDED SPACE
}
s++;
len--;
}
lcdLastPos = x;
lcdNextPos = x;
@ -671,7 +669,7 @@ void lcd_hlineStip(xcoord_t x, uint8_t y, xcoord_t w, uint8_t pat, LcdFlags att)
uint8_t *p = &displayBuf[ y / 8 * LCD_W + x ];
uint8_t msk = BITMASK(y%8);
while(w) {
while(w--) {
if(pat&1) {
lcd_mask(p, msk, att);
pat = (pat >> 1) | 0x80;
@ -679,7 +677,6 @@ void lcd_hlineStip(xcoord_t x, uint8_t y, xcoord_t w, uint8_t pat, LcdFlags att)
else {
pat = pat >> 1;
}
w--;
p++;
}
}