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

No special characters in edit fields for CZ language, but enabled in internally defined strings.

It fixes autogenerated Input names.
This commit is contained in:
mhotar 2014-09-13 01:26:49 +02:00 committed by bsongis
parent 871e9f0be3
commit e05a16988f
3 changed files with 7 additions and 2 deletions

View file

@ -627,7 +627,12 @@ extern uint8_t pxxFlag[NUM_MODULES];
#define PXX_SEND_RANGECHECK (1 << 5)
#define LEN_STD_CHARS 40
#if defined(TRANSLATIONS_CZ)
#define ZCHAR_MAX (LEN_STD_CHARS)
#else
#define ZCHAR_MAX (LEN_STD_CHARS + LEN_SPECIAL_CHARS)
#endif
char idx2char(int8_t idx);
#if defined(CPUARM) || defined(SIMU)

View file

@ -49,7 +49,7 @@ char idx2char(int8_t idx)
if (idx < 37) return '0' + idx - 27;
if (idx <= 40) return pgm_read_byte(s_charTab+idx-37);
#if LEN_SPECIAL_CHARS > 0
if (idx <= ZCHAR_MAX) return 'z' + 5 + idx - 40;
if (idx <= (LEN_STD_CHARS + LEN_SPECIAL_CHARS)) return 'z' + 5 + idx - 40;
#endif
return ' ';
}

View file

@ -54,7 +54,7 @@
#define LEN_SPECIAL_CHARS 6
#elif defined(TRANSLATIONS_CZ)
#include "translations/cz.h"
#define LEN_SPECIAL_CHARS 0
#define LEN_SPECIAL_CHARS 17
#elif defined(TRANSLATIONS_ES)
#include "translations/es.h"
#define LEN_SPECIAL_CHARS 0