From 5d9293e8f59425e798b77777d97876303f566846 Mon Sep 17 00:00:00 2001 From: mhotar Date: Sun, 26 Jan 2014 19:33:47 +0100 Subject: [PATCH] Version page realigned, 10B saved \036 -Newline code for all platforms stamp strings joined together to vers_stamp --- radio/src/gui/menu_general.cpp | 14 ++++++-------- radio/src/lcd.cpp | 6 ++---- radio/src/opentx.h | 5 +---- radio/src/stamp.cpp | 7 ++----- 4 files changed, 11 insertions(+), 21 deletions(-) diff --git a/radio/src/gui/menu_general.cpp b/radio/src/gui/menu_general.cpp index ba165de4c..79b32f5ab 100644 --- a/radio/src/gui/menu_general.cpp +++ b/radio/src/gui/menu_general.cpp @@ -1037,19 +1037,17 @@ void menuGeneralVersion(uint8_t event) { SIMPLE_MENU(STR_MENUVERSION, menuTabDiag, e_Vers, 1); - lcd_putsLeft(2*FH, stamp1); - lcd_putsLeft(3*FH, stamp2); - lcd_putsLeft(4*FH, stamp3); + lcd_putsLeft(2*FH, vers_stamp); + #if defined(PCBSKY9X) && !defined(REVA) if (Coproc_valid == 1) { - lcd_putsLeft(5*FH, PSTR("CoPr:")); - lcd_outdez8(10*FW, 5*FH, Coproc_read); + lcd_putsLeft(6*FH, PSTR("CoPr:")); + lcd_outdez8(10*FW, 6*FH, Coproc_read); } else { - lcd_putsLeft(5*FH, PSTR("CoPr: ---")); + lcd_putsLeft(6*FH, PSTR("CoPr: ---")); } -#endif - lcd_putsLeft(7*FH, eeprom_stamp); +#endif } void displayKeyState(uint8_t x, uint8_t y, EnumKeys key) diff --git a/radio/src/lcd.cpp b/radio/src/lcd.cpp index 6613653f0..91ddedf49 100644 --- a/radio/src/lcd.cpp +++ b/radio/src/lcd.cpp @@ -361,9 +361,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) { -#if defined(CPUARM) xcoord_t orig_x = x; -#endif bool setx = false; while(len--) { unsigned char c; @@ -395,16 +393,16 @@ 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 } diff --git a/radio/src/opentx.h b/radio/src/opentx.h index 1ce0294b7..8abd9e77f 100644 --- a/radio/src/opentx.h +++ b/radio/src/opentx.h @@ -1181,10 +1181,7 @@ extern int8_t calcRESXto100(int16_t x); #define TMR_VAROFS 5 -extern const char stamp1[]; -extern const char stamp2[]; -extern const char stamp3[]; -extern const char eeprom_stamp[]; +extern const char vers_stamp[]; extern uint8_t g_vbat100mV; #define g_blinkTmr10ms (*(uint8_t*)&g_tmr10ms) diff --git a/radio/src/stamp.cpp b/radio/src/stamp.cpp index 72e1208bd..70147cb0c 100644 --- a/radio/src/stamp.cpp +++ b/radio/src/stamp.cpp @@ -40,11 +40,8 @@ #define STR2(s) #s #define DEFNUMSTR(s) STR2(s) -const pm_char stamp1[] PROGMEM = "VERS: " VERS_STR; -const pm_char stamp2[] PROGMEM = "DATE: " DATE_STR; -const pm_char stamp3[] PROGMEM = "TIME: " TIME_STR; #if defined(PCBSTD) -const pm_char eeprom_stamp[] PROGMEM = "EEPR: " DEFNUMSTR(EEPROM_VER) "-" DEFNUMSTR(EEPROM_VARIANT); +const pm_char vers_stamp[] PROGMEM = "VERS\037\045" VERS_STR "\036DATE\037\045" DATE_STR"\036TIME\037\045" TIME_STR "\036EEPR\037\045" DEFNUMSTR(EEPROM_VER) "-" DEFNUMSTR(EEPROM_VARIANT); #else -const pm_char eeprom_stamp[] PROGMEM = "EEPR: " DEFNUMSTR(EEPROM_VER); +const pm_char vers_stamp[] PROGMEM = "VERS\037\033: " VERS_STR "\036DATE\037\033: " DATE_STR"\036TIME\037\033: " TIME_STR "\036EEPR\037\033: " DEFNUMSTR(EEPROM_VER); #endif