Issue 66 fixed: PPM_LIMITS_SYMETRICAL Makefile option added (pls tell me if not the right name)
RSSI Tx and Rx before A1 and A2 Rotary Encoder on ersky9x board A Mix may be defined in many Phases (idea from Romolo, thanks!) Differential is now a Curve (private Curve of a Mix) Issue 56 fixed (native stick as Mix input) EEPROM saving (LimitData structure) Issue 79 fixed (Audio Queue) Trims now working in ersky9x simu
This commit is contained in:
@@ -112,6 +112,10 @@ THR_TRACE = YES
|
||||
# Values = YES, NO
|
||||
PPM_CENTER_ADJUSTABLE = NO
|
||||
|
||||
# PPM symetrical limits
|
||||
# Values = YES, NO
|
||||
PPM_LIMITS_SYMETRICAL = NO
|
||||
|
||||
# Limits display in the LIMITS
|
||||
# Values = PERCENT, US
|
||||
PPM_LIMITS_UNIT = PERCENT
|
||||
@@ -478,6 +482,11 @@ ifeq ($(PPM_CENTER_ADJUSTABLE), YES)
|
||||
CPPDEFS += -DPPM_CENTER_ADJUSTABLE
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(PPM_LIMITS_SYMETRICAL), YES)
|
||||
CPPDEFS += -DPPM_LIMITS_SYMETRICAL
|
||||
endif
|
||||
|
||||
ifeq ($(PPM_LIMITS_UNIT), US)
|
||||
CPPDEFS += -DPPM_LIMITS_UNIT_US
|
||||
endif
|
||||
|
||||
@@ -833,6 +833,7 @@ uint32_t read_trims()
|
||||
trims = 0;
|
||||
|
||||
trima = PIOA->PIO_PDSR;
|
||||
|
||||
// TRIM_LH_DOWN PA7 (PA23)
|
||||
#ifdef REVB
|
||||
if ((trima & 0x00800000) == 0)
|
||||
|
||||
@@ -124,7 +124,7 @@ inline void board_init()
|
||||
TCCR5B = (1 << WGM52) | (3<<CS50); // CTC OCR1A, 16MHz / 64 (4us ticks)
|
||||
TIMSK5 |= (1<<OCIE5A);
|
||||
|
||||
#ifdef EXTRA_ROTARY_ENCODERS
|
||||
#if defined(EXTRA_ROTARY_ENCODERS)
|
||||
//configure uart1 here
|
||||
DDRD &= ~(1 << 2);
|
||||
PORTD &= ~(1 << 2);
|
||||
|
||||
+2
-2
@@ -1222,10 +1222,10 @@ void menuProcFrsky(uint8_t event)
|
||||
uint8_t thresholdX = 0;
|
||||
if (source <= TELEM_TM2)
|
||||
threshold = 0;
|
||||
else if (source <= TELEM_A2)
|
||||
threshold = g_model.frsky.channels[source-TELEM_A1].alarms_value[0];
|
||||
else if (source <= TELEM_RSSI_RX)
|
||||
threshold = getRssiAlarmValue(source-TELEM_RSSI_TX);
|
||||
else if (source <= TELEM_A2)
|
||||
threshold = g_model.frsky.channels[source-TELEM_A1].alarms_value[0];
|
||||
else
|
||||
threshold = convertTelemValue(source, barsThresholds[source-TELEM_ALT]);
|
||||
int16_t barMin = convertTelemValue(source, bmin);
|
||||
|
||||
+1
-1
@@ -633,7 +633,7 @@ void putsTrimMode(uint8_t x, uint8_t y, uint8_t phase, uint8_t idx, uint8_t att)
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(PCBV4)
|
||||
#if defined(ROTARY_ENCODERS)
|
||||
void putsRotaryEncoderMode(uint8_t x, uint8_t y, uint8_t phase, uint8_t idx, uint8_t att)
|
||||
{
|
||||
#if defined(EXTRA_ROTARY_ENCODERS)
|
||||
|
||||
@@ -126,7 +126,7 @@ extern void putsFlightPhase(uint8_t x, uint8_t y, int8_t idx, uint8_t att=0);
|
||||
extern void putsCurve(uint8_t x, uint8_t y, int8_t idx, uint8_t att=0);
|
||||
extern void putsTmrMode(uint8_t x, uint8_t y, int8_t mode, uint8_t att);
|
||||
extern void putsTrimMode(uint8_t x, uint8_t y, uint8_t phase, uint8_t idx, uint8_t att);
|
||||
#if defined(PCBV4)
|
||||
#if defined(ROTARY_ENCODERS)
|
||||
void putsRotaryEncoderMode(uint8_t x, uint8_t y, uint8_t phase, uint8_t idx, uint8_t att);
|
||||
#endif
|
||||
|
||||
|
||||
+2
-2
@@ -316,7 +316,7 @@ void menuMainView(uint8_t event)
|
||||
}
|
||||
}
|
||||
else {
|
||||
#if defined(PCBV4)
|
||||
#if defined(ROTARY_ENCODERS)
|
||||
for (uint8_t i=0; i<NUM_ROTARY_ENCODERS; i++) {
|
||||
int16_t val = getRotaryEncoder(i);
|
||||
int8_t len = limit((int16_t)0, (int16_t)(((val+1024) * BAR_HEIGHT) / 2048), (int16_t)BAR_HEIGHT);
|
||||
@@ -328,7 +328,7 @@ void menuMainView(uint8_t event)
|
||||
V_BAR(SCREEN_WIDTH/2-3+V_BAR_W*i, SCREEN_HEIGHT-8, len)
|
||||
#endif //EXTRA_ROTARY_ENCODERS
|
||||
}
|
||||
#endif //PCBV4
|
||||
#endif // ROTARY_ENCODERS
|
||||
#if defined(PCBARM)
|
||||
for (uint8_t i=0; i<NUM_CSW; i++) {
|
||||
int8_t len = getSwitch(10+i, 0) ? BAR_HEIGHT : 1;
|
||||
|
||||
@@ -178,6 +178,10 @@ if (!check_simple(event,menu,tab,DIM(tab),(lines_count)-1)) return;
|
||||
SIMPLE_MENU_NOTITLE(tab, menu, lines_count); \
|
||||
TITLE(title)
|
||||
|
||||
#define SUBMENU_NOTITLE(lines_count, ...) \
|
||||
static const pm_uint8_t mstate_tab[] PROGMEM = __VA_ARGS__; \
|
||||
if (!check(event,0,NULL,0,mstate_tab,DIM(mstate_tab)-1,(lines_count)-1)) return;
|
||||
|
||||
#define SUBMENU(title, lines_count, ...) \
|
||||
static const pm_uint8_t mstate_tab[] PROGMEM = __VA_ARGS__; \
|
||||
if (!check(event,0,NULL,0,mstate_tab,DIM(mstate_tab)-1,(lines_count)-1)) return; \
|
||||
|
||||
+132
-54
@@ -865,7 +865,7 @@ void menuProcPhaseOne(uint8_t event)
|
||||
}
|
||||
}
|
||||
}
|
||||
#if defined(PCBV4)
|
||||
#if defined(ROTARY_ENCODERS)
|
||||
for (uint8_t t=0; t<NUM_ROTARY_ENCODERS; t++) {
|
||||
putsRotaryEncoderMode(PHASES_EDIT_2ND_COLUMN+((4+t)*FW)+2, y, s_currIdx, t, (attr && m_posHorz==4+t) ? ((s_editMode>0) ? BLINK|INVERS : INVERS) : 0);
|
||||
if (attr && m_posHorz==4+t && ((s_editMode>0) || p1valdiff)) {
|
||||
@@ -896,7 +896,7 @@ void menuProcPhaseOne(uint8_t event)
|
||||
#endif
|
||||
break;
|
||||
case 3:
|
||||
lcd_putsLeft( y, STR_FADEIN);
|
||||
lcd_putsLeft(y, STR_FADEIN);
|
||||
lcd_outdezAtt(PHASES_EDIT_2ND_COLUMN, y, phase->fadeIn*5, attr|PREC1|LEFT);
|
||||
if(attr) CHECK_INCDEC_MODELVAR(event, phase->fadeIn, 0, 15);
|
||||
break;
|
||||
@@ -952,7 +952,7 @@ void menuProcPhasesAll(uint8_t event)
|
||||
#else //EXTRA_ROTARY_ENCODERS
|
||||
putsFlightPhase(0, y, i+1, att|(getFlightPhase()==i ? BOLD : 0));
|
||||
#endif //EXTRA_ROTARY_ENCODERS
|
||||
#if defined PCBV4
|
||||
#if defined(ROTARY_ENCODERS)
|
||||
#if defined(EXTRA_ROTARY_ENCODERS)
|
||||
#define NAME_OFS (-4-12)
|
||||
#define SWITCH_OFS (-FW/2-2-13)
|
||||
@@ -1337,6 +1337,7 @@ void insertExpoMix(uint8_t expo, uint8_t idx)
|
||||
MixData *mix = mixaddress(idx);
|
||||
memmove(mix+1, mix, (MAX_MIXERS-(idx+1))*sizeof(MixData));
|
||||
memclear(mix, sizeof(MixData));
|
||||
mix->phases = 1 << getFlightPhase();
|
||||
mix->destCh = s_currCh-1;
|
||||
mix->srcRaw = (s_currCh > 4 ? s_currCh : channel_order(s_currCh));
|
||||
mix->weight = 100;
|
||||
@@ -1565,7 +1566,6 @@ enum MixFields {
|
||||
#endif
|
||||
MIX_FIELD_SOURCE,
|
||||
MIX_FIELD_WEIGHT,
|
||||
MIX_FIELD_DIFFERENTIAL,
|
||||
MIX_FIELD_OFFSET,
|
||||
MIX_FIELD_TRIM,
|
||||
#if defined(CURVES)
|
||||
@@ -1596,7 +1596,7 @@ void menuProcMixOne(uint8_t event)
|
||||
TITLEP(s_currCh ? STR_INSERTMIX : STR_EDITMIX);
|
||||
MixData *md2 = mixaddress(s_currIdx) ;
|
||||
putsChn(lcdLastPos+1*FW,0,md2->destCh+1,0);
|
||||
SIMPLE_SUBMENU_NOTITLE(MIX_FIELD_COUNT);
|
||||
SUBMENU_NOTITLE(MIX_FIELD_COUNT, {0, 0, 0, 1, 1, 0, MAX_PHASES-1, 0 /*, ...*/});
|
||||
|
||||
int8_t sub = m_posVert;
|
||||
|
||||
@@ -1621,12 +1621,6 @@ void menuProcMixOne(uint8_t event)
|
||||
lcd_outdezAtt(MIXES_2ND_COLUMN, y, md2->weight, attr|LEFT|INFLIGHT(md2->weight));
|
||||
if (attr) CHECK_INFLIGHT_INCDEC_MODELVAR(event, md2->weight, -125, 125, 0, STR_MIXERWEIGHT);
|
||||
break;
|
||||
case MIX_FIELD_DIFFERENTIAL:
|
||||
// TODO INFLIGHT
|
||||
lcd_putsLeft(y, STR_DIFFERENTIAL);
|
||||
lcd_outdezAtt(MIXES_2ND_COLUMN, y, md2->differential*2, attr|LEFT);
|
||||
if (attr) CHECK_INCDEC_MODELVAR(event, md2->differential, -50, 50);
|
||||
break;
|
||||
case MIX_FIELD_OFFSET:
|
||||
lcd_putsLeft(y, STR_OFFSET);
|
||||
lcd_outdezAtt(MIXES_2ND_COLUMN, y, md2->sOffset, attr|LEFT|INFLIGHT(md2->sOffset));
|
||||
@@ -1637,31 +1631,74 @@ void menuProcMixOne(uint8_t event)
|
||||
uint8_t not_stick = (md2->srcRaw > NUM_STICKS);
|
||||
int8_t carryTrim = -md2->carryTrim;
|
||||
lcd_putsLeft(y, STR_TRIM);
|
||||
lcd_putsiAtt(MIXES_2ND_COLUMN, y, STR_VMIXTRIMS, (not_stick && carryTrim == 0) ? 0 : carryTrim+1, attr);
|
||||
if (attr) md2->carryTrim = -checkIncDecModel(event, carryTrim, not_stick ? TRIM_ON : -TRIM_OFF, -TRIM_AIL);
|
||||
lcd_putsiAtt(MIXES_2ND_COLUMN, y, STR_VMIXTRIMS, (not_stick && carryTrim == 0) ? 0 : carryTrim+1, m_posHorz==0 ? attr : 0);
|
||||
if (attr && m_posHorz==0 && (not_stick || s_editMode>0)) md2->carryTrim = -checkIncDecModel(event, carryTrim, not_stick ? TRIM_ON : -TRIM_OFF, -TRIM_AIL);
|
||||
if (!not_stick) {
|
||||
menu_lcd_onoff(MIXES_2ND_COLUMN+4*FW, y, !md2->noExpo, m_posHorz==1 ? attr : 0);
|
||||
if (attr && m_posHorz==1 && s_editMode>0) md2->noExpo = !checkIncDecModel(event, !md2->noExpo, 0, 1);
|
||||
}
|
||||
else if (attr) {
|
||||
m_posHorz = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
#if defined(CURVES)
|
||||
case MIX_FIELD_CURVE:
|
||||
lcd_putsLeft(y, STR_CURVES);
|
||||
putsCurve(MIXES_2ND_COLUMN, y, md2->curve, attr);
|
||||
if(attr) CHECK_INCDEC_MODELVAR( event, md2->curve, -MAX_CURVES, MAX_CURVES+7-1);
|
||||
if(attr && event==EVT_KEY_FIRST(KEY_MENU) && (md2->curve<0 || md2->curve>=CURVE_BASE)){
|
||||
s_curveChan = (md2->curve<0 ? -md2->curve-1 : md2->curve-CURVE_BASE);
|
||||
pushMenu(menuProcCurveOne);
|
||||
lcd_putsLeft(y, STR_CURVE);
|
||||
|
||||
if (attr) {
|
||||
if (md2->curveMode==MODE_CURVE) {
|
||||
CHECK_INCDEC_MODELVAR(event, md2->curveParam, -MAX_CURVES, CURVE_BASE+MAX_CURVES);
|
||||
if (md2->curveParam == CURVE_BASE+MAX_CURVES) {
|
||||
md2->curveMode = MODE_DIFFERENTIAL;
|
||||
md2->curveParam = 0;
|
||||
}
|
||||
if (event==EVT_KEY_FIRST(KEY_MENU) && md2->curveMode==MODE_CURVE && (md2->curveParam<0 || md2->curveParam>=CURVE_BASE)){
|
||||
s_curveChan = (md2->curveParam<0 ? -md2->curveParam-1 : md2->curveParam-CURVE_BASE);
|
||||
pushMenu(menuProcCurveOne);
|
||||
}
|
||||
m_posHorz = 0;
|
||||
if (s_editMode > 0) s_editMode = 0;
|
||||
}
|
||||
else if (s_editMode>0) {
|
||||
if (m_posHorz==0) {
|
||||
CHECK_INCDEC_MODELVAR(event, md2->curveMode, -1, 1);
|
||||
if (md2->curveMode == MODE_CURVE)
|
||||
md2->curveParam = CURVE_BASE+MAX_CURVES-1;
|
||||
}
|
||||
else {
|
||||
CHECK_INCDEC_MODELVAR(event, md2->curveParam, -100, 100);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (md2->curveMode == MODE_CURVE) {
|
||||
putsCurve(MIXES_2ND_COLUMN, y, md2->curveParam, attr);
|
||||
}
|
||||
else {
|
||||
lcd_putsAtt(MIXES_2ND_COLUMN, y, PSTR("Diff"), m_posHorz==0 ? attr : 0);
|
||||
lcd_outdezAtt(MIXES_2ND_COLUMN+5*FW, y, md2->curveParam, LEFT|(m_posHorz==1 ? attr : 0));
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
case MIX_FIELD_SWITCH:
|
||||
lcd_putsLeft(y, STR_SWITCH);
|
||||
putsSwitches(MIXES_2ND_COLUMN, y,md2->swtch,attr);
|
||||
putsSwitches(MIXES_2ND_COLUMN, y, md2->swtch, attr);
|
||||
if(attr) CHECK_INCDEC_MODELSWITCH( event, md2->swtch, -MAX_SWITCH, MAX_SWITCH);
|
||||
break;
|
||||
#if defined(FLIGHT_PHASES)
|
||||
case MIX_FIELD_FLIGHT_PHASE:
|
||||
lcd_putsLeft(y, STR_FPHASE);
|
||||
putsFlightPhase(MIXES_2ND_COLUMN, y, md2->phase, attr);
|
||||
if(attr) CHECK_INCDEC_MODELVAR( event, md2->phase, -MAX_PHASES, MAX_PHASES);
|
||||
for (uint8_t p=0; p<MAX_PHASES; p++)
|
||||
lcd_putcAtt(MIXES_2ND_COLUMN+p*FW, y, '0'+p, ((m_posHorz==p) && attr) ? BLINK|INVERS : ((md2->phases & (1<<p)) ? INVERS : 0 ));
|
||||
if (attr) {
|
||||
if ((event==EVT_KEY_FIRST(KEY_MENU)) || p1valdiff) {
|
||||
killEvents(event);
|
||||
s_editMode = 0;
|
||||
md2->phases ^= (1<<m_posHorz);
|
||||
STORE_MODELVARS;
|
||||
}
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
case MIX_FIELD_WARNING:
|
||||
@@ -1933,20 +1970,20 @@ void menuProcExpoMix(uint8_t expo, uint8_t _event_)
|
||||
else
|
||||
#endif
|
||||
{
|
||||
if (md->curve) putsCurve(12*FW+2, y, md->curve);
|
||||
if (md->swtch) putsSwitches(15*FW+5, y, md->swtch);
|
||||
if (md->curveParam) {
|
||||
if (md->curveMode == MODE_CURVE)
|
||||
putsCurve(12*FW+2, y, md->curveParam);
|
||||
else
|
||||
lcd_outdez8(15*FW+2, y, md->curveParam);
|
||||
}
|
||||
if (md->swtch) putsSwitches(16*FW, y, md->swtch);
|
||||
|
||||
char cs = ' ';
|
||||
if (md->speedDown || md->speedUp)
|
||||
cs = 'S';
|
||||
if ((md->delayUp || md->delayDown))
|
||||
cs = (cs =='S' ? '*' : 'D');
|
||||
lcd_putcAtt(18*FW+7, y, cs, 0);
|
||||
|
||||
#ifdef FLIGHT_PHASES
|
||||
if (md->phase)
|
||||
putsFlightPhase(20*FW+2, y, md->phase, CONDENSED);
|
||||
#endif
|
||||
lcd_putcAtt(19*FW+7, y, cs, 0);
|
||||
}
|
||||
}
|
||||
if (s_copyMode) {
|
||||
@@ -2015,26 +2052,60 @@ bool thrOutput(uint8_t ch)
|
||||
return false;
|
||||
}
|
||||
|
||||
void menuProcLimits(uint8_t _event)
|
||||
{
|
||||
enum LimitsItems {
|
||||
ITEM_LIMITS_OFFSET,
|
||||
ITEM_LIMITS_MIN,
|
||||
ITEM_LIMITS_MAX,
|
||||
ITEM_LIMITS_DIRECTION,
|
||||
#ifdef PPM_CENTER_ADJUSTABLE
|
||||
#define LIMITS_ITEMS_COUNT 4
|
||||
ITEM_LIMITS_PPM_CENTER,
|
||||
#endif
|
||||
#ifdef PPM_LIMITS_SYMETRICAL
|
||||
ITEM_LIMITS_SYMETRICAL,
|
||||
#endif
|
||||
ITEM_LIMITS_COUNT,
|
||||
ITEM_LIMITS_MAXROW = ITEM_LIMITS_COUNT-1
|
||||
};
|
||||
|
||||
#ifdef PPM_LIMITS_SYMETRICAL
|
||||
#ifdef PPM_CENTER_ADJUSTABLE
|
||||
#define LIMITS_MAX_POS 15*FW
|
||||
#define LIMITS_REVERT_POS 16*FW-3
|
||||
#define LIMITS_PPM_CENTER_POS 20*FW+1
|
||||
#else
|
||||
#define LIMITS_ITEMS_COUNT 3
|
||||
#define LIMITS_MAX_POS 16*FW+4
|
||||
#define LIMITS_REVERT_POS 17*FW
|
||||
#define LIMITS_DIRECTION_POS 12*FW+4
|
||||
#endif
|
||||
#else
|
||||
#ifdef PPM_CENTER_ADJUSTABLE
|
||||
#define LIMITS_MAX_POS 16*FW
|
||||
#define LIMITS_REVERT_POS 17*FW-2
|
||||
#define LIMITS_PPM_CENTER_POS 21*FW+2
|
||||
#else
|
||||
#define LIMITS_MAX_POS 17*FW
|
||||
#define LIMITS_REVERT_POS 18*FW
|
||||
#define LIMITS_DIRECTION_POS 12*FW+5
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
void menuProcLimits(uint8_t _event)
|
||||
{
|
||||
uint8_t event = (s_warning ? 0 : _event);
|
||||
|
||||
MENU(STR_MENULIMITS, menuTabModel, e_Limits, 1+NUM_CHNOUT+1, {0, LIMITS_ITEMS_COUNT, LIMITS_ITEMS_COUNT, LIMITS_ITEMS_COUNT, LIMITS_ITEMS_COUNT, LIMITS_ITEMS_COUNT, LIMITS_ITEMS_COUNT, LIMITS_ITEMS_COUNT, LIMITS_ITEMS_COUNT, LIMITS_ITEMS_COUNT, LIMITS_ITEMS_COUNT, LIMITS_ITEMS_COUNT, LIMITS_ITEMS_COUNT, LIMITS_ITEMS_COUNT, LIMITS_ITEMS_COUNT, LIMITS_ITEMS_COUNT, LIMITS_ITEMS_COUNT, 0});
|
||||
MENU(STR_MENULIMITS, menuTabModel, e_Limits, 1+NUM_CHNOUT+1, {0, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, 0});
|
||||
|
||||
uint8_t sub = m_posVert - 1;
|
||||
|
||||
#ifdef PPM_CENTER_ADJUSTABLE
|
||||
if (sub < NUM_CHNOUT) {
|
||||
lcd_outdezAtt(12*FW, 0, PPM_CENTER+g_model.servoCenter[sub]+g_chans512[sub]/2, 0);
|
||||
#ifdef PPM_CENTER_ADJUSTABLE
|
||||
lcd_outdezAtt(12*FW, 0, PPM_CENTER+limitaddress(sub)->ppmCenter+g_chans512[sub]/2, 0);
|
||||
lcd_puts(12*FW, 0, STR_US);
|
||||
}
|
||||
#else
|
||||
lcd_outdezAtt(12*FW, 0, (g_chans512[sub] * 25) / 256, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (s_confirmation) {
|
||||
LimitData *ld = limitaddress(sub);
|
||||
@@ -2067,29 +2138,27 @@ void menuProcLimits(uint8_t _event)
|
||||
LimitData *ld = limitaddress(k) ;
|
||||
|
||||
#ifdef PPM_CENTER_ADJUSTABLE
|
||||
#define LIMITS_MAX_POS 16*FW
|
||||
int8_t limit = ((g_model.extendedLimits && !g_model.servoCenter[k]) ? 125 : 100);
|
||||
int8_t limit = ((g_model.extendedLimits && !limitaddress(k)->ppmCenter) ? 125 : 100);
|
||||
#else
|
||||
#define LIMITS_MAX_POS 17*FW
|
||||
int16_t v = (ld->revert) ? -ld->offset : ld->offset;
|
||||
|
||||
char swVal = '-'; // '-', '<', '>'
|
||||
if((g_chans512[k] - v) > 50) swVal = (ld->revert ? 127 : 126); // Switch to raw inputs? - remove trim!
|
||||
if((g_chans512[k] - v) < -50) swVal = (ld->revert ? 126 : 127);
|
||||
putsChn(0, y, k+1, 0);
|
||||
lcd_putcAtt(12*FW+5, y, swVal, 0);
|
||||
lcd_putcAtt(LIMITS_DIRECTION_POS, y, swVal, 0);
|
||||
|
||||
int8_t limit = (g_model.extendedLimits ? 125 : 100);
|
||||
#endif
|
||||
|
||||
putsChn(0, y, k+1, 0);
|
||||
|
||||
for (uint8_t j=0; j<=LIMITS_ITEMS_COUNT; j++) {
|
||||
for (uint8_t j=0; j<ITEM_LIMITS_COUNT; j++) {
|
||||
uint8_t attr = ((sub==k && m_posHorz==j) ? ((s_editMode>0) ? BLINK|INVERS : INVERS) : 0);
|
||||
uint8_t active = (attr && (s_editMode>0 || p1valdiff)) ;
|
||||
switch(j)
|
||||
{
|
||||
case 0:
|
||||
case ITEM_LIMITS_OFFSET:
|
||||
#ifdef PPM_LIMITS_UNIT_US
|
||||
lcd_outdezAtt( 8*FW, y, ((int32_t)ld->offset*128) / 25, attr|PREC1);
|
||||
#else
|
||||
@@ -2125,7 +2194,7 @@ void menuProcLimits(uint8_t _event)
|
||||
STORE_MODELVARS;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
case ITEM_LIMITS_MIN:
|
||||
#ifdef PPM_LIMITS_UNIT_US
|
||||
lcd_outdezAtt(12*FW+1, y, (((int16_t)ld->min-100)*128) / 25, attr | INFLIGHT(ld->min));
|
||||
#else
|
||||
@@ -2135,7 +2204,7 @@ void menuProcLimits(uint8_t _event)
|
||||
CHECK_INFLIGHT_INCDEC_MODELVAR(event, ld->min, -limit, 25, +100, STR_MINLIMIT);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
case ITEM_LIMITS_MAX:
|
||||
#ifdef PPM_LIMITS_UNIT_US
|
||||
lcd_outdezAtt(LIMITS_MAX_POS, y, (((int16_t)ld->max+100)*128) / 25, attr | INFLIGHT(ld->max));
|
||||
#else
|
||||
@@ -2145,11 +2214,11 @@ void menuProcLimits(uint8_t _event)
|
||||
CHECK_INFLIGHT_INCDEC_MODELVAR(event, ld->max, -25, limit, -100, STR_MAXLIMIT);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
case ITEM_LIMITS_DIRECTION:
|
||||
#ifdef PPM_CENTER_ADJUSTABLE
|
||||
lcd_putcAtt(17*FW-2, y, ld->revert ? 127 : 126, attr);
|
||||
lcd_putcAtt(LIMITS_REVERT_POS, y, ld->revert ? 127 : 126, attr);
|
||||
#else
|
||||
lcd_putsiAtt(18*FW, y, STR_MMMINV, ld->revert, attr);
|
||||
lcd_putsiAtt(LIMITS_REVERT_POS, y, STR_MMMINV, ld->revert, attr);
|
||||
#endif
|
||||
if (active) {
|
||||
bool revert_new = checkIncDecModel(event, ld->revert, 0, 1);
|
||||
@@ -2163,13 +2232,22 @@ void menuProcLimits(uint8_t _event)
|
||||
}
|
||||
break;
|
||||
#ifdef PPM_CENTER_ADJUSTABLE
|
||||
case 4:
|
||||
lcd_outdezAtt(21*FW+2, y, PPM_CENTER+g_model.servoCenter[k], attr);
|
||||
case ITEM_LIMITS_PPM_CENTER:
|
||||
lcd_outdezAtt(LIMITS_PPM_CENTER_POS, y, PPM_CENTER+ld->ppmCenter, attr);
|
||||
if (active && ld->max <= 0 && ld->min >= 0) {
|
||||
CHECK_INCDEC_MODELVAR(event, g_model.servoCenter[k], -125, +125);
|
||||
CHECK_INCDEC_MODELVAR(event, ld->ppmCenter, -125, +125);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
#ifdef PPM_LIMITS_SYMETRICAL
|
||||
case ITEM_LIMITS_SYMETRICAL:
|
||||
lcd_putcAtt(20*FW+2, y, ld->symetrical ? '=' : '^', attr);
|
||||
if (active) {
|
||||
CHECK_INCDEC_MODELVAR(event, ld->symetrical, 0, 1);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2631,9 +2709,9 @@ void menuProcFunctionSwitches(uint8_t event)
|
||||
case 3:
|
||||
if (sd->swtch && sd->func <= FUNC_INSTANT_TRIM) {
|
||||
#if defined(GRAPHICS)
|
||||
menu_lcd_onoff(20*FW, y, sd->delay, attr ) ;
|
||||
menu_lcd_onoff(20*FW, y, sd->delay, attr);
|
||||
#else
|
||||
menu_lcd_onoff(18*FW+2, y, sd->delay, attr ) ;
|
||||
menu_lcd_onoff(18*FW+2, y, sd->delay, attr) ;
|
||||
#endif
|
||||
if (active) CHECK_INCDEC_MODELVAR(event, sd->delay, 0, 1);
|
||||
}
|
||||
|
||||
+46
-33
@@ -49,11 +49,11 @@
|
||||
#define BEEP_VAL ( (g_eeGeneral.warnOpts & WARN_BVAL_BIT) >>3 )
|
||||
|
||||
#if defined(PCBARM)
|
||||
#define EEPROM_VER 211
|
||||
#define EEPROM_VER 212
|
||||
#elif defined(PCBV4)
|
||||
#define EEPROM_VER 210
|
||||
#define EEPROM_VER 211
|
||||
#else
|
||||
#define EEPROM_VER 210
|
||||
#define EEPROM_VER 211
|
||||
#endif
|
||||
|
||||
#ifndef PACK
|
||||
@@ -192,8 +192,10 @@ PACK(typedef struct t_ExpoData {
|
||||
PACK(typedef struct t_LimitData {
|
||||
int8_t min;
|
||||
int8_t max;
|
||||
bool revert;
|
||||
int16_t offset;
|
||||
int8_t ppmCenter;
|
||||
int16_t offset:14;
|
||||
uint8_t symetrical:1;
|
||||
uint8_t revert:1;
|
||||
}) LimitData;
|
||||
|
||||
enum MixSources {
|
||||
@@ -204,7 +206,9 @@ enum MixSources {
|
||||
MIXSRC_P1,
|
||||
MIXSRC_P2,
|
||||
MIXSRC_P3,
|
||||
#if defined(PCBV4)
|
||||
#if defined(PCBARM)
|
||||
MIXSRC_REa,
|
||||
#elif defined(PCBV4)
|
||||
MIXSRC_REa,
|
||||
MIXSRC_REb,
|
||||
#if defined(EXTRA_ROTARY_ENCODERS)
|
||||
@@ -255,46 +259,52 @@ enum MixSources {
|
||||
#define MLTPX_MUL 1
|
||||
#define MLTPX_REP 2
|
||||
|
||||
#define MODE_CURVE 0
|
||||
#define MODE_DIFFERENTIAL 1
|
||||
|
||||
#if defined(PCBARM)
|
||||
#define MAX_DELAY 60 /* 30 seconds */
|
||||
#define MAX_SLOW 60 /* 30 seconds */
|
||||
PACK(typedef struct t_MixData {
|
||||
uint8_t destCh;
|
||||
int8_t phase;
|
||||
uint8_t destCh;
|
||||
uint16_t phases;
|
||||
uint8_t curveMode:1; // O=curve, 1=differential
|
||||
uint8_t noExpo:1;
|
||||
int8_t carryTrim:3;
|
||||
uint8_t mltpx:2; // multiplex method: 0 means +=, 1 means *=, 2 means :=
|
||||
uint8_t spare:1;
|
||||
int8_t weight;
|
||||
int8_t swtch;
|
||||
uint8_t mltpx; // multiplex method: 0 means +=, 1 means *=, 2 means :=
|
||||
int8_t curve;
|
||||
int8_t curveParam;
|
||||
uint8_t mixWarn; // mixer warning
|
||||
uint8_t delayUp;
|
||||
uint8_t delayDown;
|
||||
uint8_t speedUp; // Servogeschwindigkeit aus Tabelle (10ms Cycle)
|
||||
uint8_t speedDown; // 0 nichts
|
||||
uint8_t srcRaw; //
|
||||
int8_t differential;
|
||||
int8_t carryTrim;
|
||||
uint8_t speedUp;
|
||||
uint8_t speedDown;
|
||||
uint8_t srcRaw;
|
||||
int8_t sOffset;
|
||||
char name[6];
|
||||
uint8_t spare[4];
|
||||
}) MixData;
|
||||
#else
|
||||
#define MAX_DELAY 15 /* 7.5 seconds */
|
||||
#define MAX_SLOW 15 /* 7.5 seconds */
|
||||
PACK(typedef struct t_MixData {
|
||||
uint8_t destCh:4; // 0, 1..NUM_CHNOUT
|
||||
int8_t phase:4; // -5=!FP4, 0=normal, 5=FP4
|
||||
uint8_t curveMode:1; // O=curve, 1=differential
|
||||
uint8_t noExpo:1;
|
||||
uint8_t spare:2;
|
||||
int8_t weight;
|
||||
int8_t swtch:6;
|
||||
uint8_t mltpx:2; // multiplex method: 0 means +=, 1 means *=, 2 means :=
|
||||
int8_t curve:6;
|
||||
uint8_t phases:5;
|
||||
int8_t carryTrim:3;
|
||||
uint8_t srcRaw:6;
|
||||
uint8_t mixWarn:2; // mixer warning
|
||||
uint8_t delayUp:4;
|
||||
uint8_t delayDown:4;
|
||||
uint8_t speedUp:4; // Servogeschwindigkeit aus Tabelle (10ms Cycle)
|
||||
uint8_t speedDown:4; // 0 nichts
|
||||
uint16_t srcRaw:6; //
|
||||
int16_t differential:7;
|
||||
int16_t carryTrim:3;
|
||||
uint8_t speedUp:4;
|
||||
uint8_t speedDown:4;
|
||||
int8_t curveParam;
|
||||
int8_t sOffset;
|
||||
}) MixData;
|
||||
#endif
|
||||
@@ -398,10 +408,10 @@ enum TelemetrySource {
|
||||
TELEM_NONE,
|
||||
TELEM_TM1,
|
||||
TELEM_TM2,
|
||||
TELEM_A1,
|
||||
TELEM_A2,
|
||||
TELEM_RSSI_TX,
|
||||
TELEM_RSSI_RX,
|
||||
TELEM_A1,
|
||||
TELEM_A2,
|
||||
TELEM_ALT,
|
||||
TELEM_RPM,
|
||||
TELEM_FUEL,
|
||||
@@ -543,7 +553,14 @@ PACK(typedef struct t_SwashRingData { // Swash Ring data
|
||||
#define TRIM_MAX 125
|
||||
#define TRIM_MIN (-TRIM_MAX)
|
||||
|
||||
#if defined(PCBV4)
|
||||
#define ROTARY_ENCODER_MAX 1024
|
||||
|
||||
#if defined(PCBARM)
|
||||
#define NUM_ROTARY_ENCODERS_EXTRA 0
|
||||
#define NUM_ROTARY_ENCODERS 1
|
||||
#define ROTARY_ENCODER_ARRAY_EXTRA
|
||||
#define ROTARY_ENCODER_ARRAY int16_t rotaryEncoders[1];
|
||||
#elif defined(PCBV4)
|
||||
#if defined(EXTRA_ROTARY_ENCODERS)
|
||||
#define NUM_ROTARY_ENCODERS_EXTRA 2
|
||||
#define NUM_ROTARY_ENCODERS (2+NUM_ROTARY_ENCODERS_EXTRA)
|
||||
@@ -553,15 +570,13 @@ PACK(typedef struct t_SwashRingData { // Swash Ring data
|
||||
#define NUM_ROTARY_ENCODERS 2
|
||||
#define ROTARY_ENCODER_ARRAY_EXTRA
|
||||
#endif //EXTRA_ROTARY_ENCODERS
|
||||
#define ROTARY_ENCODER_MAX 1024
|
||||
#define ROTARY_ENCODER_ARRAY int16_t rotaryEncoders[2];
|
||||
|
||||
#else //PCBV4
|
||||
#else
|
||||
#define NUM_ROTARY_ENCODERS_EXTRA 0
|
||||
#define NUM_ROTARY_ENCODERS 0
|
||||
#define ROTARY_ENCODER_ARRAY
|
||||
#define ROTARY_ENCODER_ARRAY_EXTRA
|
||||
#endif //PCBV4
|
||||
#endif
|
||||
|
||||
#if defined(PCBSTD)
|
||||
#define TRIM_ARRAY int8_t trim[4]; int8_t trim_ext:8
|
||||
@@ -696,10 +711,8 @@ PACK(typedef struct t_ModelData {
|
||||
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5ms increments
|
||||
uint8_t thrTraceSrc;
|
||||
uint8_t modelId;
|
||||
|
||||
int8_t servoCenter[NUM_CHNOUT];
|
||||
|
||||
uint8_t switchWarningStates;
|
||||
uint8_t switchWarningStates;
|
||||
|
||||
TELEMETRY_DATA;
|
||||
|
||||
|
||||
+58
-74
@@ -31,8 +31,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
// KILRAH: or "#define KILRAH_OFS" for what I think is the right thing we discussed this weekend!
|
||||
|
||||
#if defined(PCBARM) && !defined(SIMU)
|
||||
extern "C" {
|
||||
#include <CoOS.h>
|
||||
@@ -229,6 +227,7 @@ inline void applyDefaultTemplate()
|
||||
md->destCh = i;
|
||||
md->weight = 100;
|
||||
md->srcRaw = channel_order(i+1);
|
||||
md->phases = 1;
|
||||
}
|
||||
|
||||
STORE_MODELVARS;
|
||||
@@ -405,7 +404,7 @@ ACTIVE_EXPOS_TYPE activeExpos;
|
||||
|
||||
void applyExpos(int16_t *anas)
|
||||
{
|
||||
static int16_t anas2[NUM_STICKS]; // values before expo, to ensure same expo base when multiple expo lines are used
|
||||
int16_t anas2[NUM_STICKS]; // values before expo, to ensure same expo base when multiple expo lines are used
|
||||
memcpy(anas2, anas, sizeof(anas2));
|
||||
|
||||
uint8_t phase = s_perout_flight_phase + 1;
|
||||
@@ -480,14 +479,19 @@ int16_t applyLimits(uint8_t channel, int32_t value)
|
||||
if (ofs > lim_p) ofs = lim_p;
|
||||
if (ofs < lim_n) ofs = lim_n;
|
||||
|
||||
#if !defined(KILRAH_OFS)
|
||||
if (value) value =
|
||||
(value > 0) ? value * ((int32_t) lim_p - ofs) / 100000 :
|
||||
-value * ((int32_t) lim_n - ofs) / 100000; //div by 100000 -> output = -1024..1024
|
||||
#if defined(PPM_LIMITS_SYMETRICAL)
|
||||
if (value) {
|
||||
// TODO flash saving
|
||||
if (g_model.limitData[channel].symetrical)
|
||||
value = (value > 0) ? value * ((int32_t) lim_p) / 100000 :
|
||||
-value * ((int32_t) lim_n) / 100000; //div by 100000 -> output = -1024..1024
|
||||
else
|
||||
value = (value > 0) ? value * ((int32_t) lim_p - ofs) / 100000 :
|
||||
-value * ((int32_t) lim_n - ofs) / 100000; //div by 100000 -> output = -1024..1024
|
||||
}
|
||||
#else
|
||||
if (value) value =
|
||||
(value > 0) ? value * ((int32_t) lim_p) / 100000 :
|
||||
-value * ((int32_t) lim_n) / 100000; //div by 100000 -> output = -1024..1024
|
||||
if (value) value = (value > 0) ? value * ((int32_t) lim_p - ofs) / 100000 :
|
||||
-value * ((int32_t) lim_n - ofs) / 100000; //div by 100000 -> output = -1024..1024
|
||||
#endif
|
||||
|
||||
value += calc1000toRESX(ofs);
|
||||
@@ -517,7 +521,7 @@ int16_t getValue(uint8_t i)
|
||||
/*srcRaw is shifted +1!*/
|
||||
|
||||
if(i<NUM_STICKS+NUM_POTS) return calibratedStick[i];
|
||||
#if defined(PCBV4)
|
||||
#if defined(PCBV4) || defined(PCBARM)
|
||||
else if(i<NUM_STICKS+NUM_POTS+NUM_ROTARY_ENCODERS) return getRotaryEncoder(i-(NUM_STICKS+NUM_POTS));
|
||||
#endif
|
||||
else if(i<MIXSRC_TrimAil) return calc1000toRESX((int16_t)8 * getTrimValue(s_perout_flight_phase, i-(NUM_STICKS+NUM_POTS+NUM_ROTARY_ENCODERS)));
|
||||
@@ -534,9 +538,9 @@ int16_t getValue(uint8_t i)
|
||||
else if(i<CSW_CHOUT_BASE+NUM_CHNOUT) return ex_chans[i-CSW_CHOUT_BASE];
|
||||
else if(i<CSW_CHOUT_BASE+NUM_CHNOUT+TELEM_TM2) return s_timerVal[i-CSW_CHOUT_BASE-NUM_CHNOUT];
|
||||
#if defined(FRSKY)
|
||||
else if(i<CSW_CHOUT_BASE+NUM_CHNOUT+TELEM_A2) return frskyData.analog[i-CSW_CHOUT_BASE-NUM_CHNOUT-2].value;
|
||||
else if(i<CSW_CHOUT_BASE+NUM_CHNOUT+TELEM_RSSI_TX) return frskyData.rssi[1].value;
|
||||
else if(i<CSW_CHOUT_BASE+NUM_CHNOUT+TELEM_RSSI_RX) return frskyData.rssi[0].value;
|
||||
else if(i<CSW_CHOUT_BASE+NUM_CHNOUT+TELEM_A2) return frskyData.analog[i-CSW_CHOUT_BASE-NUM_CHNOUT-4].value;
|
||||
#if defined(FRSKY_HUB) || defined(WS_HOW_HIGH)
|
||||
else if(i<CSW_CHOUT_BASE+NUM_CHNOUT+TELEM_ALT) return frskyData.hub.baroAltitude_bp;
|
||||
#endif
|
||||
@@ -855,7 +859,7 @@ uint8_t getTrimFlightPhase(uint8_t phase, uint8_t idx)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(PCBV4) && defined(ROTARY_ENCODERS)
|
||||
#if defined(ROTARY_ENCODERS)
|
||||
uint8_t getRotaryEncoderFlightPhase(uint8_t idx)
|
||||
{
|
||||
uint8_t phase = s_perout_flight_phase;
|
||||
@@ -904,13 +908,6 @@ void incRotaryEncoder(uint8_t idx, int8_t inc)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(PCBARM) && defined(ROTARY_ENCODERS)
|
||||
void incRotaryEncoder(uint8_t idx, int8_t inc)
|
||||
{
|
||||
g_rotenc[idx] += inc;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(FRSKY) || defined(PCBARM)
|
||||
void putsTelemetryValue(uint8_t x, uint8_t y, int16_t val, uint8_t unit, uint8_t att)
|
||||
{
|
||||
@@ -1536,6 +1533,7 @@ uint16_t isqrt32(uint32_t n)
|
||||
|
||||
// static variables used in perOut - moved here so they don't interfere with the stack
|
||||
// It's also easier to initialize them here.
|
||||
int16_t rawAnas [NUM_STICKS] = {0};
|
||||
int16_t anas [NUM_STICKS] = {0};
|
||||
int16_t trims[NUM_STICKS] = {0};
|
||||
int32_t chans[NUM_CHNOUT] = {0};
|
||||
@@ -1641,6 +1639,7 @@ BeepANACenter evalSticks()
|
||||
v = int32_t(v)*g_model.swashR.value*RESX/(int32_t(d)*100);
|
||||
#endif
|
||||
|
||||
rawAnas[ch] = v;
|
||||
anas[ch] = v; //set values for mixer
|
||||
}
|
||||
}
|
||||
@@ -1870,36 +1869,25 @@ void evalFunctions()
|
||||
#endif
|
||||
|
||||
#if defined(PCBARM) && defined(SDCARD)
|
||||
else if (sd->func == FUNC_PLAY_TRACK || sd->func == FUNC_PLAY_VALUE) {
|
||||
if (!audioQueue.busy()) {
|
||||
if (sd->func == FUNC_PLAY_TRACK) {
|
||||
char lfn[] = SOUNDS_PATH "/xxxxxx.wav";
|
||||
strncpy(lfn+sizeof(SOUNDS_PATH), sd->param, sizeof(sd->param));
|
||||
lfn[sizeof(SOUNDS_PATH)+sizeof(sd->param)] = '\0';
|
||||
strcat(lfn+sizeof(SOUNDS_PATH), SOUNDS_EXT);
|
||||
audioQueue.playFile(lfn);
|
||||
}
|
||||
else {
|
||||
playValue(FSW_PARAM(sd));
|
||||
}
|
||||
}
|
||||
else if (sd->func == FUNC_PLAY_TRACK) {
|
||||
char lfn[] = SOUNDS_PATH "/xxxxxx.wav";
|
||||
strncpy(lfn+sizeof(SOUNDS_PATH), sd->param, sizeof(sd->param));
|
||||
lfn[sizeof(SOUNDS_PATH)+sizeof(sd->param)] = '\0';
|
||||
strcat(lfn+sizeof(SOUNDS_PATH), SOUNDS_EXT);
|
||||
audioQueue.playFile(lfn);
|
||||
}
|
||||
else if (sd->func == FUNC_PLAY_VALUE) {
|
||||
playValue(FSW_PARAM(sd));
|
||||
}
|
||||
else if (sd->func == FUNC_VOLUME) {
|
||||
requiredSpeakerVolume = ((1024 + getValue(FSW_PARAM(sd))) * NUM_VOL_LEVELS) / 2048;
|
||||
}
|
||||
#elif defined(VOICE)
|
||||
else if (sd->func == FUNC_PLAY_TRACK || sd->func == FUNC_PLAY_VALUE) {
|
||||
if (!isPlaying()) {
|
||||
static uint16_t s_last_play = 0;
|
||||
uint16_t tmr10ms = get_tmr10ms();
|
||||
if (tmr10ms - s_last_play >= 100) {
|
||||
s_last_play = tmr10ms;
|
||||
if (sd->func == FUNC_PLAY_TRACK)
|
||||
pushCustomPrompt(sd->param);
|
||||
else
|
||||
playValue(sd->param);
|
||||
}
|
||||
}
|
||||
else if (sd->func == FUNC_PLAY_TRACK) {
|
||||
pushCustomPrompt(sd->param);
|
||||
}
|
||||
else if (sd->func == FUNC_PLAY_VALUE) {
|
||||
playValue(sd->param);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -2018,23 +2006,14 @@ void perOut(uint8_t tick10ms)
|
||||
|
||||
//========== MIXER LOOP ===============
|
||||
uint8_t lv_mixWarning = 0;
|
||||
uint8_t phase = s_perout_flight_phase + 1;
|
||||
|
||||
for (uint8_t i=0; i<MAX_MIXERS; i++) {
|
||||
|
||||
MixData *md = mixaddress( i ) ;
|
||||
|
||||
if (md->srcRaw==0) break;
|
||||
|
||||
if (md->phase != 0) {
|
||||
if (md->phase > 0) {
|
||||
if (phase != md->phase)
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
if (phase == -md->phase)
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (!(md->phases & (1<<s_perout_flight_phase))) continue;
|
||||
|
||||
//========== SWITCH ===============
|
||||
bool sw = getSwitch(md->swtch, 1);
|
||||
@@ -2054,7 +2033,7 @@ void perOut(uint8_t tick10ms)
|
||||
}
|
||||
else {
|
||||
if (k < NUM_STICKS)
|
||||
v = anas[k]; //Switch is on. MAX=FULL=512 or value.
|
||||
v = md->noExpo ? rawAnas[k] : anas[k]; //Switch is on. MAX=FULL=512 or value.
|
||||
else if (k>=MIXSRC_CH1-1 && k<=MIXSRC_CH16-1 && k-MIXSRC_CH1+1<md->destCh) // if we've already calculated the value - take it instead
|
||||
v = chans[k-MIXSRC_CH1+1] / 100;
|
||||
else if (k>=MIXSRC_THR-1 && k<=MIXSRC_SWC-1) {
|
||||
@@ -2174,17 +2153,20 @@ void perOut(uint8_t tick10ms)
|
||||
}
|
||||
|
||||
//========== CURVES ===============
|
||||
if (md->curve)
|
||||
v = applyCurve(v, md->curve);
|
||||
if (md->curveParam && md->curveMode == MODE_CURVE) {
|
||||
v = applyCurve(v, md->curveParam);
|
||||
}
|
||||
|
||||
//========== MULTIPLEX ===============
|
||||
//========== WEIGHT ===============
|
||||
int32_t dv = (int32_t)v*md->weight;
|
||||
|
||||
int8_t differential = md->differential;
|
||||
if (differential>0 && dv<0)
|
||||
dv = (dv * (50-differential)) / 50;
|
||||
else if (differential<0 && dv>0)
|
||||
dv = (dv * (50+differential)) / 50;
|
||||
//========== DIFFERENTIAL =========
|
||||
if (md->curveMode == MODE_DIFFERENTIAL) {
|
||||
if (md->curveParam>0 && dv<0)
|
||||
dv = (dv * (50-md->curveParam)) / 50;
|
||||
else if (md->curveParam<0 && dv>0)
|
||||
dv = (dv * (50+md->curveParam)) / 50;
|
||||
}
|
||||
|
||||
int32_t *ptr = &chans[md->destCh]; // Save calculating address several times
|
||||
switch(md->mltpx){
|
||||
@@ -2600,6 +2582,10 @@ void perMain()
|
||||
|
||||
lcd_clear();
|
||||
|
||||
#if defined(PCBARM) && defined(SIMU)
|
||||
checkTrims();
|
||||
#endif
|
||||
|
||||
#if defined(PCBSTD)
|
||||
uint8_t evt = getEvent();
|
||||
evt = checkTrim(evt);
|
||||
@@ -2961,20 +2947,18 @@ ISR(USART0_UDRE_vect)
|
||||
|
||||
void instantTrim()
|
||||
{
|
||||
s_perout_mode = e_perout_mode_notrainer;
|
||||
evalSticks();
|
||||
s_perout_mode = e_perout_mode_normal;
|
||||
|
||||
for (uint8_t i=0; i<NUM_STICKS; i++) {
|
||||
if (i!=THR_STICK) {
|
||||
// don't instant trim the throttle stick
|
||||
uint8_t trim_phase = getTrimFlightPhase(s_perout_flight_phase, i);
|
||||
s_perout_mode = e_perout_mode_notrainer;
|
||||
evalSticks();
|
||||
s_perout_mode = e_perout_mode_normal;
|
||||
int16_t trim = (anas[i] + trims[i]) / 2;
|
||||
if (trim < TRIM_EXTENDED_MIN) {
|
||||
trim = TRIM_EXTENDED_MIN;
|
||||
}
|
||||
if (trim > TRIM_EXTENDED_MAX) {
|
||||
trim = TRIM_EXTENDED_MAX;
|
||||
}
|
||||
// TODO limit
|
||||
if (trim < TRIM_EXTENDED_MIN) trim = TRIM_EXTENDED_MIN;
|
||||
if (trim > TRIM_EXTENDED_MAX) trim = TRIM_EXTENDED_MAX;
|
||||
setTrimValue(trim_phase, i, trim);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -417,7 +417,7 @@ enum CswFunctions {
|
||||
#elif defined(WS_HOW_HIGH)
|
||||
#define NUM_TELEMETRY TELEM_ALT
|
||||
#elif defined(FRSKY)
|
||||
#define NUM_TELEMETRY TELEM_RSSI_RX
|
||||
#define NUM_TELEMETRY TELEM_A2
|
||||
#elif defined(MAVLINK)
|
||||
// Number sw position
|
||||
#define NUM_TELEMETRY 4
|
||||
|
||||
+1
-1
@@ -213,7 +213,7 @@ void setupPulsesPPM(uint8_t proto)
|
||||
rest += (int32_t(g_model.ppmFrameLength))*1000;
|
||||
for (uint8_t i=(proto==PROTO_PPM16) ? p-8 : 0; i<p; i++) {
|
||||
#ifdef PPM_CENTER_ADJUSTABLE
|
||||
int16_t v = limit((int16_t)-PPM_range, g_chans512[i], (int16_t)PPM_range) + 2*(PPM_CENTER+g_model.servoCenter[i]);
|
||||
int16_t v = limit((int16_t)-PPM_range, g_chans512[i], (int16_t)PPM_range) + 2*(PPM_CENTER+limitaddress(i)->ppmCenter);
|
||||
#else
|
||||
int16_t v = limit((int16_t)-PPM_range, g_chans512[i], (int16_t)PPM_range) + 2*PPM_CENTER;
|
||||
#endif
|
||||
|
||||
+22
-1
@@ -323,8 +323,29 @@ long Open9xSim::onTimeout(FXObject*,FXSelector,void*)
|
||||
if(getApp()->getKeyState(keys2[i])) {
|
||||
#if defined(PCBARM)
|
||||
switch(i) {
|
||||
case 6:
|
||||
PIOA->PIO_PDSR &= ~0x00800000;
|
||||
break;
|
||||
case 7:
|
||||
PIOB->PIO_PDSR &= ~0x10;
|
||||
break;
|
||||
case 4:
|
||||
PIOA->PIO_PDSR &= ~0x00000002;
|
||||
break;
|
||||
case 5:
|
||||
PIOC->PIO_PDSR &= ~0x00000400;
|
||||
break;
|
||||
case 3:
|
||||
PIOA->PIO_PDSR &= ~0x01000000;
|
||||
break;
|
||||
case 2:
|
||||
PIOC->PIO_PDSR &= ~0x10000000;
|
||||
break;
|
||||
case 1:
|
||||
PIOA->PIO_PDSR &= ~0x00000001;
|
||||
break;
|
||||
case 0:
|
||||
PIOA->PIO_PDSR |= 0x00800000;
|
||||
PIOC->PIO_PDSR &= ~0x00000200;
|
||||
break;
|
||||
}
|
||||
#elif defined(PCBV4)
|
||||
|
||||
+8
-7
@@ -81,6 +81,7 @@ MixData* setDest(uint8_t dch, uint8_t src, bool clear=false)
|
||||
mix->destCh = dch;
|
||||
mix->srcRaw = src;
|
||||
mix->weight = 100;
|
||||
mix->phases = 1;
|
||||
return mix;
|
||||
}
|
||||
|
||||
@@ -189,9 +190,9 @@ void applyTemplate(uint8_t idx)
|
||||
md=setDest(ICC(STK_ELE), MIXSRC_CH9); md->weight=-100;
|
||||
md=setDest(ICC(STK_ELE), MIXSRC_CH11); md->carryTrim=TRIM_OFF;
|
||||
|
||||
md=setDest(ICC(STK_THR), MIXSRC_Thr); md->swtch=DSW_ID0; md->curve=CV(1); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(ICC(STK_THR), MIXSRC_Thr); md->swtch=DSW_ID1; md->curve=CV(2); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(ICC(STK_THR), MIXSRC_Thr); md->weight= 110; md->swtch=DSW_ID2; md->curve=CV(2); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(ICC(STK_THR), MIXSRC_Thr); md->swtch=DSW_ID0; md->curveParam=CV(1); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(ICC(STK_THR), MIXSRC_Thr); md->swtch=DSW_ID1; md->curveParam=CV(2); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(ICC(STK_THR), MIXSRC_Thr); md->weight= 110; md->swtch=DSW_ID2; md->curveParam=CV(2); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(ICC(STK_THR), MIXSRC_MAX); md->weight=-125; md->swtch=DSW_THR; md->mltpx=MLTPX_REP; md->carryTrim=TRIM_OFF;
|
||||
|
||||
md=setDest(ICC(STK_RUD), MIXSRC_Rud);
|
||||
@@ -206,10 +207,10 @@ void applyTemplate(uint8_t idx)
|
||||
|
||||
md=setDest(8, MIXSRC_Ele); md->weight= 60;
|
||||
md=setDest(9, MIXSRC_Ail); md->weight=-52;
|
||||
md=setDest(10, MIXSRC_Thr); md->weight= 70; md->swtch=DSW_ID0; md->curve=CV(3); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(10, MIXSRC_Thr); md->weight= 70; md->swtch=DSW_ID1; md->curve=CV(4); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(10, MIXSRC_Thr); md->weight= 70; md->swtch=DSW_ID2; md->curve=CV(4); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(10, MIXSRC_Thr); md->swtch=DSW_THR; md->curve=CV(5); md->carryTrim=TRIM_OFF; md->mltpx=MLTPX_REP;
|
||||
md=setDest(10, MIXSRC_Thr); md->weight= 70; md->swtch=DSW_ID0; md->curveParam=CV(3); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(10, MIXSRC_Thr); md->weight= 70; md->swtch=DSW_ID1; md->curveParam=CV(4); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(10, MIXSRC_Thr); md->weight= 70; md->swtch=DSW_ID2; md->curveParam=CV(4); md->carryTrim=TRIM_OFF;
|
||||
md=setDest(10, MIXSRC_Thr); md->swtch=DSW_THR; md->curveParam=CV(5); md->carryTrim=TRIM_OFF; md->mltpx=MLTPX_REP;
|
||||
|
||||
//Set up Curves
|
||||
setCurve(CURVE5(1), heli_ar1);
|
||||
|
||||
@@ -136,7 +136,7 @@ const pm_char STR_WEIGHT[] PROGMEM = TR_WEIGHT;
|
||||
const pm_char STR_DIFFERENTIAL[] PROGMEM = TR_DIFFERENTIAL;
|
||||
const pm_char STR_OFFSET[] PROGMEM = TR_OFFSET;
|
||||
const pm_char STR_TRIM[] PROGMEM = TR_TRIM;
|
||||
const pm_char STR_CURVES[] PROGMEM = TR_CURVES;
|
||||
const pm_char STR_CURVE[] PROGMEM = TR_CURVE;
|
||||
const pm_char STR_FPHASE[] PROGMEM = TR_FPHASE;
|
||||
const pm_char STR_MIXWARNING[] PROGMEM = TR_MIXWARNING;
|
||||
const pm_char STR_OFF[] PROGMEM = TR_OFF;
|
||||
|
||||
+1
-1
@@ -240,7 +240,7 @@ extern const pm_char STR_WEIGHT[];
|
||||
extern const pm_char STR_DIFFERENTIAL[];
|
||||
extern const pm_char STR_OFFSET[];
|
||||
extern const pm_char STR_TRIM[];
|
||||
extern const pm_char STR_CURVES[];
|
||||
extern const pm_char STR_CURVE[];
|
||||
extern const pm_char STR_FPHASE[];
|
||||
extern const pm_char STR_MIXWARNING[];
|
||||
extern const pm_char STR_OFF[];
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
#define TR_FUNCSOUNDS "Warn1 ""Warn2 ""Cheep ""Ring ""SciFi ""Robot ""Chirp ""Tada ""Crickt""Siren ""AlmClk""Ratata""Tick "
|
||||
|
||||
#define LEN_VTELEMCHNS "\004"
|
||||
#define TR_VTELEMCHNS "---\0""Tmr1""Tmr2""A1\0 ""A2\0 ""Tx\0 ""Rx\0 ""Alt\0""Rpm\0""Fuel""T1\0 ""T2\0 ""Spd\0""Dist""GAlt""Cell""Cels""Vfas""Curr""Cnsp""Powr""AccX""AccY""AccZ""Hdg\0""VSpd""A1-\0""A2-\0""Alt-""Alt+""Rpm+""T1+\0""T2+\0""Spd+""Dst+""Cur+""Acc\0""Time"
|
||||
#define TR_VTELEMCHNS "---\0""Tmr1""Tmr2""Tx\0 ""Rx\0 ""A1\0 ""A2\0 ""Alt\0""Rpm\0""Fuel""T1\0 ""T2\0 ""Spd\0""Dist""GAlt""Cell""Cels""Vfas""Curr""Cnsp""Powr""AccX""AccY""AccZ""Hdg\0""VSpd""A1-\0""A2-\0""Alt-""Alt+""Rpm+""T1+\0""T2+\0""Spd+""Dst+""Cur+""Acc\0""Time"
|
||||
|
||||
#ifdef IMPERIAL_UNITS
|
||||
#define LENGTH_UNIT "ft\0"
|
||||
@@ -210,12 +210,12 @@
|
||||
#endif
|
||||
|
||||
#define LEN_VSRCRAW "\004"
|
||||
#if defined(PCBV4)
|
||||
#if defined(EXTRA_ROTARY_ENCODERS)
|
||||
#if defined(PCBARM)
|
||||
#define TR_ROTARY_ENCODERS_VSRCRAW "REa "
|
||||
#elif defined(PCBV4) && defined(EXTRA_ROTARY_ENCODERS)
|
||||
#define TR_ROTARY_ENCODERS_VSRCRAW "REa ""REb ""REc ""REd "
|
||||
#else
|
||||
#elif defined(PCBV4) && !defined(EXTRA_ROTARY_ENCODERS)
|
||||
#define TR_ROTARY_ENCODERS_VSRCRAW "REa ""REb "
|
||||
#endif
|
||||
#else
|
||||
#define TR_ROTARY_ENCODERS_VSRCRAW
|
||||
#endif
|
||||
@@ -278,7 +278,7 @@
|
||||
#define TR_DRWEIGHT "V\200ha DV"
|
||||
#define TR_DREXPO "Expo DV"
|
||||
#define TR_TRIM "Trim"
|
||||
#define TR_CURVES "K\206ivka"
|
||||
#define TR_CURVE "K\206ivka"
|
||||
#define TR_FPHASE "F\200ze"
|
||||
#define TR_MIXWARNING "Varov\200n\204"
|
||||
#define TR_OFF "VYP"
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
#define TR_FUNCSOUNDS "Warn 1""Warn 2""Cheep ""Ring ""SciFi ""Robot ""Chirp ""Tada ""Crickt""Siren ""AlmClk""Ratata""Tick "
|
||||
|
||||
#define LEN_VTELEMCHNS "\004"
|
||||
#define TR_VTELEMCHNS "---\0""Tmr1""Tmr2""A1\0 ""A2\0 ""Tx\0 ""Rx\0 ""Alt\0""Rpm\0""Fuel""T1\0 ""T2\0 ""Spd\0""Dist""GAlt""Cell""Cels""Vfas""Curr""Cnsp""Powr""AccX""AccY""AccZ""Hdg\0""VSpd""A1-\0""A2-\0""Alt-""Alt+""Rpm+""T1+\0""T2+\0""Spd+""Dst+""Cur+""Acc\0""Time"
|
||||
#define TR_VTELEMCHNS "---\0""Tmr1""Tmr2""Tx\0 ""Rx\0 ""A1\0 ""A2\0 ""Alt\0""Rpm\0""Fuel""T1\0 ""T2\0 ""Spd\0""Dist""GAlt""Cell""Cels""Vfas""Curr""Cnsp""Powr""AccX""AccY""AccZ""Hdg\0""VSpd""A1-\0""A2-\0""Alt-""Alt+""Rpm+""T1+\0""T2+\0""Spd+""Dst+""Cur+""Acc\0""Time"
|
||||
|
||||
#ifdef IMPERIAL_UNITS
|
||||
#define LENGTH_UNIT "ft\0"
|
||||
@@ -210,12 +210,12 @@
|
||||
#endif
|
||||
|
||||
#define LEN_VSRCRAW "\004"
|
||||
#if defined(PCBV4)
|
||||
#if defined(EXTRA_ROTARY_ENCODERS)
|
||||
#define TR_ROTARY_ENCODERS_VSRCRAW "REa ""REb ""REc ""REd "
|
||||
#else
|
||||
#define TR_ROTARY_ENCODERS_VSRCRAW "REa ""REb "
|
||||
#endif
|
||||
#if defined(PCBARM)
|
||||
#define TR_ROTARY_ENCODERS_VSRCRAW "REa "
|
||||
#elif defined(PCBV4) && defined(EXTRA_ROTARY_ENCODERS)
|
||||
#define TR_ROTARY_ENCODERS_VSRCRAW "REa ""REb ""REc ""REd "
|
||||
#elif defined(PCBV4) && !defined(EXTRA_ROTARY_ENCODERS)
|
||||
#define TR_ROTARY_ENCODERS_VSRCRAW "REa ""REb "
|
||||
#else
|
||||
#define TR_ROTARY_ENCODERS_VSRCRAW
|
||||
#endif
|
||||
@@ -278,7 +278,7 @@
|
||||
#define TR_DRWEIGHT "DR Weight"
|
||||
#define TR_DREXPO "DR Expo"
|
||||
#define TR_TRIM "Trim"
|
||||
#define TR_CURVES "Kurven"
|
||||
#define TR_CURVE "Kurve"
|
||||
#define TR_FPHASE "F.Phase"
|
||||
#define TR_MIXWARNING "Warnung"
|
||||
#define TR_OFF "AUS"
|
||||
|
||||
+10
-10
@@ -90,7 +90,7 @@
|
||||
#define TR_VMLTPX2 "+=""*="":="
|
||||
|
||||
#define LEN_VMIXTRIMS "\003"
|
||||
#define TR_VMIXTRIMS "OFF""ON ""Rud""Ele""Thr""Ail"
|
||||
#define TR_VMIXTRIMS "OFF""ON\0""Rud""Ele""Thr""Ail"
|
||||
|
||||
#define LEN_VCSWFUNC "\010"
|
||||
#define TR_VCSWFUNC "---\0 ""v>ofs\0 ""v<ofs\0 ""|v|>ofs\0""|v|<ofs\0""AND\0 ""OR\0 ""XOR\0 ""v1==v2\0 ""v1!=v2\0 ""v1>v2\0 ""v1<v2\0 ""v1>=v2\0 ""v1<=v2\0 ""d>=ofs\0 ""|d|>=ofs"
|
||||
@@ -151,7 +151,7 @@
|
||||
#define TR_FUNCSOUNDS "Warn1 ""Warn2 ""Cheep ""Ring ""SciFi ""Robot ""Chirp ""Tada ""Crickt""Siren ""AlmClk""Ratata""Tick "
|
||||
|
||||
#define LEN_VTELEMCHNS "\004"
|
||||
#define TR_VTELEMCHNS "---\0""Tmr1""Tmr2""A1\0 ""A2\0 ""Tx\0 ""Rx\0 ""Alt\0""Rpm\0""Fuel""T1\0 ""T2\0 ""Spd\0""Dist""GAlt""Cell""Cels""Vfas""Curr""Cnsp""Powr""AccX""AccY""AccZ""Hdg\0""VSpd""A1-\0""A2-\0""Alt-""Alt+""Rpm+""T1+\0""T2+\0""Spd+""Dst+""Cur+""Acc\0""Time"
|
||||
#define TR_VTELEMCHNS "---\0""Tmr1""Tmr2""Tx\0 ""Rx\0 ""A1\0 ""A2\0 ""Alt\0""Rpm\0""Fuel""T1\0 ""T2\0 ""Spd\0""Dist""GAlt""Cell""Cels""Vfas""Curr""Cnsp""Powr""AccX""AccY""AccZ""Hdg\0""VSpd""A1-\0""A2-\0""Alt-""Alt+""Rpm+""T1+\0""T2+\0""Spd+""Dst+""Cur+""Acc\0""Time"
|
||||
|
||||
#ifdef IMPERIAL_UNITS
|
||||
#define LENGTH_UNIT "ft\0"
|
||||
@@ -200,8 +200,8 @@
|
||||
#define LEN_VKEYS "\005"
|
||||
#define TR_VKEYS " Menu"" Exit"" Down"" Up""Right"" Left"
|
||||
|
||||
#define LEN_VRENCODERS "\003"
|
||||
#define TR_VRENCODERS "REa""REb"
|
||||
#define LEN_VRENCODERS "\003"
|
||||
#define TR_VRENCODERS "REa""REb"
|
||||
|
||||
#define LEN_VSWITCHES "\003"
|
||||
#if defined(PCBARM)
|
||||
@@ -211,12 +211,12 @@
|
||||
#endif
|
||||
|
||||
#define LEN_VSRCRAW "\004"
|
||||
#if defined(PCBV4)
|
||||
#if defined(EXTRA_ROTARY_ENCODERS)
|
||||
#if defined(PCBARM)
|
||||
#define TR_ROTARY_ENCODERS_VSRCRAW "REa "
|
||||
#elif defined(PCBV4) && defined(EXTRA_ROTARY_ENCODERS)
|
||||
#define TR_ROTARY_ENCODERS_VSRCRAW "REa ""REb ""REc ""REd "
|
||||
#else
|
||||
#elif defined(PCBV4) && !defined(EXTRA_ROTARY_ENCODERS)
|
||||
#define TR_ROTARY_ENCODERS_VSRCRAW "REa ""REb "
|
||||
#endif
|
||||
#else
|
||||
#define TR_ROTARY_ENCODERS_VSRCRAW
|
||||
#endif
|
||||
@@ -278,8 +278,8 @@
|
||||
#define TR_MIXEROFFSET "Mixer Offset"
|
||||
#define TR_DRWEIGHT "DR Weight"
|
||||
#define TR_DREXPO "DR Expo"
|
||||
#define TR_TRIM "Trim"
|
||||
#define TR_CURVES "Curves"
|
||||
#define TR_TRIM "Trim/DR"
|
||||
#define TR_CURVE "Curve"
|
||||
#define TR_FPHASE "F.Phase"
|
||||
#define TR_MIXWARNING "Warning"
|
||||
#define TR_OFF "OFF"
|
||||
|
||||
@@ -85,10 +85,10 @@
|
||||
#define TR_VMLTPX2 "+=""*="":="
|
||||
|
||||
#define LEN_VMIXTRIMS "\003"
|
||||
#define TR_VMIXTRIMS "OFF""ON ""Dir""Prf""Gaz""Ail"
|
||||
#define TR_VMIXTRIMS "OFF""ON\0""Dir""Prf""Gaz""Ail"
|
||||
|
||||
#define LEN_VCSWFUNC "\010"
|
||||
#define TR_VCSWFUNC "---\0 ""v>ofs\0 ""v<ofs\0 ""|v|>ofs\0""|v|<ofs\0""AND\0 ""OR\0 ""XOR\0 ""v1==v2\0 ""v1!=v2\0 ""v1>v2\0 ""v1<v2\0 ""v1>=v2\0 ""v1<=v2\0 ""d>=ofs\0 ""|d|>=ofs"
|
||||
#define TR_VCSWFUNC "----\0 ""v>ofs\0 ""v<ofs\0 ""|v|>ofs\0""|v|<ofs\0""ET\0 ""OU\0 ""OU Excl\0""v1==v2\0 ""v1!=v2\0 ""v1>v2\0 ""v1<v2\0 ""v1>=v2\0 ""v1<=v2\0 ""d>=ofs\0 ""|d|>=ofs"
|
||||
|
||||
#define LEN_VFSWFUNC "\015"
|
||||
#if defined(VARIO)
|
||||
@@ -145,7 +145,7 @@
|
||||
#define TR_FUNCSOUNDS "Warn1 ""Warn2 ""Cheep ""Ring ""SciFi ""Robot ""Chirp ""Tada ""Crickt""Siren ""AlmClk""Ratata""Tick "
|
||||
|
||||
#define LEN_VTELEMCHNS "\004"
|
||||
#define TR_VTELEMCHNS "---\0""Chr1""Chr2""A1\0 ""A2\0 ""Tx\0 ""Rx\0 ""Alt\0""Rpm\0""Carb""T1\0 ""T2\0 ""Vit\0""Dist""AltG""Elem""Velm""Vfas""Cour""Cnsm""Puis""AccX""AccY""AccZ""Cap\0""VitV""A1-\0""A2-\0""Alt-""Alt+""Rpm+""T1+\0""T2+\0""Vit+""Dst+""Cur+""Acc\0""Time"
|
||||
#define TR_VTELEMCHNS "---\0""Chr1""Chr2""Tx\0 ""Rx\0 ""A1\0 ""A2\0 ""Alt\0""Rpm\0""Carb""T1\0 ""T2\0 ""Vit\0""Dist""AltG""Elem""Velm""Vfas""Cour""Cnsm""Puis""AccX""AccY""AccZ""Cap\0""VitV""A1-\0""A2-\0""Alt-""Alt+""Rpm+""T1+\0""T2+\0""Vit+""Dst+""Cur+""Acc\0""Time"
|
||||
|
||||
#ifdef IMPERIAL_UNITS
|
||||
#define LENGTH_UNIT "ft\0"
|
||||
@@ -208,12 +208,12 @@
|
||||
#endif
|
||||
|
||||
#define LEN_VSRCRAW "\004"
|
||||
#if defined(PCBV4)
|
||||
#if defined(EXTRA_ROTARY_ENCODERS)
|
||||
#if defined(PCBARM)
|
||||
#define TR_ROTARY_ENCODERS_VSRCRAW "REa "
|
||||
#elif defined(PCBV4) && defined(EXTRA_ROTARY_ENCODERS)
|
||||
#define TR_ROTARY_ENCODERS_VSRCRAW "REa ""REb ""REc ""REd "
|
||||
#else
|
||||
#elif defined(PCBV4) && !defined(EXTRA_ROTARY_ENCODERS)
|
||||
#define TR_ROTARY_ENCODERS_VSRCRAW "REa ""REb "
|
||||
#endif
|
||||
#else
|
||||
#define TR_ROTARY_ENCODERS_VSRCRAW
|
||||
#endif
|
||||
@@ -275,8 +275,8 @@
|
||||
#define TR_MIXEROFFSET "Offset Mixage"
|
||||
#define TR_DRWEIGHT "Ratio DR"
|
||||
#define TR_DREXPO "Expo DR"
|
||||
#define TR_TRIM "Trim"
|
||||
#define TR_CURVES "Courbe"
|
||||
#define TR_TRIM "Trim/DR"
|
||||
#define TR_CURVE "Courbe"
|
||||
#define TR_FPHASE "Ph.Vol"
|
||||
#define TR_MIXWARNING "Alerte"
|
||||
#define TR_OFF "OFF"
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
#define TR_FUNCSOUNDS "Warn1 ""Warn2 ""Cheep ""Ring ""SciFi ""Robot ""Chirp ""Tada ""Crickt""Siren ""AlmClk""Ratata""Tick "
|
||||
|
||||
#define LEN_VTELEMCHNS "\004"
|
||||
#define TR_VTELEMCHNS "---\0""Tmr1""Tmr2""A1\0 ""A2\0 ""Tx\0 ""Rx\0 ""Alt\0""Rpm\0""Carb""T1\0 ""T2\0 ""Vel\0""Dist""GAlt""Cell""Cels""Vfas""Curr""Cnsm""Powr""AccX""AccY""AccZ""Dir\0""VelV""A1-\0""A2-\0""Alt-""Alt+""Rpm+""T1+\0""T2+\0""Vel+""Dst+""Cur+""Acc\0""Time"
|
||||
#define TR_VTELEMCHNS "---\0""Tmr1""Tmr2""Tx\0 ""Rx\0 ""A1\0 ""A2\0 ""Alt\0""Rpm\0""Carb""T1\0 ""T2\0 ""Vel\0""Dist""GAlt""Cell""Cels""Vfas""Curr""Cnsm""Powr""AccX""AccY""AccZ""Dir\0""VelV""A1-\0""A2-\0""Alt-""Alt+""Rpm+""T1+\0""T2+\0""Vel+""Dst+""Cur+""Acc\0""Time"
|
||||
|
||||
#ifdef IMPERIAL_UNITS
|
||||
#define LENGTH_UNIT "ft\0"
|
||||
@@ -210,12 +210,12 @@
|
||||
#endif
|
||||
|
||||
#define LEN_VSRCRAW "\004"
|
||||
#if defined(PCBV4)
|
||||
#if defined(EXTRA_ROTARY_ENCODERS)
|
||||
#if defined(PCBARM)
|
||||
#define TR_ROTARY_ENCODERS_VSRCRAW "REa "
|
||||
#elif defined(PCBV4) && defined(EXTRA_ROTARY_ENCODERS)
|
||||
#define TR_ROTARY_ENCODERS_VSRCRAW "REa ""REb ""REc ""REd "
|
||||
#else
|
||||
#elif defined(PCBV4) && !defined(EXTRA_ROTARY_ENCODERS)
|
||||
#define TR_ROTARY_ENCODERS_VSRCRAW "REa ""REb "
|
||||
#endif
|
||||
#else
|
||||
#define TR_ROTARY_ENCODERS_VSRCRAW
|
||||
#endif
|
||||
@@ -278,7 +278,7 @@
|
||||
#define TR_DRWEIGHT "Peso DR "
|
||||
#define TR_DREXPO "Expo DR"
|
||||
#define TR_TRIM "Trim"
|
||||
#define TR_CURVES "Curva"
|
||||
#define TR_CURVE "Curva"
|
||||
#define TR_FPHASE "Fase V."
|
||||
#define TR_MIXWARNING "Avviso"
|
||||
#define TR_OFF "OFF"
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
#define TR_FUNCSOUNDS "Varn1 ""Varn2 ""F\200r ""Ring ""SciFi ""Robot ""Pip ""Tada ""Syrsa ""Siren ""Alarm ""Ratata""Tick "
|
||||
|
||||
#define LEN_VTELEMCHNS "\004"
|
||||
#define TR_VTELEMCHNS "---\0""Tmr1""Tmr2""A1\0 ""A2\0 ""Tx\0 ""Rx\0 ""H\202jd""Varv""Tank""T1\0 ""T2\0 ""Fart""Avst""GHjd""Batt""Cels""Vfas""Curr""Cnsp""Powr""AccX""AccY""AccZ""Hdg\0""VFrt""A1-\0""A2-\0""Hjd-""Hjd+""Rpm+""T1+\0""T2+\0""Frt+""Avs+""Cur+""Acc\0""Tid\0"
|
||||
#define TR_VTELEMCHNS "---\0""Tmr1""Tmr2""Tx\0 ""Rx\0 ""A1\0 ""A2\0 ""H\202jd""Varv""Tank""T1\0 ""T2\0 ""Fart""Avst""GHjd""Batt""Cels""Vfas""Curr""Cnsp""Powr""AccX""AccY""AccZ""Hdg\0""VFrt""A1-\0""A2-\0""Hjd-""Hjd+""Rpm+""T1+\0""T2+\0""Frt+""Avs+""Cur+""Acc\0""Tid\0"
|
||||
|
||||
#ifdef IMPERIAL_UNITS
|
||||
#define LENGTH_UNIT "fot"
|
||||
@@ -208,12 +208,12 @@
|
||||
#endif
|
||||
|
||||
#define LEN_VSRCRAW "\004"
|
||||
#if defined(PCBV4)
|
||||
#if defined(EXTRA_ROTARY_ENCODERS)
|
||||
#if defined(PCBARM)
|
||||
#define TR_ROTARY_ENCODERS_VSRCRAW "REa "
|
||||
#elif defined(PCBV4) && defined(EXTRA_ROTARY_ENCODERS)
|
||||
#define TR_ROTARY_ENCODERS_VSRCRAW "REa ""REb ""REc ""REd "
|
||||
#else
|
||||
#elif defined(PCBV4) && !defined(EXTRA_ROTARY_ENCODERS)
|
||||
#define TR_ROTARY_ENCODERS_VSRCRAW "REa ""REb "
|
||||
#endif
|
||||
#else
|
||||
#define TR_ROTARY_ENCODERS_VSRCRAW
|
||||
#endif
|
||||
@@ -275,7 +275,7 @@
|
||||
#define TR_DRWEIGHT "DR-vikt"
|
||||
#define TR_DREXPO "DR-expo"
|
||||
#define TR_TRIM "Trim"
|
||||
#define TR_CURVES "Kurvor"
|
||||
#define TR_CURVE "Kurvor"
|
||||
#define TR_FPHASE "Flygfas"
|
||||
#define TR_MIXWARNING "Varning"
|
||||
#define TR_OFF "AV "
|
||||
|
||||
@@ -76,10 +76,10 @@ enum CzechPrompts {
|
||||
PROMPT_LABELS_BASE = 190,
|
||||
PROMPT_TIMER1 = PROMPT_LABELS_BASE+TELEM_TM1,
|
||||
PROMPT_TIMER2 = PROMPT_LABELS_BASE+TELEM_TM2,
|
||||
PROMPT_A1 = PROMPT_LABELS_BASE+TELEM_A1,
|
||||
PROMPT_A2 = PROMPT_LABELS_BASE+TELEM_A2,
|
||||
PROMPT_RSSI_TX = PROMPT_LABELS_BASE+TELEM_RSSI_TX,
|
||||
PROMPT_RSSI_RX = PROMPT_LABELS_BASE+TELEM_RSSI_RX,
|
||||
PROMPT_A1 = PROMPT_LABELS_BASE+TELEM_A1,
|
||||
PROMPT_A2 = PROMPT_LABELS_BASE+TELEM_A2,
|
||||
PROMPT_ALTITUDE = PROMPT_LABELS_BASE+TELEM_ALT,
|
||||
PROMPT_RPM = PROMPT_LABELS_BASE+TELEM_RPM,
|
||||
PROMPT_ESSENCE = PROMPT_LABELS_BASE+TELEM_FUEL,
|
||||
|
||||
@@ -75,10 +75,10 @@ enum FrenchPrompts {
|
||||
PROMPT_LABELS_BASE = 145,
|
||||
PROMPT_TIMER1 = PROMPT_LABELS_BASE+TELEM_TM1,
|
||||
PROMPT_TIMER2 = PROMPT_LABELS_BASE+TELEM_TM2,
|
||||
PROMPT_A1 = PROMPT_LABELS_BASE+TELEM_A1,
|
||||
PROMPT_A2 = PROMPT_LABELS_BASE+TELEM_A2,
|
||||
PROMPT_RSSI_TX = PROMPT_LABELS_BASE+TELEM_RSSI_TX,
|
||||
PROMPT_RSSI_RX = PROMPT_LABELS_BASE+TELEM_RSSI_RX,
|
||||
PROMPT_A1 = PROMPT_LABELS_BASE+TELEM_A1,
|
||||
PROMPT_A2 = PROMPT_LABELS_BASE+TELEM_A2,
|
||||
PROMPT_ALTITUDE = PROMPT_LABELS_BASE+TELEM_ALT,
|
||||
PROMPT_RPM = PROMPT_LABELS_BASE+TELEM_RPM,
|
||||
PROMPT_ESSENCE = PROMPT_LABELS_BASE+TELEM_FUEL,
|
||||
|
||||
@@ -67,10 +67,10 @@ enum ItalianPrompts {
|
||||
PROMPT_LABELS_BASE = 126,
|
||||
PROMPT_TIMER1 = PROMPT_LABELS_BASE+TELEM_TM1,
|
||||
PROMPT_TIMER2 = PROMPT_LABELS_BASE+TELEM_TM2,
|
||||
PROMPT_A1 = PROMPT_LABELS_BASE+TELEM_A1,
|
||||
PROMPT_A2 = PROMPT_LABELS_BASE+TELEM_A2,
|
||||
PROMPT_RSSI_TX = PROMPT_LABELS_BASE+TELEM_RSSI_TX,
|
||||
PROMPT_RSSI_RX = PROMPT_LABELS_BASE+TELEM_RSSI_RX,
|
||||
PROMPT_A1 = PROMPT_LABELS_BASE+TELEM_A1,
|
||||
PROMPT_A2 = PROMPT_LABELS_BASE+TELEM_A2,
|
||||
PROMPT_ALTITUDE = PROMPT_LABELS_BASE+TELEM_ALT,
|
||||
PROMPT_RPM = PROMPT_LABELS_BASE+TELEM_RPM,
|
||||
PROMPT_ESSENCE = PROMPT_LABELS_BASE+TELEM_FUEL,
|
||||
|
||||
Reference in New Issue
Block a user