mirror of
https://github.com/opentx/opentx.git
synced 2025-07-21 15:25:17 +03:00
Flash saving (idea from er9x)
Trims2Offsets function removed as it was as full of bugs than other firmwares (total = ~1000bytes flash saved) A "Safety CHxx" function is not applied when it is currently edited The Stick Mode needs confirmation before being used (now edited with [MENU] edit [MENU]).
This commit is contained in:
parent
0826ceada1
commit
6c1d0cab8a
16 changed files with 272 additions and 307 deletions
|
@ -721,7 +721,7 @@ void menuProcFrsky(uint8_t event)
|
|||
uint8_t bars_height = 5;
|
||||
for (int8_t i=3; i>=0; i--) {
|
||||
if (g_model.frsky.bars[i].source && (51-g_model.frsky.bars[i].barMax) > g_model.frsky.bars[i].barMin) {
|
||||
lcd_putsnAtt(0, bars_height+bars_height+1+i*(bars_height+6), STR_VTELEMBARS+LEN_VTELEMBARS*g_model.frsky.bars[i].source, LEN_VTELEMBARS, 0);
|
||||
lcd_putsiAtt(0, bars_height+bars_height+1+i*(bars_height+6), STR_VTELEMBARS, g_model.frsky.bars[i].source, 0);
|
||||
lcd_rect(25, bars_height+6+i*(bars_height+6), 101, bars_height+2);
|
||||
int16_t value = getValue(CHOUT_BASE+NUM_CHNOUT+MAX_TIMERS+g_model.frsky.bars[i].source-1);
|
||||
uint8_t threshold = 0, thresholdX = 0;
|
||||
|
|
|
@ -73,15 +73,18 @@ const MenuFuncP_PROGMEM menuTabDiag[] PROGMEM = {
|
|||
|
||||
enum menuProcSetupItems {
|
||||
ITEM_SETUP_BASE=18,
|
||||
#ifdef SPLASH
|
||||
ITEM_SETUP_SPLASH,
|
||||
#endif
|
||||
#ifdef AUDIO
|
||||
ITEM_SETUP_SPEAKER,
|
||||
#endif
|
||||
#ifdef HAPTIC
|
||||
ITEM_SETUP_HAPTIC_MODE,
|
||||
ITEM_SETUP_HAPTIC_STRENGTH,
|
||||
#endif
|
||||
#ifdef SPLASH
|
||||
ITEM_SETUP_SPLASH,
|
||||
#endif
|
||||
#ifdef FRSKY
|
||||
ITEM_SETUP_NODATA_ALARM,
|
||||
#endif
|
||||
ITEM_SETUP_MAX
|
||||
};
|
||||
|
@ -91,20 +94,30 @@ void menuProcSetup(uint8_t event)
|
|||
#undef PARAM_OFS
|
||||
#define PARAM_OFS 17*FW
|
||||
|
||||
SIMPLE_MENU(STR_MENURADIOSETUP, menuTabDiag, e_Setup, ITEM_SETUP_MAX+1);
|
||||
MENU(STR_MENURADIOSETUP, menuTabDiag, e_Setup, ITEM_SETUP_MAX+1, {0, 0, 0,
|
||||
#ifdef AUDIO
|
||||
0,
|
||||
#endif
|
||||
#ifdef HAPTIC
|
||||
0, 0,
|
||||
#endif
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
#ifdef SPLASH
|
||||
0,
|
||||
#endif
|
||||
0, 0, 0, 0,
|
||||
#ifdef FRSKY
|
||||
0,
|
||||
#endif
|
||||
0, -1, 1});
|
||||
|
||||
int8_t sub = m_posVert;
|
||||
|
||||
// last 2 lines (radio mode) are non break-able
|
||||
// TODO line to be checked
|
||||
if(s_pgOfs==ITEM_SETUP_MAX-7) s_pgOfs= sub<(ITEM_SETUP_MAX-4) ? ITEM_SETUP_MAX-8 : ITEM_SETUP_MAX-6;
|
||||
|
||||
uint8_t y = 1*FH;
|
||||
|
||||
uint8_t subN = 1;
|
||||
if(s_pgOfs<subN) {
|
||||
lcd_putsLeft( y, STR_BEEPERMODE);
|
||||
lcd_putsnAtt(PARAM_OFS - 2*FW, y, STR_VBEEPMODE+(LEN_VBEEPMODE*2)+(LEN_VBEEPMODE*g_eeGeneral.beeperMode), LEN_VBEEPMODE, (sub==subN ? INVERS:0));
|
||||
lcd_putsiAtt(PARAM_OFS - 2*FW, y, STR_VBEEPMODE, 2+g_eeGeneral.beeperMode, (sub==subN ? INVERS:0));
|
||||
if(sub==subN) {
|
||||
CHECK_INCDEC_GENVAR(event, g_eeGeneral.beeperMode, -2, 1);
|
||||
#if defined(FRSKY)
|
||||
|
@ -116,7 +129,7 @@ void menuProcSetup(uint8_t event)
|
|||
|
||||
if(s_pgOfs<subN) {
|
||||
lcd_putsLeft( y, STR_BEEPERLEN);
|
||||
lcd_putsnAtt(PARAM_OFS - 2*FW, y, STR_VBEEPLEN+(LEN_VBEEPLEN*2)+(LEN_VBEEPLEN*g_eeGeneral.beeperLength), LEN_VBEEPLEN, (sub==subN ? INVERS:0));
|
||||
lcd_putsiAtt(PARAM_OFS - 2*FW, y, STR_VBEEPLEN, 2+g_eeGeneral.beeperLength, (sub==subN ? INVERS:0));
|
||||
if(sub==subN) CHECK_INCDEC_GENVAR(event, g_eeGeneral.beeperLength, -2, 2);
|
||||
if((y+=FH)>7*FH) return;
|
||||
}subN++;
|
||||
|
@ -135,7 +148,7 @@ void menuProcSetup(uint8_t event)
|
|||
#ifdef HAPTIC
|
||||
if(s_pgOfs<subN) {
|
||||
lcd_putsLeft( y, STR_HAPTICMODE);
|
||||
lcd_putsnAtt(PARAM_OFS - 2*FW, y, STR_VBEEPMODE+(LEN_VBEEPMODE*2)+(LEN_VBEEPMODE*g_eeGeneral.hapticMode), LEN_VBEEPMODE, (sub==subN ? INVERS:0));
|
||||
lcd_putsiAtt(PARAM_OFS - 2*FW, y, STR_VBEEPMODE, 2+g_eeGeneral.hapticMode, (sub==subN ? INVERS:0));
|
||||
if(sub==subN) CHECK_INCDEC_GENVAR(event, g_eeGeneral.hapticMode, -2, 1);
|
||||
if((y+=FH)>7*FH) return;
|
||||
}subN++;
|
||||
|
@ -177,7 +190,7 @@ void menuProcSetup(uint8_t event)
|
|||
|
||||
if(s_pgOfs<subN) {
|
||||
lcd_putsLeft( y,STR_FILTERADC);
|
||||
lcd_putsnAtt(PARAM_OFS, y, STR_ADCFILTER+LEN_ADCFILTER*g_eeGeneral.filterInput, LEN_ADCFILTER, (sub==subN ? INVERS:0));
|
||||
lcd_putsiAtt(PARAM_OFS, y, STR_ADCFILTER, g_eeGeneral.filterInput, (sub==subN ? INVERS:0));
|
||||
if(sub==subN) CHECK_INCDEC_GENVAR(event, g_eeGeneral.filterInput, 0, 2);
|
||||
if((y+=FH)>7*FH) return;
|
||||
}subN++;
|
||||
|
@ -224,7 +237,7 @@ void menuProcSetup(uint8_t event)
|
|||
lcd_putc(lcd_lastPos, y, 's');
|
||||
}
|
||||
else {
|
||||
lcd_putsnAtt(PARAM_OFS, y, STR_OFFON, LEN_OFFON,(sub==subN ? INVERS:0));
|
||||
lcd_putsiAtt(PARAM_OFS, y, STR_OFFON, 0,(sub==subN ? INVERS:0));
|
||||
}
|
||||
if(sub==subN) CHECK_INCDEC_GENVAR(event, g_eeGeneral.lightAutoOff, 0, 600/5);
|
||||
if((y+=FH)>7*FH) return;
|
||||
|
@ -258,7 +271,7 @@ void menuProcSetup(uint8_t event)
|
|||
|
||||
if(s_pgOfs<subN) {
|
||||
lcd_putsLeft( y, STR_SWITCHWARNING);
|
||||
lcd_putsnAtt(PARAM_OFS, y, STR_WARNSW+LEN_WARNSW*(1+g_eeGeneral.switchWarning), LEN_WARNSW, (sub==subN ? INVERS:0));
|
||||
lcd_putsiAtt(PARAM_OFS, y, STR_WARNSW, 1+g_eeGeneral.switchWarning, (sub==subN ? INVERS:0));
|
||||
if(sub==subN) CHECK_INCDEC_GENVAR(event, g_eeGeneral.switchWarning, -1, 1);
|
||||
if((y+=FH)>7*FH) return;
|
||||
}subN++;
|
||||
|
@ -287,6 +300,7 @@ void menuProcSetup(uint8_t event)
|
|||
if((y+=FH)>7*FH) return;
|
||||
}subN++;
|
||||
|
||||
#ifdef FRSKY
|
||||
if(s_pgOfs<subN) {
|
||||
uint8_t b = g_eeGeneral.enableTelemetryAlarm;
|
||||
lcd_putsLeft( y,STR_NODATAALARM);
|
||||
|
@ -298,6 +312,7 @@ void menuProcSetup(uint8_t event)
|
|||
}
|
||||
if((y+=FH)>7*FH) return;
|
||||
}subN++;
|
||||
#endif
|
||||
|
||||
if(s_pgOfs<subN) {
|
||||
uint8_t attr = sub==subN?INVERS:0;
|
||||
|
@ -309,15 +324,17 @@ void menuProcSetup(uint8_t event)
|
|||
}subN++;
|
||||
|
||||
if(s_pgOfs<subN) {
|
||||
lcd_puts( 1*FW, y, STR_MODE2); // TODO STR_MODE would save flash
|
||||
if(y<7*FH) {for(uint8_t i=0; i<4; i++) lcd_img((6+4*i)*FW, y, sticks,i,0); }
|
||||
lcd_puts( 1*FW, y, STR_MODE);
|
||||
for(uint8_t i=0; i<4; i++) lcd_img((6+4*i)*FW, y, sticks,i,0);
|
||||
if((y+=FH)>7*FH) return;
|
||||
|
||||
lcd_putcAtt( 3*FW, y, '1'+g_eeGeneral.stickMode,sub==subN?INVERS:0);
|
||||
for(uint8_t i=0; i<4; i++) putsChnRaw( (6+4*i)*FW, y, CONVERT_MODE(i+1),0);
|
||||
lcd_putcAtt( 3*FW, y, '1'+g_eeGeneral.stickMode,(sub==subN+1) ? (s_editMode>0 ? BLINK : INVERS) : 0);
|
||||
for(uint8_t i=0; i<4; i++) putsChnRaw( (6+4*i)*FW, y, pgm_read_byte(modn12x3 + 4*g_eeGeneral.stickMode + i), 0);
|
||||
|
||||
if(sub==subN) CHECK_INCDEC_GENVAR(event,g_eeGeneral.stickMode,0,3);
|
||||
if((y+=FH)>7*FH) return;
|
||||
if (sub==subN+1 && s_editMode>0)
|
||||
CHECK_INCDEC_GENVAR(event, g_eeGeneral.stickMode, 0, 3);
|
||||
else
|
||||
stickMode = g_eeGeneral.stickMode;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -369,7 +386,7 @@ void menuProcTime(uint8_t event)
|
|||
{
|
||||
uint8_t y=(i*2+2)*FH;
|
||||
|
||||
lcd_putsnAtt(0, y, STR_DATETIME+LEN_DATETIME*i, LEN_DATETIME, 0);
|
||||
lcd_putsiAtt(0, y, STR_DATETIME, i, 0);
|
||||
|
||||
for(uint8_t j=0; j<3;j++) // 3 settings each for date and time (YMD and HMS)
|
||||
{
|
||||
|
@ -448,7 +465,7 @@ void menuProcTrainer(uint8_t event)
|
|||
|
||||
switch(j) {
|
||||
case 0:
|
||||
lcd_putsnAtt(4*FW, y, STR_TRNMODE+LEN_TRNMODE*td->mode, LEN_TRNMODE, edit ? blink : 0);
|
||||
lcd_putsiAtt(4*FW, y, STR_TRNMODE, td->mode, edit ? blink : 0);
|
||||
if (incdec)
|
||||
CHECK_INCDEC_GENVAR(event, td->mode, 0, 2);
|
||||
break;
|
||||
|
@ -460,7 +477,7 @@ void menuProcTrainer(uint8_t event)
|
|||
break;
|
||||
|
||||
case 2:
|
||||
lcd_putsnAtt(12*FW, y, STR_TRNCHN+LEN_TRNCHN*td->srcChn, LEN_TRNCHN, edit ? blink : 0);
|
||||
lcd_putsiAtt(12*FW, y, STR_TRNCHN, td->srcChn, edit ? blink : 0);
|
||||
if (incdec)
|
||||
CHECK_INCDEC_GENVAR(event, td->srcChn, 0, 3);
|
||||
break;
|
||||
|
@ -522,14 +539,14 @@ void menuProcDiagKeys(uint8_t event)
|
|||
for(uint8_t i=0; i<6; i++) {
|
||||
uint8_t y=(5-i)*FH+2*FH;
|
||||
bool t=keyState((EnumKeys)(KEY_MENU+i));
|
||||
lcd_putsn(0, y, STR_VKEYS+LEN_VKEYS*i, LEN_VKEYS);
|
||||
lcd_putsiAtt(0, y, STR_VKEYS, i, 0);
|
||||
lcd_putcAtt(5*FW+2, y, t+'0', t);
|
||||
}
|
||||
|
||||
#if defined (PCBV4)
|
||||
for(uint8_t i=0; i<2; i++) {
|
||||
uint8_t y = i*FH + FH;
|
||||
lcd_putsn(14*FW, y, STR_RE1RE2+LEN_RE1RE2*i, LEN_RE1RE2);
|
||||
lcd_putsiAtt(14*FW, y, STR_RE1RE2, i, 0);
|
||||
lcd_outdezNAtt(18*FW, y, g_rotenc[i], LEFT|(keyState((EnumKeys)(BTN_RE1+i)) ? INVERS : 0));
|
||||
}
|
||||
#endif
|
||||
|
|
31
src/lcd.cpp
31
src/lcd.cpp
|
@ -142,6 +142,13 @@ void lcd_putc(uint8_t x,uint8_t y,const char c)
|
|||
lcd_putcAtt(x,y,c,0);
|
||||
}
|
||||
|
||||
void lcd_putsiAtt(uint8_t x,uint8_t y,const pm_char * s,uint8_t idx, uint8_t flags)
|
||||
{
|
||||
uint8_t length;
|
||||
length = pgm_read_byte(s++) ;
|
||||
lcd_putsnAtt(x,y,s+length*idx,length,flags);
|
||||
}
|
||||
|
||||
void lcd_putsnAtt(uint8_t x,uint8_t y,const pm_char * s,uint8_t len,uint8_t mode)
|
||||
{
|
||||
while(len!=0) {
|
||||
|
@ -447,9 +454,9 @@ void putsStrIdx(uint8_t x, uint8_t y, const pm_char *str, uint8_t idx, uint8_t a
|
|||
void putsChnRaw(uint8_t x, uint8_t y, uint8_t idx, uint8_t att)
|
||||
{
|
||||
if (idx==0)
|
||||
lcd_putsnAtt(x, y, STR_MMMINV, LEN_MMMINV, att);
|
||||
lcd_putsiAtt(x, y, STR_MMMINV, 0, att);
|
||||
else if (idx<=NUM_STICKS+NUM_POTS+2+3)
|
||||
lcd_putsnAtt(x, y, STR_VSRCRAW+LEN_VSRCRAW*(idx-1), LEN_VSRCRAW, att);
|
||||
lcd_putsiAtt(x, y, STR_VSRCRAW, idx-1, att);
|
||||
else if (idx<=NUM_STICKS+NUM_POTS+2+3+NUM_PPM)
|
||||
putsStrIdx(x, y, STR_PPM, idx - (NUM_STICKS+NUM_POTS+2+3), att);
|
||||
else if (idx<=NUM_STICKS+NUM_POTS+2+3+NUM_PPM+NUM_CHNOUT)
|
||||
|
@ -458,7 +465,7 @@ void putsChnRaw(uint8_t x, uint8_t y, uint8_t idx, uint8_t att)
|
|||
putsStrIdx(x, y, STR_TMR, idx - (NUM_STICKS+NUM_POTS+2+3+NUM_PPM+NUM_CHNOUT), att);
|
||||
#ifdef FRSKY
|
||||
else
|
||||
lcd_putsnAtt(x, y, STR_TELEMCHNS+LEN_TELEMCHNS*(idx-1-(NUM_STICKS+NUM_POTS+2+3+NUM_PPM+MAX_TIMERS+NUM_CHNOUT)), LEN_TELEMCHNS, att);
|
||||
lcd_putsiAtt(x, y, STR_TELEMCHNS, idx-1-(NUM_STICKS+NUM_POTS+2+3+NUM_PPM+MAX_TIMERS+NUM_CHNOUT), att);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -470,7 +477,7 @@ void putsChn(uint8_t x, uint8_t y, uint8_t idx, uint8_t att)
|
|||
|
||||
void putsChnLetter(uint8_t x, uint8_t y, uint8_t idx, uint8_t attr)
|
||||
{
|
||||
lcd_putsnAtt(x, y, STR_RETA123+idx-1, 1, attr);
|
||||
lcd_putsiAtt(x, y, STR_RETA123, idx-1, attr);
|
||||
}
|
||||
|
||||
void putsModelName(uint8_t x, uint8_t y, char *name, uint8_t id, uint8_t att)
|
||||
|
@ -488,17 +495,17 @@ void putsModelName(uint8_t x, uint8_t y, char *name, uint8_t id, uint8_t att)
|
|||
void putsSwitches(uint8_t x, uint8_t y, int8_t idx, uint8_t att)
|
||||
{
|
||||
switch(idx){
|
||||
case 0: lcd_putsnAtt(x, y, STR_MMMINV, LEN_MMMINV, att);return;
|
||||
case MAX_SWITCH: lcd_putsnAtt(x, y, STR_ONOFF, LEN_OFFON, att);return;
|
||||
case -MAX_SWITCH: lcd_putsnAtt(x, y, STR_OFFON, LEN_OFFON, att);return;
|
||||
case 0: lcd_putsiAtt(x, y, STR_MMMINV, 0, att);return;
|
||||
case MAX_SWITCH: lcd_putsiAtt(x, y, STR_OFFON, 1, att);return;
|
||||
case -MAX_SWITCH: lcd_putsiAtt(x, y, STR_OFFON, 0, att);return;
|
||||
}
|
||||
if (idx<0) lcd_vlineStip(x-2, y, 8, 0x5E/*'!'*/);
|
||||
lcd_putsnAtt(x, y, STR_VSWITCHES+LEN_VSWITCHES*(abs(idx)-1), LEN_VSWITCHES, att);
|
||||
lcd_putsiAtt(x, y, STR_VSWITCHES, abs(idx)-1, att);
|
||||
}
|
||||
|
||||
void putsFlightPhase(uint8_t x, uint8_t y, int8_t idx, uint8_t att)
|
||||
{
|
||||
if (idx==0) { lcd_putsnAtt(x, y, STR_MMMINV, LEN_MMMINV, att); return; }
|
||||
if (idx==0) { lcd_putsiAtt(x, y, STR_MMMINV, 0, att); return; }
|
||||
if (idx < 0) { lcd_vlineStip(x-2, y, 8, 0x5E/*'!'*/); idx = -idx; }
|
||||
putsStrIdx(x, y, STR_FP, idx-1, att);
|
||||
}
|
||||
|
@ -506,7 +513,7 @@ void putsFlightPhase(uint8_t x, uint8_t y, int8_t idx, uint8_t att)
|
|||
void putsCurve(uint8_t x, uint8_t y, uint8_t idx, uint8_t att)
|
||||
{
|
||||
if (idx < CURVE_BASE)
|
||||
lcd_putsnAtt(x, y, STR_VCURVEFUNC+LEN_VCURVEFUNC*idx, LEN_VCURVEFUNC, att);
|
||||
lcd_putsiAtt(x, y, STR_VCURVEFUNC, idx, att);
|
||||
else
|
||||
putsStrIdx(x, y, PSTR("c"), idx-CURVE_BASE+1, att);
|
||||
}
|
||||
|
@ -518,7 +525,7 @@ void putsTmrMode(uint8_t x, uint8_t y, int8_t mode, uint8_t att)
|
|||
lcd_putcAtt(x-1*FW, y, '!', att);
|
||||
}
|
||||
else if (mode < TMR_VAROFS) {
|
||||
lcd_putsnAtt(x, y, STR_VTMRMODES+LEN_VTMRMODES*mode, LEN_VTMRMODES, att);
|
||||
lcd_putsiAtt(x, y, STR_VTMRMODES, mode, att);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -597,7 +604,7 @@ void putsTelemetryValue(uint8_t x, uint8_t y, int16_t val, uint8_t unit, uint8_t
|
|||
{
|
||||
lcd_outdezAtt(x, (att & DBLSIZE ? y - FH : y), val, att); // TODO we could add this test inside lcd_outdezAtt!
|
||||
if (~att & NO_UNIT && unit != UNIT_RAW)
|
||||
lcd_putsnAtt(lcd_lastPos+1, y, STR_VTELEMUNIT+LEN_VTELEMUNIT*unit, LEN_VTELEMUNIT, 0);
|
||||
lcd_putsiAtt(lcd_lastPos+1, y, STR_VTELEMUNIT, unit, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -80,6 +80,7 @@ extern void lcd_putc(unsigned char x,unsigned char y,const char c);
|
|||
extern void lcd_putcAtt(unsigned char x,unsigned char y,const char c,uint8_t mode);
|
||||
|
||||
extern void lcd_putsAtt(unsigned char x,unsigned char y,const pm_char * s,uint8_t mode);
|
||||
extern void lcd_putsiAtt(uint8_t x,uint8_t y,const pm_char * s,uint8_t idx, uint8_t mode);
|
||||
extern void lcd_putsnAtt(unsigned char x,unsigned char y,const pm_char * s,unsigned char len,uint8_t mode);
|
||||
extern void lcd_puts(unsigned char x,unsigned char y,const pm_char * s);
|
||||
extern void lcd_putsLeft(unsigned char y, const pm_char * s);
|
||||
|
|
|
@ -69,7 +69,6 @@ void doMainScreenGrphics()
|
|||
void menuMainView(uint8_t event)
|
||||
{
|
||||
static bool instantTrimSwLock;
|
||||
static bool trim2OfsSwLock;
|
||||
|
||||
uint8_t view = g_eeGeneral.view;
|
||||
uint8_t view_base = view & 0x0f;
|
||||
|
@ -157,7 +156,6 @@ void menuMainView(uint8_t event)
|
|||
killEvents(KEY_UP);
|
||||
killEvents(KEY_DOWN);
|
||||
instantTrimSwLock = true;
|
||||
trim2OfsSwLock = true;
|
||||
break;
|
||||
#ifdef NAVIGATION_RE1
|
||||
case EVT_KEY_LONG(BTN_RE1):
|
||||
|
@ -178,10 +176,6 @@ void menuMainView(uint8_t event)
|
|||
if (!instantTrimSwLock && trimSw) instantTrim();
|
||||
instantTrimSwLock = trimSw;
|
||||
|
||||
trimSw = isFunctionActive(FUNC_TRIMS_2_OFS);
|
||||
if (!trim2OfsSwLock && trimSw) moveTrimsToOffsets();
|
||||
trim2OfsSwLock = trimSw;
|
||||
|
||||
{
|
||||
uint8_t phase = getFlightPhase();
|
||||
lcd_putsnAtt(6*FW+2, 2*FH, g_model.phaseData[phase].name, sizeof(g_model.phaseData[phase].name), ZCHAR);
|
||||
|
|
|
@ -47,7 +47,7 @@ int16_t g_chans512[NUM_CHNOUT]; // TODO not here!
|
|||
|
||||
void menu_lcd_onoff( uint8_t x,uint8_t y, uint8_t value, uint8_t mode )
|
||||
{
|
||||
lcd_putsnAtt(x, y, STR_OFFON+LEN_OFFON*value, LEN_OFFON, mode ? INVERS:0) ;
|
||||
lcd_putsiAtt(x, y, STR_OFFON, value, mode ? INVERS:0) ;
|
||||
}
|
||||
|
||||
void DisplayScreenIndex(uint8_t index, uint8_t count, uint8_t attr)
|
||||
|
|
|
@ -78,6 +78,7 @@ void menuProcFrsky(uint8_t event);
|
|||
#endif
|
||||
void menuProcSetup(uint8_t event);
|
||||
void menuProcModelSelect(uint8_t event);
|
||||
void menuProcFunctionSwitches(uint8_t event);
|
||||
void menuProcStatistic(uint8_t event);
|
||||
void menuProcDebug(uint8_t event);
|
||||
|
||||
|
|
|
@ -482,7 +482,7 @@ void menuProcModel(uint8_t event)
|
|||
|
||||
if(s_pgOfs<subN) {
|
||||
lcd_putsLeft( y, STR_TRIMINC);
|
||||
lcd_putsnAtt(PARAM_OFS, y, STR_VTRIMINC+LEN_VTRIMINC*g_model.trimInc, LEN_VTRIMINC, (sub==subN ? INVERS:0));
|
||||
lcd_putsiAtt(PARAM_OFS, y, STR_VTRIMINC, g_model.trimInc, (sub==subN ? INVERS:0));
|
||||
if(sub==subN) CHECK_INCDEC_MODELVAR(event,g_model.trimInc,0,4);
|
||||
if((y+=FH)>7*FH) return;
|
||||
}subN++;
|
||||
|
@ -506,7 +506,7 @@ void menuProcModel(uint8_t event)
|
|||
|
||||
if(s_pgOfs<subN) {
|
||||
lcd_putsLeft( y, STR_BEEPCTR);
|
||||
for(uint8_t i=0;i<7;i++) lcd_putsnAtt(PARAM_OFS+i*FW, y, STR_RETA123+LEN_RETA123*i, LEN_RETA123, ((m_posHorz==i) && (sub==subN)) ? BLINK : ((g_model.beepANACenter & (1<<i)) ? INVERS : 0 ) );
|
||||
for(uint8_t i=0;i<7;i++) lcd_putsiAtt(PARAM_OFS+i*FW, y, STR_RETA123, i, ((m_posHorz==i) && (sub==subN)) ? BLINK : ((g_model.beepANACenter & (1<<i)) ? INVERS : 0 ) );
|
||||
if(sub==subN){
|
||||
if((event==EVT_KEY_FIRST(KEY_MENU)) || p1valdiff) {
|
||||
killEvents(event);
|
||||
|
@ -520,10 +520,10 @@ void menuProcModel(uint8_t event)
|
|||
|
||||
if(s_pgOfs<subN) {
|
||||
lcd_putsLeft( y, STR_PROTO);
|
||||
lcd_putsnAtt(PARAM_OFS, y, STR_VPROTOS+LEN_VPROTOS*g_model.protocol, LEN_VPROTOS,
|
||||
lcd_putsiAtt(PARAM_OFS, y, STR_VPROTOS, g_model.protocol,
|
||||
(sub==subN && m_posHorz==0 ? (s_editMode>0 ? BLINK : INVERS):0));
|
||||
if (g_model.protocol == PROTO_PPM) {
|
||||
lcd_putsnAtt(PARAM_OFS+4*FW, y, STR_NCHANNELS+LEN_NCHANNELS*(g_model.ppmNCH+2), LEN_NCHANNELS, ((sub==subN && m_posHorz==1) ? ((s_editMode>0) ? BLINK : INVERS) : 0));
|
||||
lcd_putsiAtt(PARAM_OFS+4*FW, y, STR_NCHANNELS, g_model.ppmNCH+2, (sub==subN && m_posHorz==1) ? ((s_editMode>0) ? BLINK : INVERS) : 0);
|
||||
lcd_puts(PARAM_OFS+11*FW, y, PSTR("u"));
|
||||
lcd_outdezAtt(PARAM_OFS+11*FW, y, (g_model.ppmDelay*50)+300, ((sub==subN && m_posHorz==2) ? ((s_editMode>0) ? BLINK : INVERS) : 0));
|
||||
}
|
||||
|
@ -536,7 +536,7 @@ void menuProcModel(uint8_t event)
|
|||
if ( x < 0 ) x = 0;
|
||||
if ( x > 2 ) x = 2;
|
||||
g_model.ppmNCH = x;
|
||||
lcd_putsnAtt(PARAM_OFS+5*FW, y, STR_DSM2MODE+LEN_DSM2MODE*x, LEN_DSM2MODE, (sub==subN && m_posHorz==1 ? ((s_editMode>0) ? BLINK : INVERS) : 0));
|
||||
lcd_putsiAtt(PARAM_OFS+5*FW, y, STR_DSM2MODE, x, (sub==subN && m_posHorz==1) ? ((s_editMode>0) ? BLINK : INVERS) : 0);
|
||||
}
|
||||
#endif
|
||||
else if (sub==subN) {
|
||||
|
@ -568,7 +568,7 @@ void menuProcModel(uint8_t event)
|
|||
lcd_putsLeft( y, STR_PPMFRAME);
|
||||
lcd_puts(PARAM_OFS+3*FW, y, STR_MS);
|
||||
lcd_outdezAtt(PARAM_OFS, y, (int16_t)g_model.ppmFrameLength*5 + 225, ((sub==subN && m_posHorz==0) ? (s_editMode>0 ? BLINK : INVERS) : 0) | PREC1|LEFT);
|
||||
lcd_putsnAtt(PARAM_OFS+6*FW, y, STR_POSNEG+LEN_POSNEG*g_model.pulsePol, LEN_POSNEG, (sub==subN && m_posHorz==1) ? INVERS : 0);
|
||||
lcd_putsiAtt(PARAM_OFS+6*FW, y, STR_POSNEG, g_model.pulsePol, (sub==subN && m_posHorz==1) ? INVERS : 0);
|
||||
if(sub==subN && (s_editMode>0 || p1valdiff)) {
|
||||
switch (m_posHorz) {
|
||||
case 0:
|
||||
|
@ -735,7 +735,7 @@ void menuProcPhasesAll(uint8_t event)
|
|||
|
||||
void menu_lcd_HYPHINV( uint8_t x,uint8_t y, uint8_t value, uint8_t mode )
|
||||
{
|
||||
lcd_putsnAtt( x, y, STR_MMMINV+LEN_MMMINV*value, LEN_MMMINV, mode ? INVERS:0) ;
|
||||
lcd_putsiAtt( x, y, STR_MMMINV, value, mode ? INVERS:0) ;
|
||||
}
|
||||
|
||||
void menuProcHeli(uint8_t event)
|
||||
|
@ -748,7 +748,7 @@ void menuProcHeli(uint8_t event)
|
|||
uint8_t subN = 1;
|
||||
if(s_pgOfs<subN) {
|
||||
lcd_putsLeft( y, STR_SWASHTYPE);
|
||||
lcd_putsnAtt( 14*FW, y, STR_VSWASHTYPE+LEN_VSWASHTYPE*g_model.swashR.type, LEN_VSWASHTYPE, (sub==subN ? INVERS:0));
|
||||
lcd_putsiAtt( 14*FW, y, STR_VSWASHTYPE, g_model.swashR.type, (sub==subN ? INVERS:0));
|
||||
if(sub==subN) CHECK_INCDEC_MODELVAR(event,g_model.swashR.type,0,SWASH_TYPE_NUM);
|
||||
if((y+=FH)>7*FH) return;
|
||||
}subN++;
|
||||
|
@ -907,7 +907,7 @@ void menuProcCurveOne(uint8_t event)
|
|||
}
|
||||
|
||||
lcd_puts(0*FW, 7*FH, STR_MODE);
|
||||
lcd_putsnAtt(5*FW-2, 7*FH, STR_CURVMODES+LEN_CURVMODES*(s_editMode<=0)*m_posHorz, LEN_CURVMODES, s_editMode>0 || autoThrStep ? 0 : INVERS);
|
||||
lcd_putsiAtt(5*FW-2, 7*FH, STR_CURVMODES, (s_editMode<=0)*m_posHorz, s_editMode>0 || autoThrStep ? 0 : INVERS);
|
||||
|
||||
if (s_editMode>0 || autoThrStep) {
|
||||
for (uint8_t i=0; i<points; i++) {
|
||||
|
@ -1130,7 +1130,7 @@ inline void editExpoVals(uint8_t event, uint8_t which, bool edit, uint8_t y, uin
|
|||
if(edit) CHECK_INCDEC_MODELVAR(event, ed->swtch, -MAX_DRSWITCH, MAX_DRSWITCH);
|
||||
break;
|
||||
case 4:
|
||||
lcd_putsnAtt(6*FW+5, y, STR_VWHEN+3*LEN_VWHEN-LEN_VWHEN*ed->mode, LEN_VWHEN, invBlk);
|
||||
lcd_putsiAtt(6*FW+5, y, STR_VWHEN, 3-ed->mode, invBlk);
|
||||
if(edit) ed->mode = 4 - checkIncDecModel(event, 4-ed->mode, 1, 3);
|
||||
break;
|
||||
case 5:
|
||||
|
@ -1156,7 +1156,7 @@ void menuProcExpoOne(uint8_t event)
|
|||
uint8_t y = FH;
|
||||
|
||||
for (uint8_t i=0; i<7; i++) {
|
||||
lcd_putsnAtt(0, y, STR_EXPLABELS+LEN_EXPLABELS*i, LEN_EXPLABELS, 0);
|
||||
lcd_putsiAtt(0, y, STR_EXPLABELS, i, 0);
|
||||
editExpoVals(event, i, sub==i, y, s_currIdx);
|
||||
y+=FH;
|
||||
}
|
||||
|
@ -1209,7 +1209,7 @@ void menuProcMixOne(uint8_t event)
|
|||
// TODO hidden when src is not a STICK as it has no sense
|
||||
lcd_puts(2*FW, y, STR_TRIM);
|
||||
// lcd_putsnAtt(FW*10, y, STR_OFFON+LEN_OFFON*(1-md2->carryTrim), LEN_OFFON, attr);
|
||||
lcd_putsnAtt(FW*10, y, STR_VMIXTRIMS+LEN_VMIXTRIMS*md2->carryTrim, LEN_VMIXTRIMS, attr); // TODO perhaps could be optimized by reusing STR_OFFON
|
||||
lcd_putsiAtt(FW*10, y, STR_VMIXTRIMS, md2->carryTrim, attr); // TODO perhaps could be optimized by reusing STR_OFFON
|
||||
if (attr) CHECK_INCDEC_MODELVAR( event, md2->carryTrim, 0, 2);
|
||||
break;
|
||||
case 4:
|
||||
|
@ -1241,7 +1241,7 @@ void menuProcMixOne(uint8_t event)
|
|||
break;
|
||||
case 8:
|
||||
lcd_puts( 2*FW,y,STR_MULTPX);
|
||||
lcd_putsnAtt(10*FW, y, STR_VMLTPX+LEN_VMLTPX*md2->mltpx, LEN_VMLTPX, attr);
|
||||
lcd_putsiAtt(10*FW, y, STR_VMLTPX, md2->mltpx, attr);
|
||||
if(attr) CHECK_INCDEC_MODELVAR( event, md2->mltpx, 0, 2);
|
||||
break;
|
||||
case 9:
|
||||
|
@ -1277,7 +1277,7 @@ inline void displayMixerLine(uint8_t row, uint8_t mix, uint8_t ch, uint8_t idx,
|
|||
uint8_t y = (row-s_pgOfs)*FH;
|
||||
MixData *md = mixaddress(mix);
|
||||
if (idx > 0)
|
||||
lcd_putsnAtt(FW, y, STR_VMLTPX2+LEN_VMLTPX2*md->mltpx, LEN_VMLTPX2, 0);
|
||||
lcd_putsiAtt(FW, y, STR_VMLTPX2, md->mltpx, 0);
|
||||
|
||||
putsChnRaw(4*FW+2, y, md->srcRaw, 0);
|
||||
|
||||
|
@ -1547,7 +1547,7 @@ void menuProcMixAll(uint8_t event)
|
|||
|
||||
void menuProcLimits(uint8_t event)
|
||||
{
|
||||
MENU(STR_MENULIMITS, menuTabModel, e_Limits, NUM_CHNOUT+2, {0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3/*, 0*/});
|
||||
MENU(STR_MENULIMITS, menuTabModel, e_Limits, NUM_CHNOUT+1, {0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3});
|
||||
|
||||
int8_t sub = m_posVert - 1;
|
||||
|
||||
|
@ -1555,18 +1555,6 @@ void menuProcLimits(uint8_t event)
|
|||
uint8_t y = (i+1)*FH;
|
||||
uint8_t k = i+s_pgOfs;
|
||||
|
||||
if (k==NUM_CHNOUT) {
|
||||
//last line available - add the "copy trim menu" line
|
||||
uint8_t attr = (sub==NUM_CHNOUT) ? INVERS : 0;
|
||||
lcd_putsAtt(3*FW, y, STR_COPYTRIMMENU, s_noHi ? 0 : attr);
|
||||
if (attr && event==EVT_KEY_LONG(KEY_MENU)) {
|
||||
s_noHi = NO_HI_LEN;
|
||||
killEvents(event);
|
||||
moveTrimsToOffsets(); // if highlighted and menu pressed - copy trims
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
LimitData *ld = limitaddress(k) ;
|
||||
int16_t v = (ld->revert) ? -ld->offset : ld->offset;
|
||||
|
||||
|
@ -1608,7 +1596,7 @@ void menuProcLimits(uint8_t event)
|
|||
}
|
||||
break;
|
||||
case 3:
|
||||
lcd_putsnAtt(18*FW, y, STR_MMMINV+LEN_MMMINV*ld->revert, LEN_MMMINV, attr);
|
||||
lcd_putsiAtt(18*FW, y, STR_MMMINV, ld->revert, attr);
|
||||
if (active) {
|
||||
CHECK_INCDEC_MODELVAR(event, ld->revert, 0, 1);
|
||||
}
|
||||
|
@ -1683,7 +1671,7 @@ void menuProcCustomSwitches(uint8_t event)
|
|||
//write SW names here
|
||||
lcd_puts(0*FW, y, STR_SW);
|
||||
lcd_putc(2*FW, y, k + (k>8 ? 'A'-9: '1'));
|
||||
lcd_putsnAtt(4*FW - 1, y, STR_VCSWFUNC+LEN_VCSWFUNC*cs.func, LEN_VCSWFUNC, m_posHorz==0 ? attr : 0);
|
||||
lcd_putsiAtt(4*FW - 1, y, STR_VCSWFUNC, cs.func, m_posHorz==0 ? attr : 0);
|
||||
|
||||
uint8_t cstate = CS_STATE(cs.func);
|
||||
int8_t v1_min=0, v1_max=NUM_XCHNCSW, v2_min=0, v2_max=NUM_XCHNCSW;
|
||||
|
@ -1791,7 +1779,7 @@ void menuProcFunctionSwitches(uint8_t event)
|
|||
}
|
||||
else
|
||||
func_displayed = 2 + sd->func - NUM_CHNOUT - NUM_STICKS - 1;
|
||||
lcd_putsnAtt(5*FW-2, y, STR_VFSWFUNC+LEN_VFSWFUNC*func_displayed, LEN_VFSWFUNC, attr);
|
||||
lcd_putsiAtt(5*FW-2, y, STR_VFSWFUNC, func_displayed, attr);
|
||||
if (active) {
|
||||
CHECK_INCDEC_MODELVAR( event, sd->func, 0, FUNC_MAX-1);
|
||||
}
|
||||
|
@ -1808,7 +1796,7 @@ void menuProcFunctionSwitches(uint8_t event)
|
|||
if (sd->func == FUNC_PLAY_SOUND) {
|
||||
#if defined(AUDIO)
|
||||
val_max = AU_FRSKY_LAST-AU_FRSKY_FIRST-1;
|
||||
lcd_putsnAtt(15*FW, y, STR_FUNCSOUNDS+LEN_FUNCSOUNDS*val_displayed, LEN_FUNCSOUNDS, attr);
|
||||
lcd_putsiAtt(15*FW, y, STR_FUNCSOUNDS, val_displayed, attr);
|
||||
#else
|
||||
break;
|
||||
#endif
|
||||
|
@ -1880,7 +1868,7 @@ void menuProcTelemetry(uint8_t event)
|
|||
y=(subN-s_pgOfs)*FH;
|
||||
lcd_puts(4, y, STR_RANGE);
|
||||
putsTelemetryChannel(TELEM_COL2, y, i, 255-g_model.frsky.channels[i].offset, (sub==subN && m_posHorz==0 ? blink:0)|NO_UNIT|LEFT);
|
||||
lcd_putsnAtt(lcd_lastPos+1, y, STR_VTELEMUNIT+LEN_VTELEMUNIT*g_model.frsky.channels[i].type, LEN_VTELEMUNIT, (sub==subN && m_posHorz==1 ? blink:0));
|
||||
lcd_putsiAtt(lcd_lastPos+1, y, STR_VTELEMUNIT, g_model.frsky.channels[i].type, (sub==subN && m_posHorz==1 ? blink:0));
|
||||
if (sub==subN && (s_editMode>0 || p1valdiff)) {
|
||||
if (m_posHorz == 0) {
|
||||
uint16_t ratio = checkIncDec(event, g_model.frsky.channels[i].ratio, 0, 256, EE_MODEL);
|
||||
|
@ -1915,8 +1903,8 @@ void menuProcTelemetry(uint8_t event)
|
|||
if(s_pgOfs<subN) {
|
||||
y=(subN-s_pgOfs)*FH;
|
||||
lcd_puts(4, y, STR_ALARM);
|
||||
lcd_putsnAtt(TELEM_COL2, y, STR_VALARM+LEN_VALARM*ALARM_LEVEL(i, j), LEN_VALARM, (sub==subN && m_posHorz==0 ? blink:0));
|
||||
lcd_putsnAtt(TELEM_COL2+4*FW, y, STR_VALARMFN+LEN_VALARMFN*ALARM_GREATER(i, j), LEN_VALARMFN,(sub==subN && m_posHorz==1 ? blink:0));
|
||||
lcd_putsiAtt(TELEM_COL2, y, STR_VALARM, ALARM_LEVEL(i, j), (sub==subN && m_posHorz==0) ? blink : 0);
|
||||
lcd_putsiAtt(TELEM_COL2+4*FW, y, STR_VALARMFN, ALARM_GREATER(i, j), (sub==subN && m_posHorz==1) ? blink : 0);
|
||||
putsTelemetryChannel(TELEM_COL2+6*FW, y, i, g_model.frsky.channels[i].alarms_value[j], (sub==subN && m_posHorz==2 ? blink:0) | LEFT);
|
||||
|
||||
if(sub==subN && (s_editMode>0 || p1valdiff)) {
|
||||
|
@ -1951,9 +1939,9 @@ void menuProcTelemetry(uint8_t event)
|
|||
if(s_pgOfs<subN) {
|
||||
y = (subN-s_pgOfs)*FH;
|
||||
lcd_putsn(4, y, STR_TX+j*OFS_RX, OFS_RX-2);
|
||||
lcd_putsnAtt(TELEM_COL2, y, STR_VALARM+LEN_VALARM*((2+j+g_model.frskyRssiAlarms[j].level)%4), LEN_VALARM, (sub==subN && m_posHorz==0 ? blink:0));
|
||||
lcd_putsiAtt(TELEM_COL2, y, STR_VALARM, ((2+j+g_model.frskyRssiAlarms[j].level)%4), (sub==subN && m_posHorz==0) ? blink : 0);
|
||||
lcd_putc(TELEM_COL2+4*FW, y, '<');
|
||||
lcd_outdezNAtt(TELEM_COL2+6*FW, y, 50+g_model.frskyRssiAlarms[j].value, LEFT|(sub==subN && m_posHorz==1 ? blink:0), 3);
|
||||
lcd_outdezNAtt(TELEM_COL2+6*FW, y, 50+g_model.frskyRssiAlarms[j].value, LEFT|((sub==subN && m_posHorz==1) ? blink : 0), 3);
|
||||
|
||||
if (sub==subN && (s_editMode>0 || p1valdiff)) {
|
||||
switch (m_posHorz) {
|
||||
|
@ -1979,7 +1967,7 @@ void menuProcTelemetry(uint8_t event)
|
|||
if(s_pgOfs<subN) {
|
||||
y = (subN-s_pgOfs)*FH;
|
||||
lcd_puts(4, y, STR_PROTO);
|
||||
lcd_putsnAtt(TELEM_COL2, y, STR_VTELPROTO+LEN_VTELPROTO*g_model.frsky.usrProto, LEN_VTELPROTO, sub==subN ? INVERS:0);
|
||||
lcd_putsiAtt(TELEM_COL2, y, STR_VTELPROTO, g_model.frsky.usrProto, sub==subN ? INVERS:0);
|
||||
if (sub==subN)
|
||||
CHECK_INCDEC_MODELVAR(event, g_model.frsky.usrProto, 0, 2);
|
||||
}
|
||||
|
@ -2005,7 +1993,7 @@ void menuProcTelemetry(uint8_t event)
|
|||
for (int j=0; j<4; j++) {
|
||||
if (s_pgOfs<subN) {
|
||||
y = (subN-s_pgOfs)*FH;
|
||||
lcd_putsnAtt(4, y, STR_VTELEMBARS+LEN_VTELEMBARS*g_model.frsky.bars[j].source, LEN_VTELEMBARS, sub==subN && m_posHorz==0 ? blink : 0);
|
||||
lcd_putsiAtt(4, y, STR_VTELEMBARS, g_model.frsky.bars[j].source, (sub==subN && m_posHorz==0) ? blink : 0);
|
||||
if (g_model.frsky.bars[j].source) {
|
||||
putsTelemetryChannel(TELEM_COL2-3*FW, y, g_model.frsky.bars[j].source-1, g_model.frsky.bars[j].barMin*5, (sub==subN && m_posHorz==1 ? blink : 0) | LEFT);
|
||||
putsTelemetryChannel(14*FW-3, y, g_model.frsky.bars[j].source-1, (51-g_model.frsky.bars[j].barMax)*5, (sub==subN && m_posHorz==2 ? blink : 0) | LEFT);
|
||||
|
@ -2062,7 +2050,7 @@ void menuProcTemplates(uint8_t event)
|
|||
|
||||
//write mix names here
|
||||
lcd_outdezNAtt(3*FW, y, k+1, (sub==k ? INVERS : 0)|LEADING0, 2);
|
||||
lcd_putsnAtt(4*FW, y, STR_VTEMPLATES+LEN_VTEMPLATES*k, LEN_VTEMPLATES, (s_noHi ? 0 : (sub==k ? INVERS : 0)));
|
||||
lcd_putsiAtt(4*FW, y, STR_VTEMPLATES, k, (s_noHi ? 0 : (sub==k ? INVERS : 0)));
|
||||
y+=FH;
|
||||
}
|
||||
if(y>7*FH) return;
|
||||
|
|
|
@ -187,7 +187,6 @@ enum Functions {
|
|||
FUNC_TRAINER_THR,
|
||||
FUNC_TRAINER_AIL,
|
||||
FUNC_INSTANT_TRIM,
|
||||
FUNC_TRIMS_2_OFS,
|
||||
FUNC_PLAY_SOUND,
|
||||
#ifdef SOMO
|
||||
FUNC_PLAY_SOMO,
|
||||
|
|
|
@ -33,54 +33,56 @@
|
|||
|
||||
#include "open9x.h"
|
||||
|
||||
#define ISTR(x) LEN_##x TR_##x
|
||||
|
||||
// The non-0-terminated-strings
|
||||
const pm_char STR_OPEN9X[] PROGMEM =
|
||||
TR_OFFON
|
||||
TR_MMMINV
|
||||
TR_NCHANNELS
|
||||
TR_VBEEPMODE
|
||||
TR_VBEEPLEN
|
||||
TR_ADCFILTER
|
||||
TR_WARNSW
|
||||
TR_TRNMODE
|
||||
TR_TRNCHN
|
||||
TR_VTRIMINC
|
||||
TR_RETA123
|
||||
TR_VPROTOS
|
||||
TR_POSNEG
|
||||
TR_VCURVEFUNC
|
||||
TR_CURVMODES
|
||||
TR_EXPLABELS
|
||||
TR_VMLTPX
|
||||
TR_VMLTPX2
|
||||
TR_VMIXTRIMS
|
||||
TR_VCSWFUNC
|
||||
TR_VFSWFUNC
|
||||
TR_FUNCSOUNDS
|
||||
ISTR(OFFON)
|
||||
ISTR(MMMINV)
|
||||
ISTR(NCHANNELS)
|
||||
ISTR(VBEEPMODE)
|
||||
ISTR(VBEEPLEN)
|
||||
ISTR(ADCFILTER)
|
||||
ISTR(WARNSW)
|
||||
ISTR(TRNMODE)
|
||||
ISTR(TRNCHN)
|
||||
ISTR(VTRIMINC)
|
||||
ISTR(RETA123)
|
||||
ISTR(VPROTOS)
|
||||
ISTR(POSNEG)
|
||||
ISTR(VCURVEFUNC)
|
||||
ISTR(CURVMODES)
|
||||
ISTR(EXPLABELS)
|
||||
ISTR(VMLTPX)
|
||||
ISTR(VMLTPX2)
|
||||
ISTR(VMIXTRIMS)
|
||||
ISTR(VCSWFUNC)
|
||||
ISTR(VFSWFUNC)
|
||||
ISTR(FUNCSOUNDS)
|
||||
#ifdef FRSKY
|
||||
TR_VTELEMBARS
|
||||
TR_VTELEMUNIT
|
||||
TR_VALARM
|
||||
TR_VALARMFN
|
||||
TR_VTELPROTO
|
||||
TR_TELEMCHNS
|
||||
ISTR(VTELEMBARS)
|
||||
ISTR(VTELEMUNIT)
|
||||
ISTR(VALARM)
|
||||
ISTR(VALARMFN)
|
||||
ISTR(VTELPROTO)
|
||||
ISTR(TELEMCHNS)
|
||||
#endif
|
||||
#ifdef TEMPLATES
|
||||
TR_VTEMPLATES
|
||||
ISTR(VTEMPLATES)
|
||||
#endif
|
||||
#ifdef HELI
|
||||
TR_VSWASHTYPE
|
||||
ISTR(VSWASHTYPE)
|
||||
#endif
|
||||
TR_VKEYS
|
||||
TR_VSWITCHES
|
||||
TR_VSRCRAW
|
||||
TR_VTMRMODES
|
||||
ISTR(VKEYS)
|
||||
ISTR(VSWITCHES)
|
||||
ISTR(VSRCRAW)
|
||||
ISTR(VTMRMODES)
|
||||
#if defined(DSM2)
|
||||
TR_DSM2MODE
|
||||
ISTR(DSM2MODE)
|
||||
#endif
|
||||
#if defined(PCBV4)
|
||||
TR_RE1RE2
|
||||
TR_DATETIME
|
||||
ISTR(RE1RE2)
|
||||
ISTR(DATETIME)
|
||||
#endif
|
||||
;
|
||||
|
||||
|
@ -136,7 +138,6 @@ const pm_char STR_DELAYUP[] PROGMEM = TR_DELAYUP;
|
|||
const pm_char STR_SLOWDOWN[] PROGMEM = TR_SLOWDOWN;
|
||||
const pm_char STR_SLOWUP[] PROGMEM = TR_SLOWUP;
|
||||
const pm_char STR_MIXER[] PROGMEM = TR_MIXER;
|
||||
const pm_char STR_COPYTRIMMENU[] PROGMEM = TR_COPYTRIMMENU;
|
||||
const pm_char STR_CV[] PROGMEM = TR_CV;
|
||||
const pm_char STR_SW[] PROGMEM = TR_SW;
|
||||
const pm_char STR_ACHANNEL[] PROGMEM = TR_ACHANNEL;
|
||||
|
@ -173,7 +174,6 @@ const pm_char STR_MEMORYWARNING[] PROGMEM = TR_MEMORYWARNING;
|
|||
const pm_char STR_ALARMWARNING[] PROGMEM = TR_ALARMWARNING;
|
||||
const pm_char STR_NODATAALARM[] PROGMEM = TR_NODATAALARM;
|
||||
const pm_char STR_RXCHANNELORD[] PROGMEM = TR_RXCHANNELORD;
|
||||
const pm_char STR_MODE2[] PROGMEM = TR_MODE2;
|
||||
const pm_char STR_SLAVE[] PROGMEM = TR_SLAVE;
|
||||
const pm_char STR_MODESRC[] PROGMEM = TR_MODESRC;
|
||||
const pm_char STR_MULTIPLIER[] PROGMEM = TR_MULTIPLIER;
|
||||
|
|
|
@ -43,73 +43,72 @@
|
|||
#endif
|
||||
|
||||
#define PSIZE(x) ( sizeof(x) - 1 )
|
||||
|
||||
#define EOFS(x) ( OFS_##x + sizeof(TR_##x) )
|
||||
// The non-0-terminated-strings
|
||||
|
||||
extern const pm_char STR_OPEN9X[];
|
||||
|
||||
#define OFS_OFFON 0
|
||||
#define OFS_MMMINV (OFS_OFFON + PSIZE(TR_OFFON))
|
||||
#define OFS_NCHANNELS (OFS_MMMINV + PSIZE(TR_MMMINV))
|
||||
#define OFS_VBEEPMODE (OFS_NCHANNELS + PSIZE(TR_NCHANNELS))
|
||||
#define OFS_VBEEPLEN (OFS_VBEEPMODE + PSIZE(TR_VBEEPMODE))
|
||||
#define OFS_ADCFILTER (OFS_VBEEPLEN + PSIZE(TR_VBEEPLEN))
|
||||
#define OFS_WARNSW (OFS_ADCFILTER + PSIZE(TR_ADCFILTER))
|
||||
#define OFS_TRNMODE (OFS_WARNSW + PSIZE(TR_WARNSW))
|
||||
#define OFS_TRNCHN (OFS_TRNMODE + PSIZE(TR_TRNMODE))
|
||||
#define OFS_VTRIMINC (OFS_TRNCHN + PSIZE(TR_TRNCHN))
|
||||
#define OFS_RETA123 (OFS_VTRIMINC + PSIZE(TR_VTRIMINC))
|
||||
#define OFS_VPROTOS (OFS_RETA123 + PSIZE(TR_RETA123))
|
||||
#define OFS_POSNEG (OFS_VPROTOS + PSIZE(TR_VPROTOS))
|
||||
#define OFS_VCURVEFUNC (OFS_POSNEG + PSIZE(TR_POSNEG))
|
||||
#define OFS_CURVMODES (OFS_VCURVEFUNC + PSIZE(TR_VCURVEFUNC))
|
||||
#define OFS_EXPLABELS (OFS_CURVMODES + PSIZE(TR_CURVMODES))
|
||||
#define OFS_VMLTPX (OFS_EXPLABELS + PSIZE(TR_EXPLABELS))
|
||||
#define OFS_VMLTPX2 (OFS_VMLTPX + PSIZE(TR_VMLTPX))
|
||||
#define OFS_VMIXTRIMS (OFS_VMLTPX2 + PSIZE(TR_VMLTPX2))
|
||||
#define OFS_VCSWFUNC (OFS_VMIXTRIMS + PSIZE(TR_VMIXTRIMS))
|
||||
#define OFS_VFSWFUNC (OFS_VCSWFUNC + PSIZE(TR_VCSWFUNC))
|
||||
#define OFS_FUNCSOUNDS (OFS_VFSWFUNC + PSIZE(TR_VFSWFUNC))
|
||||
#define OFS_MMMINV (OFS_OFFON + sizeof(TR_OFFON))
|
||||
#define OFS_NCHANNELS (OFS_MMMINV + sizeof(TR_MMMINV))
|
||||
#define OFS_VBEEPMODE (OFS_NCHANNELS + sizeof(TR_NCHANNELS))
|
||||
#define OFS_VBEEPLEN (OFS_VBEEPMODE + sizeof(TR_VBEEPMODE))
|
||||
#define OFS_ADCFILTER (OFS_VBEEPLEN + sizeof(TR_VBEEPLEN))
|
||||
#define OFS_WARNSW (OFS_ADCFILTER + sizeof(TR_ADCFILTER))
|
||||
#define OFS_TRNMODE (OFS_WARNSW + sizeof(TR_WARNSW))
|
||||
#define OFS_TRNCHN (OFS_TRNMODE + sizeof(TR_TRNMODE))
|
||||
#define OFS_VTRIMINC (OFS_TRNCHN + sizeof(TR_TRNCHN))
|
||||
#define OFS_RETA123 (OFS_VTRIMINC + sizeof(TR_VTRIMINC))
|
||||
#define OFS_VPROTOS (OFS_RETA123 + sizeof(TR_RETA123))
|
||||
#define OFS_POSNEG (OFS_VPROTOS + sizeof(TR_VPROTOS))
|
||||
#define OFS_VCURVEFUNC (OFS_POSNEG + sizeof(TR_POSNEG))
|
||||
#define OFS_CURVMODES (OFS_VCURVEFUNC + sizeof(TR_VCURVEFUNC))
|
||||
#define OFS_EXPLABELS (OFS_CURVMODES + sizeof(TR_CURVMODES))
|
||||
#define OFS_VMLTPX (OFS_EXPLABELS + sizeof(TR_EXPLABELS))
|
||||
#define OFS_VMLTPX2 (OFS_VMLTPX + sizeof(TR_VMLTPX))
|
||||
#define OFS_VMIXTRIMS (OFS_VMLTPX2 + sizeof(TR_VMLTPX2))
|
||||
#define OFS_VCSWFUNC (OFS_VMIXTRIMS + sizeof(TR_VMIXTRIMS))
|
||||
#define OFS_VFSWFUNC (OFS_VCSWFUNC + sizeof(TR_VCSWFUNC))
|
||||
#define OFS_FUNCSOUNDS (OFS_VFSWFUNC + sizeof(TR_VFSWFUNC))
|
||||
#ifdef FRSKY
|
||||
#define OFS_VTELEMBARS (OFS_FUNCSOUNDS + PSIZE(TR_FUNCSOUNDS))
|
||||
#define OFS_VTELEMUNIT (OFS_VTELEMBARS + PSIZE(TR_VTELEMBARS))
|
||||
#define OFS_VALARM (OFS_VTELEMUNIT + PSIZE(TR_VTELEMUNIT))
|
||||
#define OFS_VALARMFN (OFS_VALARM + PSIZE(TR_VALARM))
|
||||
#define OFS_VTELPROTO (OFS_VALARMFN + PSIZE(TR_VALARMFN))
|
||||
#define OFS_TELEMCHNS (OFS_VTELPROTO + PSIZE(TR_VTELPROTO))
|
||||
#define OFS_ENDTELEM (OFS_TELEMCHNS + PSIZE(TR_TELEMCHNS))
|
||||
#define OFS_VTELEMBARS (OFS_FUNCSOUNDS + sizeof(TR_FUNCSOUNDS))
|
||||
#define OFS_VTELEMUNIT (OFS_VTELEMBARS + sizeof(TR_VTELEMBARS))
|
||||
#define OFS_VALARM (OFS_VTELEMUNIT + sizeof(TR_VTELEMUNIT))
|
||||
#define OFS_VALARMFN (OFS_VALARM + sizeof(TR_VALARM))
|
||||
#define OFS_VTELPROTO (OFS_VALARMFN + sizeof(TR_VALARMFN))
|
||||
#define OFS_TELEMCHNS (OFS_VTELPROTO + sizeof(TR_VTELPROTO))
|
||||
#define OFS_ENDTELEM (OFS_TELEMCHNS + sizeof(TR_TELEMCHNS))
|
||||
#else
|
||||
#define OFS_ENDTELEM (OFS_FUNCSOUNDS + PSIZE(TR_FUNCSOUNDS))
|
||||
#define OFS_ENDTELEM (OFS_FUNCSOUNDS + sizeof(TR_FUNCSOUNDS))
|
||||
#endif
|
||||
#ifdef TEMPLATES
|
||||
#define OFS_VTEMPLATES (OFS_ENDTELEM)
|
||||
#define OFS_ENDTPLS (OFS_VTEMPLATES + PSIZE(TR_VTEMPLATES))
|
||||
#define OFS_ENDTPLS (OFS_VTEMPLATES + sizeof(TR_VTEMPLATES))
|
||||
#else
|
||||
#define OFS_ENDTPLS (OFS_ENDTELEM)
|
||||
#endif
|
||||
#ifdef HELI
|
||||
#define OFS_VSWASHTYPE (OFS_ENDTPLS)
|
||||
#define OFS_ENDHELI (OFS_VSWASHTYPE + PSIZE(TR_VSWASHTYPE))
|
||||
#define OFS_ENDHELI (OFS_VSWASHTYPE + sizeof(TR_VSWASHTYPE))
|
||||
#else
|
||||
#define OFS_ENDHELI (OFS_ENDTPLS)
|
||||
#endif
|
||||
#define OFS_VKEYS (OFS_ENDHELI)
|
||||
#define OFS_VSWITCHES (OFS_VKEYS + PSIZE(TR_VKEYS))
|
||||
#define OFS_VSRCRAW (OFS_VSWITCHES + PSIZE(TR_VSWITCHES))
|
||||
#define OFS_VTMRMODES (OFS_VSRCRAW + PSIZE(TR_VSRCRAW))
|
||||
#define OFS_VSWITCHES (OFS_VKEYS + sizeof(TR_VKEYS))
|
||||
#define OFS_VSRCRAW (OFS_VSWITCHES + sizeof(TR_VSWITCHES))
|
||||
#define OFS_VTMRMODES (OFS_VSRCRAW + sizeof(TR_VSRCRAW))
|
||||
#if defined(DSM2)
|
||||
#define OFS_DSM2MODE (OFS_VTMRMODES + PSIZE(TR_VTMRMODES))
|
||||
#define OFS_ENDDSM2 (OFS_DSM2MODE + PSIZE(TR_DSM2MODE))
|
||||
#define OFS_DSM2MODE (OFS_VTMRMODES + sizeof(TR_VTMRMODES))
|
||||
#define OFS_ENDDSM2 (OFS_DSM2MODE + sizeof(TR_DSM2MODE))
|
||||
#else
|
||||
#define OFS_ENDDSM2 (OFS_VTMRMODES + PSIZE(TR_VTMRMODES))
|
||||
#define OFS_ENDDSM2 (OFS_VTMRMODES + sizeof(TR_VTMRMODES))
|
||||
#endif
|
||||
#if defined(PCBV4)
|
||||
#define OFS_RE1RE2 (OFS_ENDDSM2)
|
||||
#define OFS_DATETIME (OFS_RE1RE2 + PSIZE(TR_RE1RE2))
|
||||
#define OFS_DATETIME (OFS_RE1RE2 + sizeof(TR_RE1RE2))
|
||||
#endif
|
||||
|
||||
#define STR_OFFON (STR_OPEN9X + OFS_OFFON)
|
||||
#define STR_ONOFF (STR_OPEN9X + OFS_OFFON + LEN_OFFON)
|
||||
#define STR_MMMINV (STR_OPEN9X + OFS_MMMINV)
|
||||
#define STR_NCHANNELS (STR_OPEN9X + OFS_NCHANNELS)
|
||||
#define STR_VBEEPMODE (STR_OPEN9X + OFS_VBEEPMODE)
|
||||
|
@ -218,7 +217,6 @@ extern const pm_char STR_DELAYUP[];
|
|||
extern const pm_char STR_SLOWDOWN[];
|
||||
extern const pm_char STR_SLOWUP[];
|
||||
extern const pm_char STR_MIXER[];
|
||||
extern const pm_char STR_COPYTRIMMENU[];
|
||||
extern const pm_char STR_CV[];
|
||||
extern const pm_char STR_SW[];
|
||||
extern const pm_char STR_ACHANNEL[];
|
||||
|
@ -251,7 +249,6 @@ extern const pm_char STR_MEMORYWARNING[];
|
|||
extern const pm_char STR_ALARMWARNING[];
|
||||
extern const pm_char STR_NODATAALARM[];
|
||||
extern const pm_char STR_RXCHANNELORD[];
|
||||
extern const pm_char STR_MODE2[];
|
||||
extern const pm_char STR_SLAVE[];
|
||||
extern const pm_char STR_MODESRC[];
|
||||
extern const pm_char STR_MULTIPLIER[];
|
||||
|
|
|
@ -64,6 +64,8 @@ audioQueue audio;
|
|||
|
||||
uint8_t heartbeat;
|
||||
|
||||
uint8_t stickMode;
|
||||
|
||||
int8_t safetyCh[NUM_CHNOUT];
|
||||
|
||||
union ReusableBuffer reusableBuffer;
|
||||
|
@ -295,7 +297,7 @@ void applyExpos(int16_t *anas, uint8_t phase)
|
|||
bool s_noStickInputs = false;
|
||||
int16_t getValue(uint8_t i)
|
||||
{
|
||||
if(i<NUM_STICKS+NUM_POTS) return (s_noStickInputs ? 0 : calibratedStick[i]);
|
||||
if(i<NUM_STICKS+NUM_POTS) return calibratedStick[i];
|
||||
else if(i<MIX_FULL/*srcRaw is shifted +1!*/) return 1024; //FULL/MAX
|
||||
else if(i<PPM_BASE+NUM_CAL_PPM) return (g_ppmIns[i-PPM_BASE] - g_eeGeneral.trainer.calib[i-PPM_BASE])*2;
|
||||
else if(i<PPM_BASE+NUM_PPM) return g_ppmIns[i-PPM_BASE]*2;
|
||||
|
@ -599,7 +601,7 @@ void checkTHR()
|
|||
{
|
||||
if(g_eeGeneral.disableThrottleWarning) return;
|
||||
|
||||
int thrchn=(2-(g_eeGeneral.stickMode&1));//stickMode=0123 -> thr=2121
|
||||
int thrchn=(2-(stickMode&1));//stickMode=0123 -> thr=2121
|
||||
|
||||
int16_t lowLim = THRCHK_DEADBAND + g_eeGeneral.calibMid[thrchn] - g_eeGeneral.calibSpanNeg[thrchn];
|
||||
|
||||
|
@ -1096,7 +1098,7 @@ void evalFunctions()
|
|||
if (sd->swtch) {
|
||||
uint16_t mask = (sd->func >= FUNC_TRAINER ? (1 << (sd->func-FUNC_TRAINER)) : 0);
|
||||
if (getSwitch(sd->swtch, 0)) {
|
||||
if (sd->func < FUNC_TRAINER) {
|
||||
if (sd->func < FUNC_TRAINER && (g_menuStack[0] != menuProcFunctionSwitches || m_posVert != i+1 || m_posHorz > 1)) {
|
||||
safetyCh[sd->func] = (int8_t)sd->param;
|
||||
}
|
||||
if (sd->func == FUNC_PLAY_SOUND) {
|
||||
|
@ -1197,15 +1199,8 @@ void perOut(int16_t *chanOut, uint8_t phase)
|
|||
}
|
||||
#endif
|
||||
|
||||
if (s_noStickInputs) {
|
||||
for (uint8_t i=0; i<NUM_STICKS; i++) anas[i] = 0;
|
||||
for (uint8_t i=0; i<NUM_PPM; i++) anas[i+PPM_BASE] = 0;
|
||||
}
|
||||
else {
|
||||
for (uint8_t i=0; i<NUM_CAL_PPM; i++) anas[i+PPM_BASE] = (g_ppmIns[i] - g_eeGeneral.trainer.calib[i])*2; // add ppm channels
|
||||
for (uint8_t i=NUM_CAL_PPM; i<NUM_PPM; i++) anas[i+PPM_BASE] = g_ppmIns[i]*2; // add ppm channels
|
||||
}
|
||||
|
||||
for (uint8_t i=CHOUT_BASE; i<CHOUT_BASE+NUM_CHNOUT; i++) anas[i] = chans[i-CHOUT_BASE]; // other mixes previous outputs
|
||||
|
||||
memset(chans, 0, sizeof(chans)); // All outputs to 0
|
||||
|
@ -2063,32 +2058,6 @@ void instantTrim()
|
|||
AUDIO_WARNING1();
|
||||
}
|
||||
|
||||
void moveTrimsToOffsets() // copy state of 3 primary to subtrim
|
||||
{
|
||||
int16_t zero_chans512[NUM_CHNOUT];
|
||||
|
||||
s_noStickInputs = true;
|
||||
perOut(zero_chans512, getFlightPhase()); // do output loop - zero input sticks
|
||||
s_noStickInputs = false;
|
||||
|
||||
for (uint8_t i=0; i<NUM_CHNOUT; i++)
|
||||
g_model.limitData[i].offset = limit((int16_t)-1000, (int16_t)(((int32_t)zero_chans512[i]*125)/128), (int16_t)1000); // make sure the offset doesn't go haywire
|
||||
|
||||
// reset all trims, except throttle
|
||||
for (uint8_t i=0; i<NUM_STICKS; i++) {
|
||||
if (i!=THR_STICK) {
|
||||
for (uint8_t phase=0; phase<MAX_PHASES; phase++) {
|
||||
int16_t trim = getTrimValue(phase, i);
|
||||
if (trim <= TRIM_EXTENDED_MAX)
|
||||
setTrimValue(phase, i, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
STORE_MODELVARS;
|
||||
AUDIO_WARNING1();
|
||||
}
|
||||
|
||||
#if defined (PCBV4)
|
||||
// Rotary encoder interrupts
|
||||
volatile uint8_t g_rotenc[2] = {0};
|
||||
|
|
|
@ -252,9 +252,11 @@ extern uint16_t DEBUG2;
|
|||
extern const pm_uint8_t bchout_ar[];
|
||||
extern const pm_uint8_t modn12x3[];
|
||||
|
||||
//convert from mode 1 to mode g_eeGeneral.stickMode
|
||||
extern uint8_t stickMode;
|
||||
|
||||
//convert from mode 1 to mode stickMode
|
||||
//NOTICE! => 1..4 -> 1..4
|
||||
#define CONVERT_MODE(x) (((x)<=4) ? pgm_read_byte(modn12x3 + 4*g_eeGeneral.stickMode + (x)-1) : (x) )
|
||||
#define CONVERT_MODE(x) (((x)<=4) ? pgm_read_byte(modn12x3 + 4*stickMode + (x)-1) : (x) )
|
||||
|
||||
#define RUD_STICK 0
|
||||
#define ELE_STICK 1
|
||||
|
@ -669,7 +671,6 @@ extern LimitData *limitaddress(uint8_t idx);
|
|||
|
||||
extern void incSubtrim(uint8_t idx, int16_t inc);
|
||||
extern void instantTrim();
|
||||
extern void moveTrimsToOffsets(); // move state of 3 primary trims to offsets
|
||||
|
||||
extern uint16_t active_functions;
|
||||
inline bool isFunctionActive(uint8_t func)
|
||||
|
|
|
@ -40,14 +40,8 @@ void generalDefault()
|
|||
{
|
||||
memset(&g_eeGeneral,0,sizeof(g_eeGeneral));
|
||||
g_eeGeneral.myVers = EEPROM_VER;
|
||||
g_eeGeneral.currModel= 0;
|
||||
g_eeGeneral.contrast = 25;
|
||||
g_eeGeneral.vBatWarn = 90;
|
||||
#ifdef DEFAULTMODE1
|
||||
g_eeGeneral.stickMode= 0; // default to mode 1
|
||||
#else
|
||||
g_eeGeneral.stickMode= 2; // default to mode 2
|
||||
#endif
|
||||
for (int i = 0; i < 7; ++i) {
|
||||
g_eeGeneral.calibMid[i] = 0x200;
|
||||
g_eeGeneral.calibSpanNeg[i] = 0x180;
|
||||
|
@ -196,6 +190,7 @@ void eeReadAll()
|
|||
//alert(PSTR("modwrite ok"));
|
||||
}
|
||||
|
||||
stickMode = g_eeGeneral.stickMode;
|
||||
eeLoadModel(g_eeGeneral.currModel);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,68 +1,68 @@
|
|||
// NON ZERO TERMINATED STRINGS
|
||||
#define LEN_OFFON 3
|
||||
#define LEN_OFFON "\003"
|
||||
#define TR_OFFON "OFF""ON "
|
||||
|
||||
#define LEN_MMMINV 3
|
||||
#define LEN_MMMINV "\003"
|
||||
#define TR_MMMINV "---""INV"
|
||||
|
||||
#define LEN_NCHANNELS 4
|
||||
#define LEN_NCHANNELS "\004"
|
||||
#define TR_NCHANNELS "4CH 6CH 8CH 10CH12CH14CH16CH"
|
||||
|
||||
#define LEN_VBEEPMODE 6
|
||||
#define TR_VBEEPMODE "Quiet ""Alarms""NoKey ""Normal"
|
||||
#define LEN_VBEEPMODE "\006"
|
||||
#define TR_VBEEPMODE "Quiet ""Alarms""NoKey ""All "
|
||||
|
||||
#define LEN_VBEEPLEN 6
|
||||
#define LEN_VBEEPLEN "\006"
|
||||
#define TR_VBEEPLEN "xShort""Short ""Normal""Long ""xLong "
|
||||
|
||||
#define LEN_ADCFILTER 4
|
||||
#define LEN_ADCFILTER "\004"
|
||||
#define TR_ADCFILTER "SING""OSMP""FILT"
|
||||
|
||||
#define LEN_WARNSW 4
|
||||
#define LEN_WARNSW "\004"
|
||||
#define TR_WARNSW "Down""OFF ""Up "
|
||||
|
||||
#define LEN_TRNMODE 3
|
||||
#define LEN_TRNMODE "\003"
|
||||
#define TR_TRNMODE "off"" +="" :="
|
||||
|
||||
#define LEN_TRNCHN 3
|
||||
#define LEN_TRNCHN "\003"
|
||||
#define TR_TRNCHN "ch1ch2ch3ch4"
|
||||
|
||||
#define LEN_DATETIME 5
|
||||
#define LEN_DATETIME "\005"
|
||||
#define TR_DATETIME "DATE:""TIME:"
|
||||
|
||||
#define LEN_VTRIMINC 6
|
||||
#define LEN_VTRIMINC "\006"
|
||||
#define TR_VTRIMINC "Exp ""ExFine""Fine ""Medium""Coarse"
|
||||
|
||||
#define LEN_RETA123 1
|
||||
#define LEN_RETA123 "\001"
|
||||
#define TR_RETA123 "RETA123"
|
||||
|
||||
#define LEN_VPROTOS 5
|
||||
#define LEN_VPROTOS "\005"
|
||||
#define TR_VPROTOS "PPM ""PXX ""DSM2 ""PPM16"
|
||||
|
||||
#define LEN_POSNEG 3
|
||||
#define LEN_POSNEG "\003"
|
||||
#define TR_POSNEG "POS""NEG"
|
||||
|
||||
#define LEN_VCURVEFUNC 3
|
||||
#define LEN_VCURVEFUNC "\003"
|
||||
#define TR_VCURVEFUNC "---""x>0""x<0""|x|""f>0""f<0""|f|"
|
||||
|
||||
#define LEN_CURVMODES 5
|
||||
#define LEN_CURVMODES "\005"
|
||||
#define TR_CURVMODES "EDIT ""PRSET""A.THR"
|
||||
|
||||
#define LEN_EXPLABELS 6
|
||||
#define LEN_EXPLABELS "\006"
|
||||
#define TR_EXPLABELS "Weight""Expo ""Phase ""Swtch ""When ""Curve "" " // TODO remove all the trailing spaces
|
||||
|
||||
#define LEN_VMLTPX 8
|
||||
#define LEN_VMLTPX "\010"
|
||||
#define TR_VMLTPX "Add ""Multiply""Replace "
|
||||
|
||||
#define LEN_VMLTPX2 2
|
||||
#define LEN_VMLTPX2 "\002"
|
||||
#define TR_VMLTPX2 "+=""*="":="
|
||||
|
||||
#define LEN_VMIXTRIMS 6
|
||||
#define LEN_VMIXTRIMS "\006"
|
||||
#define TR_VMIXTRIMS "ON ""OFF ""Offset"
|
||||
|
||||
#define LEN_VCSWFUNC 7
|
||||
#define LEN_VCSWFUNC "\007"
|
||||
#define TR_VCSWFUNC "----\0 ""v>ofs ""v<ofs ""|v|>ofs""|v|<ofs""AND ""OR ""XOR ""v1==v2 ""v1!=v2 ""v1>v2 ""v1<v2 ""v1>=v2 ""v1<=v2 "
|
||||
|
||||
#define LEN_VFSWFUNC 13
|
||||
#define LEN_VFSWFUNC "\015"
|
||||
#ifdef LOGS
|
||||
#define TR_SDCLOGGS "SDCARD Logs "
|
||||
#else
|
||||
|
@ -73,65 +73,65 @@
|
|||
#else
|
||||
#define TR_SOMO
|
||||
#endif
|
||||
#define TR_VFSWFUNC "Security \0 ""Trainer \0 ""Instant Trim ""Trims2Offsets""Play Sound\0 " TR_SOMO TR_SDCLOGGS
|
||||
#define TR_VFSWFUNC "Security \0 ""Trainer \0 ""Instant Trim ""Play Sound\0 " TR_SOMO TR_SDCLOGGS
|
||||
|
||||
#define LEN_FUNCSOUNDS 6
|
||||
#define LEN_FUNCSOUNDS "\006"
|
||||
#define TR_FUNCSOUNDS "Warn1 ""Warn2 ""Cheep ""Ring ""SciFi ""Robot ""Chirp ""Tada ""Crickt""Siren ""AlmClk""Ratata""Tick ""Haptc1""Haptc2""Haptc3"
|
||||
|
||||
#define LEN_VTELEMBARS 4
|
||||
#define LEN_VTELEMBARS "\004"
|
||||
#define TR_VTELEMBARS "---\0""A1\0 ""A2\0 ""ALT\0""RPM\0""FUEL""T1\0 ""T2\0 ""SPD\0""CELL"
|
||||
|
||||
#define LEN_VTELEMUNIT 3
|
||||
#define LEN_VTELEMUNIT "\003"
|
||||
#define TR_VTELEMUNIT "v\0 ""A\0 ""-\0 ""kts""kmh""M/h""m\0 ""@\0 ""%\0"
|
||||
#define STR_V (STR_VTELEMUNIT)
|
||||
#define STR_A (STR_VTELEMUNIT+LEN_VTELEMUNIT)
|
||||
#define STR_V (STR_VTELEMUNIT+1)
|
||||
#define STR_A (STR_VTELEMUNIT+4)
|
||||
|
||||
#define LEN_VALARM 3
|
||||
#define LEN_VALARM "\003"
|
||||
#define TR_VALARM "---""Yel""Org""Red"
|
||||
|
||||
#define LEN_VALARMFN 1
|
||||
#define LEN_VALARMFN "\001"
|
||||
#define TR_VALARMFN "<>"
|
||||
|
||||
#define LEN_VTELPROTO 4
|
||||
#define LEN_VTELPROTO "\004"
|
||||
#if defined(WS_HOW_HIGH)
|
||||
#define TR_VTELPROTO "NoneHub WSHH"
|
||||
#elif defined(FRSKY_HUB)
|
||||
#define TR_VTELPROTO "NoneHub "
|
||||
#endif
|
||||
|
||||
#define LEN_VTEMPLATES 12
|
||||
#define LEN_VTEMPLATES "\014"
|
||||
#define TR_VTEMPLATES "Simple 4-CH ""T-Cut ""V-Tail ""Elevon\\Delta""eCCPM ""Heli Setup ""Servo Test "
|
||||
|
||||
#define LEN_VSWASHTYPE 4
|
||||
#define LEN_VSWASHTYPE "\004"
|
||||
#define TR_VSWASHTYPE "--- ""120 ""120X""140 ""90 "
|
||||
|
||||
#define LEN_VKEYS 5
|
||||
#define LEN_VKEYS "\005"
|
||||
#define TR_VKEYS " Menu"" Exit"" Down"" Up""Right"" Left"
|
||||
|
||||
#define LEN_RE1RE2 3
|
||||
#define LEN_RE1RE2 "\003"
|
||||
#define TR_RE1RE2 "RE1""RE2"
|
||||
|
||||
#define LEN_VSWITCHES 3
|
||||
#define LEN_VSWITCHES "\003"
|
||||
#define TR_VSWITCHES "THR""RUD""ELE""ID0""ID1""ID2""AIL""GEA""TRN""SW1""SW2""SW3""SW4""SW5""SW6""SW7""SW8""SW9""SWA""SWB""SWC"
|
||||
|
||||
#define LEN_VSRCRAW 4
|
||||
#define LEN_VSRCRAW "\004"
|
||||
#define TR_VSRCRAW "RUD ""ELE ""THR ""AIL ""P1 ""P2 ""P3 ""MAX ""FULL""CYC1""CYC2""CYC3"
|
||||
|
||||
#define LEN_VTMRMODES 3
|
||||
#define LEN_VTMRMODES "\003"
|
||||
#define TR_VTMRMODES "OFF""ABS""THs""TH%""THt"
|
||||
|
||||
#if defined(FRSKY_HUB)
|
||||
#define LEN_TELEMCHNS 4
|
||||
#define LEN_TELEMCHNS "\004"
|
||||
#define TR_TELEMCHNS "AD1 AD2 ALT RPM FUELT@1 T@2 SPD\0CELL"
|
||||
#elif defined(WS_HOW_HIGH)
|
||||
#define LEN_TELEMCHNS 3
|
||||
#define LEN_TELEMCHNS "\003"
|
||||
#define TR_TELEMCHNS "AD1AD2ALT"
|
||||
#elif defined(FRSKY)
|
||||
#define LEN_TELEMCHNS 3
|
||||
#define LEN_TELEMCHNS "\003"
|
||||
#define TR_TELEMCHNS "AD1AD2"
|
||||
#endif
|
||||
|
||||
#define LEN_DSM2MODE 7
|
||||
#define LEN_DSM2MODE "\007"
|
||||
#define TR_DSM2MODE "LP4/LP5DSMonlyDSMX "
|
||||
|
||||
// ZERO TERMINATED STRINGS
|
||||
|
@ -166,7 +166,7 @@
|
|||
#define TR_ELEDIRECTION "ELE Direction"
|
||||
#define TR_AILDIRECTION "AIL Direction"
|
||||
#define TR_COLDIRECTION "COL Direction"
|
||||
#define TR_MODE "MODE"
|
||||
#define TR_MODE "Mode"
|
||||
#define TR_NOFREEEXPO "No free expo!"
|
||||
#define TR_NOFREEMIXER "No free mixer!"
|
||||
#define TR_INSERTMIX "INSERT MIX "
|
||||
|
@ -189,7 +189,6 @@
|
|||
#define TR_SLOWDOWN "Slow Down"
|
||||
#define TR_SLOWUP "Slow Up"
|
||||
#define TR_MIXER "MIXER"
|
||||
#define TR_COPYTRIMMENU "COPY TRIM [MENU]"
|
||||
#define TR_CV "CV"
|
||||
#define TR_SW "SW"
|
||||
#define TR_ACHANNEL "A\002channel"
|
||||
|
@ -227,7 +226,6 @@
|
|||
#define TR_ALARMWARNING "Alarm Warning"
|
||||
#define TR_NODATAALARM "NO DATA Alarm"
|
||||
#define TR_RXCHANNELORD "Rx Channel Ord"
|
||||
#define TR_MODE2 "Mode"
|
||||
#define TR_SLAVE "Slave"
|
||||
#define TR_MODESRC "mode\003% src"
|
||||
#define TR_MULTIPLIER "Multiplier"
|
||||
|
|
|
@ -1,68 +1,68 @@
|
|||
// NON ZERO TERMINATED STRINGS
|
||||
#define LEN_OFFON 3
|
||||
#define LEN_OFFON "\003"
|
||||
#define TR_OFFON "OFF""ON "
|
||||
|
||||
#define LEN_MMMINV 3
|
||||
#define LEN_MMMINV "\003"
|
||||
#define TR_MMMINV "---""INV"
|
||||
|
||||
#define LEN_NCHANNELS 4
|
||||
#define LEN_NCHANNELS "\004"
|
||||
#define TR_NCHANNELS "4CH 6CH 8CH 10CH12CH14CH16CH"
|
||||
|
||||
#define LEN_VBEEPMODE 6
|
||||
#define TR_VBEEPMODE "Quiet ""Alarms""NoKey ""Normal"
|
||||
#define LEN_VBEEPMODE "\006"
|
||||
#define TR_VBEEPMODE "Quiet ""Alarms""NoKey ""Tout "
|
||||
|
||||
#define LEN_VBEEPLEN 6
|
||||
#define LEN_VBEEPLEN "\006"
|
||||
#define TR_VBEEPLEN "xShort""Short ""Normal""Long ""xLong "
|
||||
|
||||
#define LEN_ADCFILTER 4
|
||||
#define LEN_ADCFILTER "\004"
|
||||
#define TR_ADCFILTER "SING""OSMP""FILT"
|
||||
|
||||
#define LEN_WARNSW 4
|
||||
#define LEN_WARNSW "\004"
|
||||
#define TR_WARNSW "Bas ""OFF ""Haut"
|
||||
|
||||
#define LEN_TRNMODE 3
|
||||
#define LEN_TRNMODE "\003"
|
||||
#define TR_TRNMODE "off"" +="" :="
|
||||
|
||||
#define LEN_TRNCHN 3
|
||||
#define LEN_TRNCHN "\003"
|
||||
#define TR_TRNCHN "ch1ch2ch3ch4"
|
||||
|
||||
#define LEN_DATETIME 5
|
||||
#define LEN_DATETIME "\005"
|
||||
#define TR_DATETIME "DATE:""HEURE"
|
||||
|
||||
#define LEN_VTRIMINC 6
|
||||
#define LEN_VTRIMINC "\006"
|
||||
#define TR_VTRIMINC "Exp ""ExFin ""Fin ""Moyen ""Gros "
|
||||
|
||||
#define LEN_RETA123 1
|
||||
#define LEN_RETA123 "\001"
|
||||
#define TR_RETA123 "RETA123"
|
||||
|
||||
#define LEN_VPROTOS 5
|
||||
#define LEN_VPROTOS "\005"
|
||||
#define TR_VPROTOS "PPM ""PXX ""DSM2 ""PPM16"
|
||||
|
||||
#define LEN_POSNEG 3
|
||||
#define LEN_POSNEG "\003"
|
||||
#define TR_POSNEG "POS""NEG"
|
||||
|
||||
#define LEN_VCURVEFUNC 3
|
||||
#define LEN_VCURVEFUNC "\003"
|
||||
#define TR_VCURVEFUNC "---""x>0""x<0""|x|""f>0""f<0""|f|"
|
||||
|
||||
#define LEN_CURVMODES 5
|
||||
#define LEN_CURVMODES "\005"
|
||||
#define TR_CURVMODES "EDIT ""PRSET""A.GAZ"
|
||||
|
||||
#define LEN_EXPLABELS 6
|
||||
#define LEN_EXPLABELS "\006"
|
||||
#define TR_EXPLABELS "Ratio ""Expo ""Phase ""Inter ""Mode ""Courbe"" "
|
||||
|
||||
#define LEN_VMLTPX 8
|
||||
#define LEN_VMLTPX "\010"
|
||||
#define TR_VMLTPX "Ajouter ""Multiply""Remplace"
|
||||
|
||||
#define LEN_VMLTPX2 2
|
||||
#define LEN_VMLTPX2 "\002"
|
||||
#define TR_VMLTPX2 "+=""*="":="
|
||||
|
||||
#define LEN_VMIXTRIMS 6
|
||||
#define LEN_VMIXTRIMS "\006"
|
||||
#define TR_VMIXTRIMS "ON ""OFF ""Offset"
|
||||
|
||||
#define LEN_VCSWFUNC 7
|
||||
#define LEN_VCSWFUNC "\007"
|
||||
#define TR_VCSWFUNC "----\0 ""v>ofs ""v<ofs ""|v|>ofs""|v|<ofs""AND ""OR ""XOR ""v1==v2 ""v1!=v2 ""v1>v2 ""v1<v2 ""v1>=v2 ""v1<=v2 "
|
||||
|
||||
#define LEN_VFSWFUNC 13
|
||||
#define LEN_VFSWFUNC "\015"
|
||||
#ifdef LOGS
|
||||
#define TR_SDCLOGGS "SDCARD Logs "
|
||||
#else
|
||||
|
@ -73,65 +73,65 @@
|
|||
#else
|
||||
#define TR_SOMO
|
||||
#endif
|
||||
#define TR_VFSWFUNC "Securite \0 ""Ecolage \0 ""Trim instant ""Trims2Offsets""Jouer son\0 " TR_SOMO TR_SDCLOGGS
|
||||
#define TR_VFSWFUNC "Securite \0 ""Ecolage \0 ""Trim instant ""Jouer son\0 " TR_SOMO TR_SDCLOGGS
|
||||
|
||||
#define LEN_FUNCSOUNDS 6
|
||||
#define LEN_FUNCSOUNDS "\006"
|
||||
#define TR_FUNCSOUNDS "Warn1 ""Warn2 ""Cheep ""Ring ""SciFi ""Robot ""Chirp ""Tada ""Crickt""Siren ""AlmClk""Ratata""Tick ""Haptc1""Haptc2""Haptc3"
|
||||
|
||||
#define LEN_VTELEMBARS 4
|
||||
#define LEN_VTELEMBARS "\004"
|
||||
#define TR_VTELEMBARS "---\0""A1\0 ""A2\0 ""ALT\0""RPM\0""FUEL""T1\0 ""T2\0 ""SPD\0""CELL"
|
||||
|
||||
#define LEN_VTELEMUNIT 3
|
||||
#define LEN_VTELEMUNIT "\003"
|
||||
#define TR_VTELEMUNIT "v\0 ""A\0 ""-\0 ""kts""kmh""M/h""m\0 ""@\0 ""%\0"
|
||||
#define STR_V (STR_VTELEMUNIT)
|
||||
#define STR_A (STR_VTELEMUNIT+LEN_VTELEMUNIT)
|
||||
#define STR_V (STR_VTELEMUNIT+1)
|
||||
#define STR_A (STR_VTELEMUNIT+4)
|
||||
|
||||
#define LEN_VALARM 3
|
||||
#define LEN_VALARM "\003"
|
||||
#define TR_VALARM "---""Yel""Org""Red"
|
||||
|
||||
#define LEN_VALARMFN 1
|
||||
#define LEN_VALARMFN "\001"
|
||||
#define TR_VALARMFN "<>"
|
||||
|
||||
#define LEN_VTELPROTO 4
|
||||
#define LEN_VTELPROTO "\004"
|
||||
#if defined(WS_HOW_HIGH)
|
||||
#define TR_VTELPROTO "NoneHub WSHH"
|
||||
#elif defined(FRSKY_HUB)
|
||||
#define TR_VTELPROTO "NoneHub "
|
||||
#endif
|
||||
|
||||
#define LEN_VTEMPLATES 14
|
||||
#define LEN_VTEMPLATES "\016"
|
||||
#define TR_VTEMPLATES "4 Voies simple""Coupure Gaz ""Empennage V ""Elevon\\Delta ""eCCPM ""Conf.Helico ""Servo Test "
|
||||
|
||||
#define LEN_VSWASHTYPE 4
|
||||
#define LEN_VSWASHTYPE "\004"
|
||||
#define TR_VSWASHTYPE "--- ""120 ""120X""140 ""90 "
|
||||
|
||||
#define LEN_VKEYS 5
|
||||
#define LEN_VKEYS "\005"
|
||||
#define TR_VKEYS " Menu"" Exit"" Bas"" Haut""Droit""Gauch"
|
||||
|
||||
#define LEN_RE1RE2 3
|
||||
#define LEN_RE1RE2 "\003"
|
||||
#define TR_RE1RE2 "RE1""RE2"
|
||||
|
||||
#define LEN_VSWITCHES 3
|
||||
#define LEN_VSWITCHES "\003"
|
||||
#define TR_VSWITCHES "GAZ""DIR""PRF""ID0""ID1""ID2""AIL""GEA""TRN""SW1""SW2""SW3""SW4""SW5""SW6""SW7""SW8""SW9""SWA""SWB""SWC"
|
||||
|
||||
#define LEN_VSRCRAW 4
|
||||
#define LEN_VSRCRAW "\004"
|
||||
#define TR_VSRCRAW "DIR ""PRF ""GAZ ""AIL ""P1 ""P2 ""P3 ""MAX ""FULL""CYC1""CYC2""CYC3"
|
||||
|
||||
#define LEN_VTMRMODES 3
|
||||
#define LEN_VTMRMODES "\003"
|
||||
#define TR_VTMRMODES "OFF""ABS""GZs""GZ%""GZt"
|
||||
|
||||
#if defined(FRSKY_HUB)
|
||||
#define LEN_TELEMCHNS 4
|
||||
#define LEN_TELEMCHNS "\004"
|
||||
#define TR_TELEMCHNS "AD1 AD2 ALT RPM FUELT@1 T@2 SPD\0CELL"
|
||||
#elif defined(WS_HOW_HIGH)
|
||||
#define LEN_TELEMCHNS 3
|
||||
#define LEN_TELEMCHNS "\003"
|
||||
#define TR_TELEMCHNS "AD1AD2ALT"
|
||||
#elif defined(FRSKY)
|
||||
#define LEN_TELEMCHNS 3
|
||||
#define LEN_TELEMCHNS "\003"
|
||||
#define TR_TELEMCHNS "AD1AD2"
|
||||
#endif
|
||||
|
||||
#define LEN_DSM2MODE 7
|
||||
#define LEN_DSM2MODE "\007"
|
||||
#define TR_DSM2MODE "LP4/LP5DSMonlyDSMX "
|
||||
|
||||
// ZERO TERMINATED STRINGS
|
||||
|
@ -166,7 +166,6 @@
|
|||
#define TR_ELEDIRECTION "Direction PRF"
|
||||
#define TR_AILDIRECTION "Direction AIL"
|
||||
#define TR_COLDIRECTION "Direction COL"
|
||||
#define TR_MODE "MODE"
|
||||
#define TR_NOFREEEXPO "Max expos atteint!"
|
||||
#define TR_NOFREEMIXER "Max mixages atteint!"
|
||||
#define TR_INSERTMIX "INSERER MIXAGE "
|
||||
|
@ -189,7 +188,6 @@
|
|||
#define TR_SLOWDOWN "Ralentir Haut"
|
||||
#define TR_SLOWUP "Ralentir Bas"
|
||||
#define TR_MIXER "MIXEUR"
|
||||
#define TR_COPYTRIMMENU "COPIER TRIM [MENU]"
|
||||
#define TR_CV "CV"
|
||||
#define TR_SW "SW"
|
||||
#define TR_ACHANNEL "A\002voie"
|
||||
|
@ -227,7 +225,7 @@
|
|||
#define TR_ALARMWARNING "Alerte Alarme"
|
||||
#define TR_NODATAALARM "PAS DE DONNEES Alarme"
|
||||
#define TR_RXCHANNELORD "Ordre Voies Rx"
|
||||
#define TR_MODE2 "Mode"
|
||||
#define TR_MODE "Mode"
|
||||
#define TR_SLAVE "Esclave"
|
||||
#define TR_MODESRC "mode\003% src"
|
||||
#define TR_MULTIPLIER "Multiplieur"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue