mirror of
https://github.com/opentx/opentx.git
synced 2025-07-25 17:25:13 +03:00
Fixes #978
This commit is contained in:
parent
9ba8dfae44
commit
560cd8f619
3 changed files with 12 additions and 5 deletions
|
@ -770,8 +770,10 @@ void editName(uint8_t x, uint8_t y, char *name, uint8_t size, uint8_t event, uin
|
|||
|
||||
uint8_t mode = 0;
|
||||
if (active) {
|
||||
if (s_editMode <= 0) mode = INVERS+FIXEDWIDTH;
|
||||
else mode = FIXEDWIDTH;
|
||||
if (s_editMode <= 0)
|
||||
mode = INVERS + FIXEDWIDTH;
|
||||
else
|
||||
mode = FIXEDWIDTH;
|
||||
}
|
||||
lcd_putsnAtt(x, y, name, size, ZCHAR | mode);
|
||||
|
||||
|
@ -783,7 +785,7 @@ void editName(uint8_t x, uint8_t y, char *name, uint8_t size, uint8_t event, uin
|
|||
|
||||
if (p1valdiff || IS_ROTARY_RIGHT(event) || IS_ROTARY_LEFT(event) || event==EVT_KEY_FIRST(KEY_DOWN) || event==EVT_KEY_FIRST(KEY_UP)
|
||||
|| event==EVT_KEY_REPT(KEY_DOWN) || event==EVT_KEY_REPT(KEY_UP)) {
|
||||
v = checkIncDec(event, abs(v), 0, LEN_STD_CHARS, 0);
|
||||
v = checkIncDec(event, abs(v), 0, ZCHAR_MAX, 0);
|
||||
if (c <= 0) v = -v;
|
||||
}
|
||||
|
||||
|
|
|
@ -198,7 +198,9 @@ char idx2char(int8_t idx)
|
|||
if (idx < 27) return 'A' + idx - 1;
|
||||
if (idx < 37) return '0' + idx - 27;
|
||||
if (idx <= 40) return pgm_read_byte(s_charTab+idx-37);
|
||||
// Needed if we want the special chars ... if (idx <= ZCHAR_MAX) return 'z' + 5 + idx - 40;
|
||||
#if LEN_SPECIAL_CHARS > 0
|
||||
if (idx <= ZCHAR_MAX) return 'z' + 5 + idx - 40;
|
||||
#endif
|
||||
return ' ';
|
||||
}
|
||||
|
||||
|
@ -206,6 +208,9 @@ char idx2char(int8_t idx)
|
|||
int8_t char2idx(char c)
|
||||
{
|
||||
if (c == '_') return 37;
|
||||
#if LEN_SPECIAL_CHARS > 0
|
||||
if (c < 0 && c+128 <= LEN_SPECIAL_CHARS) return 41 + (c+128);
|
||||
#endif
|
||||
if (c >= 'a') return 'a' - c - 1;
|
||||
if (c >= 'A') return c - 'A' + 1;
|
||||
if (c >= '0') return c - '0' + 27;
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
#define TR_DATETIME "DATE:""ZEIT:"
|
||||
|
||||
#define LEN_VLCD "\006"
|
||||
#define TR_VLCD "NormalOptrex"
|
||||
#define TR_VLCD "Normal""Optrex"
|
||||
|
||||
#define LEN_COUNTRYCODES TR("\002", "\007")
|
||||
#define TR_COUNTRYCODES TR("US""JP""EU", "Amerika""Japan\0 ""Europa\0")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue