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

Fixes #2129 - Only EN and FR done, I will leave the others to the

translators
This commit is contained in:
bsongis 2015-03-09 21:41:37 +01:00
parent e7071e26ea
commit 5c9809555b
10 changed files with 33 additions and 37 deletions

View file

@ -1061,7 +1061,7 @@ void ConvertModel_215_to_216(ModelData &model)
expo->mode = 3;
}
for (int c=0; c<4; c++) {
newModel.inputNames[i][c] = char2idx(STR_VSRCRAW[1+STR_VSRCRAW[0]*(i+1)+c]);
newModel.inputNames[i][c] = char2idx(STR_VSRCRAW[2+STR_VSRCRAW[0]*(i+1)+c]);
}
}
#endif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 B

After

Width:  |  Height:  |  Size: 331 B

Before After
Before After

View file

@ -299,8 +299,7 @@ void lcd_putsLeft(coord_t y, const pm_char * s)
#if !defined(BOOT)
void lcd_putsiAtt(coord_t x, coord_t y, const pm_char * s,uint8_t idx, LcdFlags flags)
{
uint8_t length;
length = pgm_read_byte(s++);
uint8_t length = pgm_read_byte(s++);
lcd_putsnAtt(x, y, s+length*idx, length, flags & ~(BSS|ZCHAR));
}
@ -625,6 +624,14 @@ void putsStrIdx(coord_t x, coord_t y, const pm_char *str, uint8_t idx, LcdFlags
lcd_outdezNAtt(lcdNextPos, y, idx, att|LEFT, 2);
}
#if defined(PCBTARANIS)
void putsStickName(coord_t x, coord_t y, uint8_t idx, LcdFlags att)
{
uint8_t length = STR_VSRCRAW[0];
lcd_putsnAtt(x, y, STR_VSRCRAW+2+length*(idx+1), length-1, att);
}
#endif
void putsMixerSource(coord_t x, coord_t y, uint8_t idx, LcdFlags att)
{
if (idx == 0) {

View file

@ -168,6 +168,7 @@ void lcd_outdez8(coord_t x, coord_t y, int8_t val);
void putsStrIdx(coord_t x, coord_t y, const pm_char *str, uint8_t idx, LcdFlags att=0);
void putsModelName(coord_t x, coord_t y, char *name, uint8_t id, LcdFlags att);
void putsSwitches(coord_t x, coord_t y, int8_t swtch, LcdFlags att=0);
void putsStickName(coord_t x, coord_t y, uint8_t idx, LcdFlags att=0);
void putsMixerSource(coord_t x, coord_t y, uint8_t idx, LcdFlags att=0);
void putsFlightMode(coord_t x, coord_t y, int8_t idx, LcdFlags att=0);
#if !defined(BOOT)

View file

@ -500,7 +500,7 @@ void menuGeneralSetup(uint8_t event)
case ITEM_SETUP_STICK_MODE:
lcd_putcAtt(2*FW, y, '1'+g_eeGeneral.stickMode, attr);
for (uint8_t i=0; i<4; i++) {
putsMixerSource((6+4*i)*FW, y, MIXSRC_Rud + pgm_read_byte(modn12x3 + 4*g_eeGeneral.stickMode + i), 0);
putsStickName((6+4*i)*FW, y, pgm_read_byte(modn12x3 + 4*g_eeGeneral.stickMode + i), 0);
}
if (attr && s_editMode>0) {
CHECK_INCDEC_GENVAR(event, g_eeGeneral.stickMode, 0, 3);

View file

@ -62,7 +62,7 @@ void menuGeneralTrainer(uint8_t event)
uint8_t chan = channel_order(i);
volatile TrainerMix *td = &g_eeGeneral.trainer.mix[chan-1];
putsMixerSource(0, y, MIXSRC_Rud-1+chan, (sub==i && CURSOR_ON_LINE()) ? INVERS : 0);
putsStickName(0, y, chan-1, (sub==i && CURSOR_ON_LINE()) ? INVERS : 0);
for (int j=0; j<3; j++) {

View file

@ -495,7 +495,7 @@ void menuModelSetup(uint8_t event)
}
}
if (g_model.potsWarnMode) {
coord_t x = MODEL_SETUP_2ND_COLUMN+27;
coord_t x = MODEL_SETUP_2ND_COLUMN+25;
for (int i=0; i<NUM_POTS; ++i) {
if (i<NUM_XPOTS && !IS_POT_AVAILABLE(POT1+i)) {
if (attr && (m_posHorz==i+1)) REPEAT_LAST_CURSOR_MOVE();
@ -504,7 +504,7 @@ void menuModelSetup(uint8_t event)
#if defined(REV9E)
if (i == NUM_XPOTS) {
y += FH;
x = MODEL_SETUP_2ND_COLUMN+27;
x = MODEL_SETUP_2ND_COLUMN;
}
#endif
LcdFlags flags = ((m_posHorz==i+1) && attr) ? BLINK : 0;
@ -512,11 +512,7 @@ void menuModelSetup(uint8_t event)
flags |= INVERS;
}
lcd_putsiAtt(x, y, STR_VSRCRAW, NUM_STICKS+1+i, flags);
#if defined(REV9E)
x += (2*FW+7);
#else
x += (2*FW+3);
#endif
x = lcdNextPos+3;
}
}
}

View file

@ -319,13 +319,16 @@ void defaultInputs()
expo->chn = i;
expo->weight = 100;
expo->mode = 3; // TODO constant
#if defined(TRANSLATIONS_CZ)
for (int c=0; c<4; c++) {
#if defined(TRANSLATIONS_CZ) && defined(CPUARM)
g_model.inputNames[i][c] = char2idx(STR_INPUTNAMES[1+STR_INPUTNAMES[0]*(stick_index-1)+c]);
}
#else
g_model.inputNames[i][c] = char2idx(STR_VSRCRAW[1+STR_VSRCRAW[0]*stick_index+c]);
for (int c=0; c<3; c++) {
g_model.inputNames[i][c] = char2idx(STR_VSRCRAW[2+4*stick_index+c]);
#endif
}
g_model.inputNames[i][3] = '\0';
}
eeDirty(EE_MODEL);
}
@ -339,35 +342,20 @@ inline void applyDefaultTemplate()
#else
void applyDefaultTemplate()
{
for (int i=0; i<NUM_STICKS; i++) {
#if defined(PCBTARANIS)
uint8_t stick_index = channel_order(i+1);
ExpoData *expo = expoAddress(i);
expo->srcRaw = MIXSRC_Rud - 1 + stick_index;
expo->curve.type = CURVE_REF_EXPO;
expo->chn = i;
expo->weight = 100;
expo->mode = 3; // TODO constant
for (int c=0; c<4; c++) {
#if defined(TRANSLATIONS_CZ) && defined(CPUARM)
g_model.inputNames[i][c] = char2idx(STR_INPUTNAMES[1+STR_INPUTNAMES[0]*(stick_index-1)+c]);
#else
g_model.inputNames[i][c] = char2idx(STR_VSRCRAW[1+STR_VSRCRAW[0]*stick_index+c]);
#endif
}
defaultInputs();
#endif
for (int i=0; i<NUM_STICKS; i++) {
MixData *mix = mixAddress(i);
mix->destCh = i;
mix->weight = 100;
#if defined(PCBTARANIS)
mix->srcRaw = i+1;
#else
mix->srcRaw = MIXSRC_Rud - 1 + channel_order(i+1);
#endif
}
eeDirty(EE_MODEL);
}
#endif

View file

@ -445,11 +445,13 @@
#define LEN_VSWITCHES "\003"
#define LEN_VSRCRAW "\004"
#define TR_STICKS_VSRCRAW TR("Rud\0""Ele\0""Thr\0""Ail\0", "\307Rud""\307Ele""\307Thr""\307Ail")
#if defined(PCBTARANIS) && defined(REV9E)
#define TR_POTS_VSRCRAW "S1\0 ""S2\0 ""S3\0 ""S4\0 ""LS\0 ""RS\0 ""LS2\0""RS2\0"
#define TR_POTS_VSRCRAW "\310S1\0""\310S2\0""\310S3\0""\310S4\0""\311LS\0""\311RS\0""\311LS2""\311RS2"
#define TR_SW_VSRCRAW "SA\0 ""SB\0 ""SC\0 ""SD\0 ""SE\0 ""SF\0 ""SG\0 ""SH\0 ""SI\0 ""SJ\0 ""SK\0 ""SL\0 ""SM\0 ""SN\0 ""SO\0 ""SP\0 ""SQ\0 ""SR\0 "
#elif defined(PCBTARANIS)
#define TR_POTS_VSRCRAW "S1\0 ""S2\0 ""S3\0 ""LS\0 ""RS\0 "
#define TR_POTS_VSRCRAW "\310S1\0""\310S2\0""\310S3\0""\311LS\0""\311RS\0"
#define TR_SW_VSRCRAW "SA\0 ""SB\0 ""SC\0 ""SD\0 ""SE\0 ""SF\0 ""SG\0 ""SH\0 ""SI\0 ""SJ\0 ""SK\0 ""SL\0 ""SM\0 ""SN\0 "
#else
#define TR_POTS_VSRCRAW "P1\0 ""P2\0 ""P3\0 "
@ -508,7 +510,7 @@
#define TR_EXTRA_VSRCRAW
#endif
#define TR_VSRCRAW "---\0""Rud\0""Ele\0""Thr\0""Ail\0" TR_POTS_VSRCRAW TR_ROTARY_ENCODERS "MAX\0" TR_CYC_VSRCRAW "TrmR" "TrmE" "TrmT" "TrmA" TR_SW_VSRCRAW TR_EXTRA_VSRCRAW
#define TR_VSRCRAW "---\0" TR_STICKS_VSRCRAW TR_POTS_VSRCRAW TR_ROTARY_ENCODERS "MAX\0" TR_CYC_VSRCRAW "TrmR" "TrmE" "TrmT" "TrmA" TR_SW_VSRCRAW TR_EXTRA_VSRCRAW
#define LEN_VTMRMODES "\003"
#define TR_VTMRMODES "OFF""ON\0""THs""TH%""THt"

View file

@ -445,11 +445,13 @@
#define LEN_VSWITCHES "\003"
#define LEN_VSRCRAW "\004"
#define TR_STICKS_VSRCRAW TR("Dir\0""Prf\0""Gaz\0""Ail\0", "\307Dir""\307Prf""\307Gaz""\307Ail")
#if defined(PCBTARANIS) && defined(REV9E)
#define TR_POTS_VSRCRAW "S1\0 ""S2\0 ""S3\0 ""S4\0 ""LS\0 ""RS\0 ""LS2\0""RS2\0"
#define TR_POTS_VSRCRAW "\310S1\0""\310S2\0""\310S3\0""\310S4\0""\311LS\0""\311RS\0""\311LS2""\311RS2"
#define TR_SW_VSRCRAW "SA\0 ""SB\0 ""SC\0 ""SD\0 ""SE\0 ""SF\0 ""SG\0 ""SH\0 ""SI\0 ""SJ\0 ""SK\0 ""SL\0 ""SM\0 ""SN\0 ""SO\0 ""SP\0 ""SQ\0 ""SR\0 "
#elif defined(PCBTARANIS)
#define TR_POTS_VSRCRAW "S1\0 ""S2\0 ""S3\0 ""LS\0 ""RS\0 "
#define TR_POTS_VSRCRAW "\310S1\0""\310S2\0""\310S3\0""\311LS\0""\311RS\0"
#define TR_SW_VSRCRAW "SA\0 ""SB\0 ""SC\0 ""SD\0 ""SE\0 ""SF\0 ""SG\0 ""SH\0 "
#else
#define TR_POTS_VSRCRAW "P1\0 ""P2\0 ""P3\0 "
@ -508,7 +510,7 @@
#define TR_EXTRA_VSRCRAW
#endif
#define TR_VSRCRAW "---\0""Dir\0""Prf\0""Gaz\0""Ail\0" TR_POTS_VSRCRAW TR_ROTARY_ENCODERS "MAX\0" TR_CYC_VSRCRAW "TrmD" "TrmP" "TrmG" "TrmA" TR_SW_VSRCRAW TR_EXTRA_VSRCRAW
#define TR_VSRCRAW "---\0" TR_STICKS_VSRCRAW TR_POTS_VSRCRAW TR_ROTARY_ENCODERS "MAX\0" TR_CYC_VSRCRAW "TrmD" "TrmP" "TrmG" "TrmA" TR_SW_VSRCRAW TR_EXTRA_VSRCRAW
#define LEN_VTMRMODES "\003"
#define TR_VTMRMODES "OFF""ON\0""GZs""GZ%""GZt"