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

layout fixes

This commit is contained in:
mhotar 2013-12-27 01:44:58 +01:00
parent 7e5d0a8bba
commit bbae0f7533
4 changed files with 22 additions and 33 deletions

View file

@ -258,7 +258,7 @@ void menuGeneralSetup(uint8_t event)
case ITEM_SETUP_TIME: case ITEM_SETUP_TIME:
lcd_putsLeft(y, STR_TIME); lcd_putsLeft(y, STR_TIME);
lcd_putc(RADIO_SETUP_TIME_COLUMN-1, y, ':'); lcd_putc(RADIO_SETUP_TIME_COLUMN+3*FW-4, y, ':'); lcd_putc(RADIO_SETUP_TIME_COLUMN+1, y, ':'); lcd_putc(RADIO_SETUP_TIME_COLUMN+3*FW-2, y, ':');
for (uint8_t j=0; j<3; j++) { for (uint8_t j=0; j<3; j++) {
uint8_t rowattr = (m_posHorz==j ? attr : 0); uint8_t rowattr = (m_posHorz==j ? attr : 0);
switch (j) { switch (j) {

View file

@ -318,7 +318,7 @@ void displayTopBar()
/* RTC time */ /* RTC time */
struct gtm t; struct gtm t;
gettime(&t); gettime(&t);
lcd_putcAtt(BAR_TIME_X-1, BAR_Y+1, ':', BLINK); lcd_putcAtt(BAR_TIME_X+1, BAR_Y+1, ':', BLINK);
lcd_outdezNAtt(BAR_TIME_X+1, BAR_Y+1, t.tm_hour, LEADING0, 2); lcd_outdezNAtt(BAR_TIME_X+1, BAR_Y+1, t.tm_hour, LEADING0, 2);
lcd_outdezNAtt(BAR_TIME_X+3*FWNUM-1, BAR_Y+1, t.tm_min, LEADING0, 2); lcd_outdezNAtt(BAR_TIME_X+3*FWNUM-1, BAR_Y+1, t.tm_min, LEADING0, 2);

View file

@ -100,9 +100,9 @@ void displayGpsTime()
{ {
uint8_t att = (TELEMETRY_STREAMING() ? LEFT|LEADING0 : LEFT|LEADING0|BLINK); uint8_t att = (TELEMETRY_STREAMING() ? LEFT|LEADING0 : LEFT|LEADING0|BLINK);
lcd_outdezNAtt(CENTER_OFS+6*FW+5, STATUS_BAR_Y, frskyData.hub.hour, att, 2); lcd_outdezNAtt(CENTER_OFS+6*FW+5, STATUS_BAR_Y, frskyData.hub.hour, att, 2);
lcd_putcAtt(CENTER_OFS+8*FW+2, STATUS_BAR_Y, ':', att); lcd_putcAtt(CENTER_OFS+8*FW+4, STATUS_BAR_Y, ':', att);
lcd_outdezNAtt(CENTER_OFS+9*FW+2, STATUS_BAR_Y, frskyData.hub.min, att, 2); lcd_outdezNAtt(CENTER_OFS+9*FW+2, STATUS_BAR_Y, frskyData.hub.min, att, 2);
lcd_putcAtt(CENTER_OFS+11*FW-1, STATUS_BAR_Y, ':', att); lcd_putcAtt(CENTER_OFS+11*FW+1, STATUS_BAR_Y, ':', att);
lcd_outdezNAtt(CENTER_OFS+12*FW-1, STATUS_BAR_Y, frskyData.hub.sec, att, 2); lcd_outdezNAtt(CENTER_OFS+12*FW-1, STATUS_BAR_Y, frskyData.hub.sec, att, 2);
lcd_status_line(); lcd_status_line();
} }

View file

@ -265,7 +265,7 @@ void lcd_putcAtt(xcoord_t x, uint8_t y, const unsigned char c, LcdFlags flags)
uint8_t ym8 = (y & 0x07); uint8_t ym8 = (y & 0x07);
#if defined(BOLD_FONT) #if defined(BOLD_FONT)
#if !defined(CPUM64) || defined(EXTSTD) #if !defined(CPUM64) || defined(EXTSTD) || 1
uint8_t skipcol = 7; uint8_t skipcol = 7;
if ( c >= 'A') skipcol = 4; if ( c >= 'A') skipcol = 4;
if ( c == 'T') skipcol = 5; if ( c == 'T') skipcol = 5;
@ -273,7 +273,7 @@ void lcd_putcAtt(xcoord_t x, uint8_t y, const unsigned char c, LcdFlags flags)
uint8_t bb = 0; uint8_t bb = 0;
if (inv) bb = 0xff; if (inv) bb = 0xff;
#endif #endif
#if !defined(CPUM64) || defined(EXTSTD) #if !defined(CPUM64) || defined(EXTSTD) || 1
for (int8_t i=0; i<=7; i++) { for (int8_t i=0; i<=7; i++) {
#else #else
for (int8_t i=0; i<=6; i++) { for (int8_t i=0; i<=6; i++) {
@ -289,7 +289,7 @@ void lcd_putcAtt(xcoord_t x, uint8_t y, const unsigned char c, LcdFlags flags)
else if (i <= 5) b = pgm_read_byte(q++); else if (i <= 5) b = pgm_read_byte(q++);
if (b == 0xff) continue; if (b == 0xff) continue;
if (inv) b = ~b; if (inv) b = ~b;
#if !defined(CPUM64) || defined(EXTSTD) #if !defined(CPUM64) || defined(EXTSTD) || 1
if (!(flags & BOLD) && (i == 7)) continue; if (!(flags & BOLD) && (i == 7)) continue;
#endif #endif
if ((flags & CONDENSED) && i==2) { if ((flags & CONDENSED) && i==2) {
@ -306,7 +306,7 @@ void lcd_putcAtt(xcoord_t x, uint8_t y, const unsigned char c, LcdFlags flags)
a = b | bb; a = b | bb;
bb = b; bb = b;
b = a; b = a;
#if !defined(CPUM64) || defined(EXTSTD) #if !defined(CPUM64) || defined(EXTSTD) || 1
if (i == skipcol) continue; if (i == skipcol) continue;
#endif #endif
} }
@ -321,7 +321,11 @@ void lcd_putcAtt(xcoord_t x, uint8_t y, const unsigned char c, LcdFlags flags)
LCD_BYTE_FILTER(r, ~(0xff >> (8-ym8)), b >> (8-ym8)); LCD_BYTE_FILTER(r, ~(0xff >> (8-ym8)), b >> (8-ym8));
} }
#if !defined(CPUM64) || defined(EXTSTD) #if !defined(CPUM64) || defined(EXTSTD)
#if defined(TARANIS)
if (y && inv) lcd_mask( p, BITMASK((y-1)%8),FORCE); if (y && inv) lcd_mask( p, BITMASK((y-1)%8),FORCE);
#else
if (y && inv) *p |= BITMASK((y-1)%8);
#endif
#endif #endif
} }
p++; p++;
@ -344,7 +348,7 @@ 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) void lcd_putsnAtt(xcoord_t x, uint8_t y, const pm_char * s, uint8_t len, LcdFlags mode)
{ {
xcoord_t orig_x = x; // xcoord_t orig_x = x;
while(len!=0) { while(len!=0) {
unsigned char c; unsigned char c;
@ -377,15 +381,15 @@ void lcd_putsnAtt(xcoord_t x, uint8_t y, const pm_char * s, uint8_t len, LcdFlag
else if (c == 0x1F) { else if (c == 0x1F) {
setx = true; setx = true;
} }
else if (c == 0x1E) { // else if (c == 0x1E) {
x = orig_x; // x = orig_x;
y += FH; // y += FH;
if (mode & DBLSIZE) y += FH; // if (mode & DBLSIZE) y += FH;
#if defined(CPUARM) //#if defined(CPUARM)
else if (mode & MIDSIZE) y += 4; // else if (mode & MIDSIZE) y += 4;
else if (mode & SMLSIZE) y--; // else if (mode & SMLSIZE) y--;
#endif //#endif
} // }
else { else {
x += (c*FW/2); x += (c*FW/2);
} }
@ -922,22 +926,7 @@ void putsVBat(xcoord_t x, uint8_t y, LcdFlags att)
void putsStrIdx(xcoord_t x, uint8_t y, const pm_char *str, uint8_t idx, LcdFlags att) void putsStrIdx(xcoord_t x, uint8_t y, const pm_char *str, uint8_t idx, LcdFlags att)
{ {
lcd_putsAtt(x, y, str, att); lcd_putsAtt(x, y, str, att);
// if (att & SMLSIZE)
// lcd_outdezNAtt(lcdLastPos+1, y, idx, att|LEFT, 2);
// else
lcd_outdezNAtt(lcdNextPos, y, idx, att|LEFT, 2); lcd_outdezNAtt(lcdNextPos, y, idx, att|LEFT, 2);
/*
#if defined(CPUARM)
uint8_t lastPos = lcdLastPos;
#endif
lcd_putsAtt(x, y, str, att);
#if defined(CPUARM)
lcdLastPos = lastPos;
#endif
*/
} }
void putsMixerSource(xcoord_t x, uint8_t y, uint8_t idx, LcdFlags att) void putsMixerSource(xcoord_t x, uint8_t y, uint8_t idx, LcdFlags att)