mirror of
https://github.com/opentx/opentx.git
synced 2025-07-25 17:25:13 +03:00
Fixes #1013 - ~ and \t added to the mapped chars in notes
This commit is contained in:
parent
72d0f2e6f6
commit
48328a7f8a
2 changed files with 12 additions and 3 deletions
|
@ -37,7 +37,7 @@
|
|||
#include "../opentx.h"
|
||||
|
||||
#define TEXT_FILENAME_MAXLEN 40
|
||||
#define TEXT_FILE_MAXSIZE 1000
|
||||
#define TEXT_FILE_MAXSIZE 2048
|
||||
|
||||
char s_text_file[TEXT_FILENAME_MAXLEN];
|
||||
char s_text_screen[LCD_LINES-1][LCD_COLS+1];
|
||||
|
@ -72,15 +72,24 @@ void readTextFile(int & lines_count)
|
|||
escape_chars[escape-1] = c;
|
||||
if (escape == 2 && !strncmp(escape_chars, "up", 2)) {
|
||||
c = '\300';
|
||||
escape = 0;
|
||||
}
|
||||
else if (escape == 2 && !strncmp(escape_chars, "dn", 2)) {
|
||||
c = '\301';
|
||||
escape = 0;
|
||||
}
|
||||
else if (escape == 1 && escape_chars[0] == 't') {
|
||||
c = 0x09; // tab
|
||||
escape = 0;
|
||||
}
|
||||
else {
|
||||
escape++;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if (c=='~') {
|
||||
c = 'z'+1;
|
||||
}
|
||||
escape = 0;
|
||||
s_text_screen[current_line-s_pgOfs][line_length++] = c;
|
||||
}
|
||||
|
|
|
@ -368,13 +368,13 @@ void lcd_putsnAtt(xcoord_t x, uint8_t y, const pm_char * s, uint8_t len, LcdFlag
|
|||
if (y >= LCD_H) break;
|
||||
}
|
||||
#if defined(CPUARM)
|
||||
else if (c == 0x1D) { //TAB
|
||||
else if (c == 0x1D) { // TAB
|
||||
x |= 0x3F;
|
||||
x += 1;
|
||||
}
|
||||
#endif
|
||||
else {
|
||||
x += (c*FW/2); //EXTENDED SPACE
|
||||
x += (c*FW/2); // EXTENDED SPACE
|
||||
}
|
||||
s++;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue