New compile option FLIGHT_PHASES added. Enabled by default of course.
This commit is contained in:
@@ -110,6 +110,10 @@ MOD_EXTRA_ROTARY_ENCODERS = NO
|
|||||||
# DEBUG mode
|
# DEBUG mode
|
||||||
DEBUG = NO
|
DEBUG = NO
|
||||||
|
|
||||||
|
# Flight Phases
|
||||||
|
# Values = YES, NO
|
||||||
|
FLIGHT_PHASES = YES
|
||||||
|
|
||||||
#------- END BUILD OPTIONS ---------------------------
|
#------- END BUILD OPTIONS ---------------------------
|
||||||
|
|
||||||
# Define programs and commands.
|
# Define programs and commands.
|
||||||
@@ -125,6 +129,7 @@ ifeq ($(PCB), STD)
|
|||||||
MCU = atmega64
|
MCU = atmega64
|
||||||
CPPDEFS += -DF_CPU=$(F_CPU)UL
|
CPPDEFS += -DF_CPU=$(F_CPU)UL
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(PCB), V4)
|
ifeq ($(PCB), V4)
|
||||||
ifeq ($(PCBREV), REV0)
|
ifeq ($(PCBREV), REV0)
|
||||||
CPPDEFS += -DREV0
|
CPPDEFS += -DREV0
|
||||||
@@ -135,6 +140,7 @@ ifeq ($(PCB), V4)
|
|||||||
MCU = atmega2560
|
MCU = atmega2560
|
||||||
CPPDEFS += -DF_CPU=$(F_CPU)UL
|
CPPDEFS += -DF_CPU=$(F_CPU)UL
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(PCB), ARM)
|
ifeq ($(PCB), ARM)
|
||||||
ifeq ($(PCBREV), REVA)
|
ifeq ($(PCBREV), REVA)
|
||||||
CPPDEFS += -DREVA
|
CPPDEFS += -DREVA
|
||||||
@@ -216,6 +222,10 @@ ifeq ($(SPLASH), YES)
|
|||||||
CPPDEFS += -DSPLASH
|
CPPDEFS += -DSPLASH
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(FLIGHT_PHASES), YES)
|
||||||
|
CPPDEFS += -DFLIGHT_PHASES
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(HAPTIC), YES)
|
ifeq ($(HAPTIC), YES)
|
||||||
CPPDEFS += -DHAPTIC
|
CPPDEFS += -DHAPTIC
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -526,6 +526,7 @@ void putsSwitches(uint8_t x, uint8_t y, int8_t idx, uint8_t att)
|
|||||||
lcd_putsiAtt(x, y, STR_VSWITCHES, idx-1, att);
|
lcd_putsiAtt(x, y, STR_VSWITCHES, idx-1, att);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef FLIGHT_PHASES
|
||||||
void putsFlightPhase(uint8_t x, uint8_t y, int8_t idx, uint8_t att)
|
void putsFlightPhase(uint8_t x, uint8_t y, int8_t idx, uint8_t att)
|
||||||
{
|
{
|
||||||
if (idx==0) { lcd_putsiAtt(x, y, STR_MMMINV, 0, att); return; }
|
if (idx==0) { lcd_putsiAtt(x, y, STR_MMMINV, 0, att); return; }
|
||||||
@@ -535,6 +536,7 @@ void putsFlightPhase(uint8_t x, uint8_t y, int8_t idx, uint8_t att)
|
|||||||
else
|
else
|
||||||
putsStrIdx(x, y, STR_FP, idx-1, att);
|
putsStrIdx(x, y, STR_FP, idx-1, att);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void putsCurve(uint8_t x, uint8_t y, int8_t idx, uint8_t att)
|
void putsCurve(uint8_t x, uint8_t y, int8_t idx, uint8_t att)
|
||||||
{
|
{
|
||||||
|
|||||||
+79
-24
@@ -43,7 +43,9 @@ enum EnumTabModel {
|
|||||||
#ifdef HELI
|
#ifdef HELI
|
||||||
e_Heli,
|
e_Heli,
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef FLIGHT_PHASES
|
||||||
e_PhasesAll,
|
e_PhasesAll,
|
||||||
|
#endif
|
||||||
e_ExposAll,
|
e_ExposAll,
|
||||||
e_MixAll,
|
e_MixAll,
|
||||||
e_Limits,
|
e_Limits,
|
||||||
@@ -63,7 +65,9 @@ void menuProcModel(uint8_t event);
|
|||||||
#ifdef HELI
|
#ifdef HELI
|
||||||
void menuProcHeli(uint8_t event);
|
void menuProcHeli(uint8_t event);
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef FLIGHT_PHASES
|
||||||
void menuProcPhasesAll(uint8_t event);
|
void menuProcPhasesAll(uint8_t event);
|
||||||
|
#endif
|
||||||
void menuProcExposAll(uint8_t event);
|
void menuProcExposAll(uint8_t event);
|
||||||
void menuProcMixAll(uint8_t event);
|
void menuProcMixAll(uint8_t event);
|
||||||
void menuProcLimits(uint8_t event);
|
void menuProcLimits(uint8_t event);
|
||||||
@@ -84,7 +88,9 @@ const MenuFuncP_PROGMEM menuTabModel[] PROGMEM = {
|
|||||||
#ifdef HELI
|
#ifdef HELI
|
||||||
menuProcHeli,
|
menuProcHeli,
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef FLIGHT_PHASES
|
||||||
menuProcPhasesAll,
|
menuProcPhasesAll,
|
||||||
|
#endif
|
||||||
menuProcExposAll,
|
menuProcExposAll,
|
||||||
menuProcMixAll,
|
menuProcMixAll,
|
||||||
menuProcLimits,
|
menuProcLimits,
|
||||||
@@ -242,9 +248,9 @@ void menuProcModelSelect(uint8_t event)
|
|||||||
#else
|
#else
|
||||||
displayPopup(STR_LOADINGMODEL);
|
displayPopup(STR_LOADINGMODEL);
|
||||||
eeCheck(true); // force writing of current model data before this is changed
|
eeCheck(true); // force writing of current model data before this is changed
|
||||||
eeLoadModel(sub);
|
|
||||||
g_eeGeneral.currModel = sub;
|
g_eeGeneral.currModel = sub;
|
||||||
STORE_GENERALVARS;
|
STORE_GENERALVARS;
|
||||||
|
eeLoadModel(sub);
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -630,6 +636,8 @@ void menuProcModel(uint8_t event)
|
|||||||
|
|
||||||
static uint8_t s_currIdx;
|
static uint8_t s_currIdx;
|
||||||
|
|
||||||
|
#ifdef FLIGHT_PHASES
|
||||||
|
|
||||||
void menuProcPhaseOne(uint8_t event)
|
void menuProcPhaseOne(uint8_t event)
|
||||||
{
|
{
|
||||||
PhaseData *phase = phaseaddress(s_currIdx);
|
PhaseData *phase = phaseaddress(s_currIdx);
|
||||||
@@ -773,6 +781,8 @@ void menuProcPhasesAll(uint8_t event)
|
|||||||
putsFlightPhase(6*FW, 7*FH, getFlightPhase()+1, att);
|
putsFlightPhase(6*FW, 7*FH, getFlightPhase()+1, att);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HELI
|
#ifdef HELI
|
||||||
|
|
||||||
void menu_lcd_HYPHINV( uint8_t x,uint8_t y, uint8_t value, uint8_t mode )
|
void menu_lcd_HYPHINV( uint8_t x,uint8_t y, uint8_t value, uint8_t mode )
|
||||||
@@ -1141,6 +1151,17 @@ bool swapExpoMix(uint8_t expo, uint8_t &idx, uint8_t up)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum ExposFields {
|
||||||
|
EXPO_FIELD_WIDTH,
|
||||||
|
EXPO_FIELD_EXPO,
|
||||||
|
EXPO_FIELD_CURVE,
|
||||||
|
#ifdef FLIGHT_PHASES
|
||||||
|
EXPO_FIELD_FLIGHT_PHASE,
|
||||||
|
#endif
|
||||||
|
EXPO_FIELD_SWITCH,
|
||||||
|
EXPO_FIELD_WHEN
|
||||||
|
};
|
||||||
|
|
||||||
inline void editExpoVals(uint8_t event, uint8_t which, bool edit, uint8_t y, uint8_t idt)
|
inline void editExpoVals(uint8_t event, uint8_t which, bool edit, uint8_t y, uint8_t idt)
|
||||||
{
|
{
|
||||||
uint8_t invBlk = edit ? INVERS : 0;
|
uint8_t invBlk = edit ? INVERS : 0;
|
||||||
@@ -1149,18 +1170,18 @@ inline void editExpoVals(uint8_t event, uint8_t which, bool edit, uint8_t y, uin
|
|||||||
|
|
||||||
switch(which)
|
switch(which)
|
||||||
{
|
{
|
||||||
case 0:
|
case EXPO_FIELD_WIDTH:
|
||||||
{
|
{
|
||||||
PREPARE_INFLIGHT_BITFIELD(&ed->expo - 1);
|
PREPARE_INFLIGHT_BITFIELD(&ed->expo - 1);
|
||||||
lcd_outdezAtt(9*FW+5, y, ed->weight, invBlk|INFLIGHT(*bitfield));
|
lcd_outdezAtt(9*FW+5, y, ed->weight, invBlk|INFLIGHT(*bitfield));
|
||||||
if (edit) CHECK_INFLIGHT_INCDEC_MODELVAR_BITFIELD(event, ed->weight, 0, 100, 0, STR_DRWEIGHT, 1);
|
if (edit) CHECK_INFLIGHT_INCDEC_MODELVAR_BITFIELD(event, ed->weight, 0, 100, 0, STR_DRWEIGHT, 1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case EXPO_FIELD_EXPO:
|
||||||
lcd_outdezAtt(9*FW+5, y, ed->expo, invBlk|INFLIGHT(ed->expo));
|
lcd_outdezAtt(9*FW+5, y, ed->expo, invBlk|INFLIGHT(ed->expo));
|
||||||
if (edit) CHECK_INFLIGHT_INCDEC_MODELVAR(event, ed->expo, -100, 100, 0, STR_DREXPO);
|
if (edit) CHECK_INFLIGHT_INCDEC_MODELVAR(event, ed->expo, -100, 100, 0, STR_DREXPO);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case EXPO_FIELD_CURVE:
|
||||||
putsCurve(6*FW+5, y, ed->curve+(ed->curve >= CURVE_BASE+4 ? 4 : 0), invBlk);
|
putsCurve(6*FW+5, y, ed->curve+(ed->curve >= CURVE_BASE+4 ? 4 : 0), invBlk);
|
||||||
if (invBlk) CHECK_INCDEC_MODELVAR(event, ed->curve, 0, 15);
|
if (invBlk) CHECK_INCDEC_MODELVAR(event, ed->curve, 0, 15);
|
||||||
if (invBlk && ed->curve>=CURVE_BASE && event==EVT_KEY_FIRST(KEY_MENU)) {
|
if (invBlk && ed->curve>=CURVE_BASE && event==EVT_KEY_FIRST(KEY_MENU)) {
|
||||||
@@ -1168,36 +1189,44 @@ inline void editExpoVals(uint8_t event, uint8_t which, bool edit, uint8_t y, uin
|
|||||||
pushMenu(menuProcCurveOne);
|
pushMenu(menuProcCurveOne);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
#ifdef FLIGHT_PHASES
|
||||||
|
case EXPO_FIELD_FLIGHT_PHASE:
|
||||||
{
|
{
|
||||||
int8_t phase = ed->negPhase ? -ed->phase : +ed->phase;
|
int8_t phase = ed->negPhase ? -ed->phase : +ed->phase;
|
||||||
putsFlightPhase(6*FW+5, y, phase, invBlk);
|
putsFlightPhase(6*FW+5, y, phase, invBlk);
|
||||||
if(edit) { phase = checkIncDecModel(event, phase, -MAX_PHASES, MAX_PHASES); ed->negPhase = (phase < 0); ed->phase = abs(phase); }
|
if(edit) { phase = checkIncDecModel(event, phase, -MAX_PHASES, MAX_PHASES); ed->negPhase = (phase < 0); ed->phase = abs(phase); }
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 4:
|
#endif
|
||||||
|
case EXPO_FIELD_SWITCH:
|
||||||
putsSwitches(6*FW+5, y, ed->swtch, invBlk);
|
putsSwitches(6*FW+5, y, ed->swtch, invBlk);
|
||||||
if(edit) CHECK_INCDEC_MODELVAR(event, ed->swtch, -MAX_DRSWITCH, MAX_DRSWITCH);
|
if(edit) CHECK_INCDEC_MODELVAR(event, ed->swtch, -MAX_DRSWITCH, MAX_DRSWITCH);
|
||||||
break;
|
break;
|
||||||
case 5:
|
case EXPO_FIELD_WHEN:
|
||||||
lcd_putsiAtt(6*FW+5, y, STR_VWHEN, 3-ed->mode, 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);
|
if(edit) ed->mode = 4 - checkIncDecModel(event, 4-ed->mode, 1, 3);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef FLIGHT_PHASES
|
||||||
|
#define EXPO_ONE_LINES_COUNT 6
|
||||||
|
#else
|
||||||
|
#define EXPO_ONE_LINES_COUNT 5
|
||||||
|
#endif
|
||||||
|
|
||||||
void menuProcExpoOne(uint8_t event)
|
void menuProcExpoOne(uint8_t event)
|
||||||
{
|
{
|
||||||
ExpoData *ed = expoaddress(s_currIdx);
|
ExpoData *ed = expoaddress(s_currIdx);
|
||||||
putsChnRaw(7*FW+FW/2,0,ed->chn+1,0);
|
putsChnRaw(7*FW+FW/2,0,ed->chn+1,0);
|
||||||
|
|
||||||
SIMPLE_SUBMENU(STR_MENUDREXPO, 6);
|
SIMPLE_SUBMENU(STR_MENUDREXPO, EXPO_ONE_LINES_COUNT);
|
||||||
|
|
||||||
int8_t sub = m_posVert;
|
int8_t sub = m_posVert;
|
||||||
|
|
||||||
uint8_t y = FH;
|
uint8_t y = FH;
|
||||||
|
|
||||||
for (uint8_t i=0; i<7; i++) {
|
for (uint8_t i=0; i<EXPO_ONE_LINES_COUNT+1; i++) {
|
||||||
lcd_putsiAtt(0, y, STR_EXPLABELS, i, 0);
|
lcd_putsiAtt(0, y, STR_EXPLABELS, i, 0);
|
||||||
editExpoVals(event, i, sub==i, y, s_currIdx);
|
editExpoVals(event, i, sub==i, y, s_currIdx);
|
||||||
y+=FH;
|
y+=FH;
|
||||||
@@ -1218,12 +1247,32 @@ void menuProcExpoOne(uint8_t event)
|
|||||||
lcd_hline(x512-3, y512,3*2+1);
|
lcd_hline(x512-3, y512,3*2+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum MixFields {
|
||||||
|
MIX_FIELD_SOURCE,
|
||||||
|
MIX_FIELD_WEIGHT,
|
||||||
|
MIX_FIELD_DIFFERENTIAL,
|
||||||
|
MIX_FIELD_OFFSET,
|
||||||
|
MIX_FIELD_TRIM,
|
||||||
|
MIX_FIELD_CURVE,
|
||||||
|
MIX_FIELD_SWITCH,
|
||||||
|
#ifdef FLIGHT_PHASES
|
||||||
|
MIX_FIELD_FLIGHT_PHASE,
|
||||||
|
#endif
|
||||||
|
MIX_FIELD_WARNING,
|
||||||
|
MIX_FIELD_MLTPX,
|
||||||
|
MIX_FIELD_DELAY_DOWN,
|
||||||
|
MIX_FIELD_DELAY_UP,
|
||||||
|
MIX_FIELD_SLOW_DOWN,
|
||||||
|
MIX_FIELD_SLOW_UP,
|
||||||
|
MIX_FIELD_COUNT
|
||||||
|
};
|
||||||
|
|
||||||
void menuProcMixOne(uint8_t event)
|
void menuProcMixOne(uint8_t event)
|
||||||
{
|
{
|
||||||
TITLEP(s_currCh ? STR_INSERTMIX : STR_EDITMIX);
|
TITLEP(s_currCh ? STR_INSERTMIX : STR_EDITMIX);
|
||||||
MixData *md2 = mixaddress(s_currIdx) ;
|
MixData *md2 = mixaddress(s_currIdx) ;
|
||||||
putsChn(lcd_lastPos+1*FW,0,md2->destCh+1,0);
|
putsChn(lcd_lastPos+1*FW,0,md2->destCh+1,0);
|
||||||
SIMPLE_SUBMENU_NOTITLE(14);
|
SIMPLE_SUBMENU_NOTITLE(MIX_FIELD_COUNT);
|
||||||
|
|
||||||
int8_t sub = m_posVert;
|
int8_t sub = m_posVert;
|
||||||
|
|
||||||
@@ -1232,33 +1281,33 @@ void menuProcMixOne(uint8_t event)
|
|||||||
uint8_t i = k + s_pgOfs;
|
uint8_t i = k + s_pgOfs;
|
||||||
uint8_t attr = sub==i ? INVERS : 0;
|
uint8_t attr = sub==i ? INVERS : 0;
|
||||||
switch(i) {
|
switch(i) {
|
||||||
case 0:
|
case MIX_FIELD_SOURCE:
|
||||||
lcd_puts(2*FW, y, STR_SOURCE);
|
lcd_puts(2*FW, y, STR_SOURCE);
|
||||||
putsMixerSource(FW*10, y, md2->srcRaw, attr);
|
putsMixerSource(FW*10, y, md2->srcRaw, attr);
|
||||||
if(attr) CHECK_INCDEC_MODELVAR(event, md2->srcRaw, 1, NUM_XCHNMIX);
|
if(attr) CHECK_INCDEC_MODELVAR(event, md2->srcRaw, 1, NUM_XCHNMIX);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case MIX_FIELD_WEIGHT:
|
||||||
lcd_puts(2*FW, y, STR_WEIGHT);
|
lcd_puts(2*FW, y, STR_WEIGHT);
|
||||||
lcd_outdezAtt(FW*10, y, md2->weight, attr|LEFT|INFLIGHT(md2->weight));
|
lcd_outdezAtt(FW*10, y, md2->weight, attr|LEFT|INFLIGHT(md2->weight));
|
||||||
if (attr) CHECK_INFLIGHT_INCDEC_MODELVAR(event, md2->weight, -125, 125, 0, STR_MIXERWEIGHT);
|
if (attr) CHECK_INFLIGHT_INCDEC_MODELVAR(event, md2->weight, -125, 125, 0, STR_MIXERWEIGHT);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case MIX_FIELD_DIFFERENTIAL:
|
||||||
// TODO INFLIGHT
|
// TODO INFLIGHT
|
||||||
lcd_puts(2*FW, y, STR_DIFFERENTIAL);
|
lcd_puts(2*FW, y, STR_DIFFERENTIAL);
|
||||||
lcd_outdezAtt(FW*10, y, md2->differential*2, attr|LEFT);
|
lcd_outdezAtt(FW*10, y, md2->differential*2, attr|LEFT);
|
||||||
if (attr) CHECK_INCDEC_MODELVAR(event, md2->differential, -50, 50);
|
if (attr) CHECK_INCDEC_MODELVAR(event, md2->differential, -50, 50);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case MIX_FIELD_OFFSET:
|
||||||
lcd_puts(2*FW, y, STR_OFFSET);
|
lcd_puts(2*FW, y, STR_OFFSET);
|
||||||
lcd_outdezAtt(FW*10, y, md2->sOffset, attr|LEFT|INFLIGHT(md2->sOffset));
|
lcd_outdezAtt(FW*10, y, md2->sOffset, attr|LEFT|INFLIGHT(md2->sOffset));
|
||||||
if (attr) CHECK_INFLIGHT_INCDEC_MODELVAR(event, md2->sOffset, -125, 125, 0, STR_MIXEROFFSET);
|
if (attr) CHECK_INFLIGHT_INCDEC_MODELVAR(event, md2->sOffset, -125, 125, 0, STR_MIXEROFFSET);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case MIX_FIELD_TRIM:
|
||||||
lcd_puts(2*FW, y, STR_TRIM);
|
lcd_puts(2*FW, y, STR_TRIM);
|
||||||
lcd_putsiAtt(FW*10, y, STR_VMIXTRIMS, (md2->srcRaw <= 4) ? md2->carryTrim : 1, attr);
|
lcd_putsiAtt(FW*10, y, STR_VMIXTRIMS, (md2->srcRaw <= 4) ? md2->carryTrim : 1, attr);
|
||||||
if (attr) CHECK_INCDEC_MODELVAR( event, md2->carryTrim, TRIM_ON, TRIM_OFFSET);
|
if (attr) CHECK_INCDEC_MODELVAR( event, md2->carryTrim, TRIM_ON, TRIM_OFFSET);
|
||||||
break;
|
break;
|
||||||
case 5:
|
case MIX_FIELD_CURVE:
|
||||||
lcd_puts(2*FW, y, STR_CURVES);
|
lcd_puts(2*FW, y, STR_CURVES);
|
||||||
putsCurve(FW*10, y, md2->curve, attr);
|
putsCurve(FW*10, y, md2->curve, attr);
|
||||||
if(attr) CHECK_INCDEC_MODELVAR( event, md2->curve, -MAX_CURVE5-MAX_CURVE9, MAX_CURVE5+MAX_CURVE9+7-1);
|
if(attr) CHECK_INCDEC_MODELVAR( event, md2->curve, -MAX_CURVE5-MAX_CURVE9, MAX_CURVE5+MAX_CURVE9+7-1);
|
||||||
@@ -1267,17 +1316,19 @@ void menuProcMixOne(uint8_t event)
|
|||||||
pushMenu(menuProcCurveOne);
|
pushMenu(menuProcCurveOne);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 6:
|
case MIX_FIELD_SWITCH:
|
||||||
lcd_puts( 2*FW,y,STR_SWITCH);
|
lcd_puts( 2*FW,y,STR_SWITCH);
|
||||||
putsSwitches(10*FW, y,md2->swtch,attr);
|
putsSwitches(10*FW, y,md2->swtch,attr);
|
||||||
if(attr) CHECK_INCDEC_MODELVAR( event, md2->swtch, -MAX_SWITCH, MAX_SWITCH);
|
if(attr) CHECK_INCDEC_MODELVAR( event, md2->swtch, -MAX_SWITCH, MAX_SWITCH);
|
||||||
break;
|
break;
|
||||||
case 7:
|
#ifdef FLIGHT_PHASES
|
||||||
|
case MIX_FIELD_FLIGHT_PHASE:
|
||||||
lcd_puts( 2*FW,y,STR_FPHASE);
|
lcd_puts( 2*FW,y,STR_FPHASE);
|
||||||
putsFlightPhase(10*FW, y, md2->phase, attr);
|
putsFlightPhase(10*FW, y, md2->phase, attr);
|
||||||
if(attr) CHECK_INCDEC_MODELVAR( event, md2->phase, -MAX_PHASES, MAX_PHASES);
|
if(attr) CHECK_INCDEC_MODELVAR( event, md2->phase, -MAX_PHASES, MAX_PHASES);
|
||||||
break;
|
break;
|
||||||
case 8:
|
#endif
|
||||||
|
case MIX_FIELD_WARNING:
|
||||||
lcd_puts( 2*FW,y,STR_WARNING);
|
lcd_puts( 2*FW,y,STR_WARNING);
|
||||||
if(md2->mixWarn)
|
if(md2->mixWarn)
|
||||||
lcd_outdezAtt(FW*10,y,md2->mixWarn,attr|LEFT);
|
lcd_outdezAtt(FW*10,y,md2->mixWarn,attr|LEFT);
|
||||||
@@ -1285,27 +1336,27 @@ void menuProcMixOne(uint8_t event)
|
|||||||
lcd_putsAtt(FW*10, y, STR_OFF, attr);
|
lcd_putsAtt(FW*10, y, STR_OFF, attr);
|
||||||
if(attr) CHECK_INCDEC_MODELVAR( event, md2->mixWarn, 0,3);
|
if(attr) CHECK_INCDEC_MODELVAR( event, md2->mixWarn, 0,3);
|
||||||
break;
|
break;
|
||||||
case 9:
|
case MIX_FIELD_MLTPX:
|
||||||
lcd_puts( 2*FW,y,STR_MULTPX);
|
lcd_puts( 2*FW,y,STR_MULTPX);
|
||||||
lcd_putsiAtt(10*FW, y, STR_VMLTPX, md2->mltpx, attr);
|
lcd_putsiAtt(10*FW, y, STR_VMLTPX, md2->mltpx, attr);
|
||||||
if(attr) CHECK_INCDEC_MODELVAR( event, md2->mltpx, 0, 2);
|
if(attr) CHECK_INCDEC_MODELVAR( event, md2->mltpx, 0, 2);
|
||||||
break;
|
break;
|
||||||
case 10:
|
case MIX_FIELD_DELAY_DOWN:
|
||||||
lcd_puts( 2*FW,y,STR_DELAYDOWN);
|
lcd_puts( 2*FW,y,STR_DELAYDOWN);
|
||||||
lcd_outdezAtt(FW*16,y,md2->delayDown,attr);
|
lcd_outdezAtt(FW*16,y,md2->delayDown,attr);
|
||||||
if(attr) CHECK_INCDEC_MODELVAR( event, md2->delayDown, 0,15);
|
if(attr) CHECK_INCDEC_MODELVAR( event, md2->delayDown, 0,15);
|
||||||
break;
|
break;
|
||||||
case 11:
|
case MIX_FIELD_DELAY_UP:
|
||||||
lcd_puts( 2*FW,y,STR_DELAYUP);
|
lcd_puts( 2*FW,y,STR_DELAYUP);
|
||||||
lcd_outdezAtt(FW*16,y,md2->delayUp,attr);
|
lcd_outdezAtt(FW*16,y,md2->delayUp,attr);
|
||||||
if(attr) CHECK_INCDEC_MODELVAR( event, md2->delayUp, 0,15);
|
if(attr) CHECK_INCDEC_MODELVAR( event, md2->delayUp, 0,15);
|
||||||
break;
|
break;
|
||||||
case 12:
|
case MIX_FIELD_SLOW_DOWN:
|
||||||
lcd_puts( 2*FW,y,STR_SLOWDOWN);
|
lcd_puts( 2*FW,y,STR_SLOWDOWN);
|
||||||
lcd_outdezAtt(FW*16,y,md2->speedDown,attr);
|
lcd_outdezAtt(FW*16,y,md2->speedDown,attr);
|
||||||
if(attr) CHECK_INCDEC_MODELVAR( event, md2->speedDown, 0,15);
|
if(attr) CHECK_INCDEC_MODELVAR( event, md2->speedDown, 0,15);
|
||||||
break;
|
break;
|
||||||
case 13:
|
case MIX_FIELD_SLOW_UP:
|
||||||
lcd_puts( 2*FW,y,STR_SLOWUP);
|
lcd_puts( 2*FW,y,STR_SLOWUP);
|
||||||
lcd_outdezAtt(FW*16,y,md2->speedUp,attr);
|
lcd_outdezAtt(FW*16,y,md2->speedUp,attr);
|
||||||
if(attr) CHECK_INCDEC_MODELVAR( event, md2->speedUp, 0,15);
|
if(attr) CHECK_INCDEC_MODELVAR( event, md2->speedUp, 0,15);
|
||||||
@@ -1342,8 +1393,10 @@ inline void displayMixerLine(uint8_t row, uint8_t mix, uint8_t ch, uint8_t idx,
|
|||||||
cs = (cs =='S' ? '*' : 'D');
|
cs = (cs =='S' ? '*' : 'D');
|
||||||
lcd_putcAtt(18*FW+7, y, cs, 0);
|
lcd_putcAtt(18*FW+7, y, cs, 0);
|
||||||
|
|
||||||
|
#ifdef FLIGHT_PHASES
|
||||||
if (md->phase)
|
if (md->phase)
|
||||||
putsFlightPhase(20*FW+2, y, md->phase, CONDENSED);
|
putsFlightPhase(20*FW+2, y, md->phase, CONDENSED);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (s_copyMode) {
|
if (s_copyMode) {
|
||||||
if ((s_copyMode==COPY_MODE || s_copyTgtOfs == 0) && s_copySrcCh == ch && mix == (s_copySrcIdx + (s_copyTgtOfs<0))) {
|
if ((s_copyMode==COPY_MODE || s_copyTgtOfs == 0) && s_copySrcCh == ch && mix == (s_copySrcIdx + (s_copyTgtOfs<0))) {
|
||||||
@@ -1368,7 +1421,9 @@ inline void displayExpoLine(uint8_t row, uint8_t expo, uint8_t ch, uint8_t idx,
|
|||||||
if (attr != 0)
|
if (attr != 0)
|
||||||
CHECK_INCDEC_MODELVAR(event, ed->weight, 0, 100);
|
CHECK_INCDEC_MODELVAR(event, ed->weight, 0, 100);
|
||||||
lcd_outdezAtt(9*FW+1, y, ed->expo, 0);
|
lcd_outdezAtt(9*FW+1, y, ed->expo, 0);
|
||||||
|
#ifdef FLIGHT_PHASES
|
||||||
putsFlightPhase(10*FW, y, ed->negPhase ? -ed->phase : +ed->phase);
|
putsFlightPhase(10*FW, y, ed->negPhase ? -ed->phase : +ed->phase);
|
||||||
|
#endif
|
||||||
putsSwitches(13*FW+4, y, ed->swtch, 0); // normal switches
|
putsSwitches(13*FW+4, y, ed->swtch, 0); // normal switches
|
||||||
if (ed->mode!=3) lcd_putc(17*FW, y, ed->mode == 2 ? 126 : 127);//'|' : (stkVal[i] ? '<' : '>'),0);*/
|
if (ed->mode!=3) lcd_putc(17*FW, y, ed->mode == 2 ? 126 : 127);//'|' : (stkVal[i] ? '<' : '>'),0);*/
|
||||||
if (ed->curve) putsCurve(18*FW+2, y, ed->curve+(ed->curve >= CURVE_BASE+4 ? 4 : 0));
|
if (ed->curve) putsCurve(18*FW+2, y, ed->curve+(ed->curve >= CURVE_BASE+4 ? 4 : 0));
|
||||||
|
|||||||
@@ -566,6 +566,7 @@ bool getSwitch(int8_t swtch, bool nc)
|
|||||||
return __getSwitch(swtch);
|
return __getSwitch(swtch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef FLIGHT_PHASES
|
||||||
uint8_t getFlightPhase()
|
uint8_t getFlightPhase()
|
||||||
{
|
{
|
||||||
for (uint8_t i=1; i<MAX_PHASES; i++) {
|
for (uint8_t i=1; i<MAX_PHASES; i++) {
|
||||||
@@ -576,6 +577,7 @@ uint8_t getFlightPhase()
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int16_t getRawTrimValue(uint8_t phase, uint8_t idx)
|
int16_t getRawTrimValue(uint8_t phase, uint8_t idx)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -500,7 +500,12 @@ void per10ms();
|
|||||||
int16_t getValue(uint8_t i);
|
int16_t getValue(uint8_t i);
|
||||||
bool getSwitch(int8_t swtch, bool nc);
|
bool getSwitch(int8_t swtch, bool nc);
|
||||||
|
|
||||||
|
#ifdef FLIGHT_PHASES
|
||||||
extern uint8_t getFlightPhase();
|
extern uint8_t getFlightPhase();
|
||||||
|
#else
|
||||||
|
#define getFlightPhase() 0
|
||||||
|
#endif
|
||||||
|
|
||||||
extern uint8_t getTrimFlightPhase(uint8_t phase, uint8_t idx);
|
extern uint8_t getTrimFlightPhase(uint8_t phase, uint8_t idx);
|
||||||
extern int16_t getRawTrimValue(uint8_t phase, uint8_t idx);
|
extern int16_t getRawTrimValue(uint8_t phase, uint8_t idx);
|
||||||
extern int16_t getTrimValue(uint8_t phase, uint8_t idx);
|
extern int16_t getTrimValue(uint8_t phase, uint8_t idx);
|
||||||
|
|||||||
@@ -56,7 +56,12 @@
|
|||||||
#define TR_CURVMODES "EDIT ""PRSET""A.THR"
|
#define TR_CURVMODES "EDIT ""PRSET""A.THR"
|
||||||
|
|
||||||
#define LEN_EXPLABELS "\006"
|
#define LEN_EXPLABELS "\006"
|
||||||
#define TR_EXPLABELS "Weight""Expo ""Curve ""Phase ""Swtch ""When "" " // TODO remove all the trailing spaces
|
#ifdef FLIGHT_PHASES
|
||||||
|
#define TR_EXPLABEL_FP "Phase "
|
||||||
|
#else
|
||||||
|
#define TR_EXPLABEL_FP
|
||||||
|
#endif
|
||||||
|
#define TR_EXPLABELS "Weight""Expo ""Curve " TR_EXPLABEL_FP "Swtch ""When "" " // TODO remove all the trailing spaces
|
||||||
|
|
||||||
#define LEN_VMLTPX "\010"
|
#define LEN_VMLTPX "\010"
|
||||||
#define TR_VMLTPX "Add ""Multiply""Replace "
|
#define TR_VMLTPX "Add ""Multiply""Replace "
|
||||||
|
|||||||
@@ -56,7 +56,12 @@
|
|||||||
#define TR_CURVMODES "EDIT ""PRSET""A.GAZ"
|
#define TR_CURVMODES "EDIT ""PRSET""A.GAZ"
|
||||||
|
|
||||||
#define LEN_EXPLABELS "\006"
|
#define LEN_EXPLABELS "\006"
|
||||||
#define TR_EXPLABELS "Ratio ""Expo ""Courbe""Phase ""Inter ""Mode "" "
|
#ifdef FLIGHT_PHASES
|
||||||
|
#define TR_EXPLABEL_FP "Phase "
|
||||||
|
#else
|
||||||
|
#define TR_EXPLABEL_FP
|
||||||
|
#endif
|
||||||
|
#define TR_EXPLABELS "Ratio ""Expo ""Courbe" TR_EXPLABEL_FP "Inter ""Mode "" "
|
||||||
|
|
||||||
#define LEN_VMLTPX "\010"
|
#define LEN_VMLTPX "\010"
|
||||||
#define TR_VMLTPX "Ajouter ""Multiply""Remplace"
|
#define TR_VMLTPX "Ajouter ""Multiply""Remplace"
|
||||||
@@ -309,7 +314,7 @@
|
|||||||
#define TR_MENUCALIBRATION "CALIBRATION"
|
#define TR_MENUCALIBRATION "CALIBRATION"
|
||||||
#define TR_MENUSERROR "MENUS OVERFLOW"
|
#define TR_MENUSERROR "MENUS OVERFLOW"
|
||||||
#define TR_TRIMS2OFFSETS "Trims => Offsets"
|
#define TR_TRIMS2OFFSETS "Trims => Offsets"
|
||||||
#define TR_MENUMODELSEL "SELMODE"
|
#define TR_MENUMODELSEL "MODELES"
|
||||||
#define TR_MENUSETUP "SETUP"
|
#define TR_MENUSETUP "SETUP"
|
||||||
#define TR_MENUFLIGHTPHASE "PHASE DE VOL"
|
#define TR_MENUFLIGHTPHASE "PHASE DE VOL"
|
||||||
#define TR_MENUFLIGHTPHASES "PHASES DE VOL"
|
#define TR_MENUFLIGHTPHASES "PHASES DE VOL"
|
||||||
|
|||||||
@@ -56,7 +56,12 @@
|
|||||||
#define TR_CURVMODES "EDIT ""PRSET""A.THR"
|
#define TR_CURVMODES "EDIT ""PRSET""A.THR"
|
||||||
|
|
||||||
#define LEN_EXPLABELS "\006"
|
#define LEN_EXPLABELS "\006"
|
||||||
#define TR_EXPLABELS "Vikt ""Expo ""Kurva ""Fas ""Brytar""N\201r "" " // TODO remove all the trailing spaces
|
#ifdef FLIGHT_PHASES
|
||||||
|
#define TR_EXPLABEL_FP "Fas "
|
||||||
|
#else
|
||||||
|
#define TR_EXPLABEL_FP
|
||||||
|
#endif
|
||||||
|
#define TR_EXPLABELS "Vikt ""Expo ""Kurva " TR_EXPLABEL_FP "Brytar""N\201r "" " // TODO remove all the trailing spaces
|
||||||
|
|
||||||
#define LEN_VMLTPX "\010"
|
#define LEN_VMLTPX "\010"
|
||||||
#define TR_VMLTPX "Addera ""F\202rst\201rk""Ers\201tt "
|
#define TR_VMLTPX "Addera ""F\202rst\201rk""Ers\201tt "
|
||||||
|
|||||||
Reference in New Issue
Block a user