1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-16 12:55:12 +03:00

Inputs / Mixers screens rearrangement / bugfixes

This commit is contained in:
bsongis 2014-03-25 17:02:54 +01:00
parent 47b79b16ba
commit 8c59a196c7
22 changed files with 98 additions and 92 deletions

View file

@ -390,7 +390,7 @@ void referenceModelAudioFiles()
}
// Logical Switches Audio Files <switchname>-[on|off].wav
for (int i=0; i<NUM_CSW && !found; i++) {
for (int i=0; i<NUM_LOGICAL_SWITCH && !found; i++) {
for (int event=0; event<2; event++) {
getLogicalSwitchAudioFile(path, i, event);
if (!strcmp(filename, fn)) {

View file

@ -192,7 +192,7 @@ PACK(typedef struct {
int16_t curves[16];
int8_t points[NUM_POINTS];
LogicalSwitchData_v215 customSw[NUM_CSW];
LogicalSwitchData_v215 customSw[NUM_LOGICAL_SWITCH];
CustomFnData_v215 funcSw[32];
SwashRingData swashR;
PhaseData_v215 phaseData[MAX_PHASES];
@ -339,7 +339,7 @@ int ConvertSource_215_to_216(int source, bool insertZero=false)
if (source > MIXSRC_POT2)
source += 1;
// PPM9-PPM16 added
if (source > MIXSRC_FIRST_PPM+7)
if (source > MIXSRC_FIRST_TRAINER+7)
source += 8;
// 4 GVARS added
if (source > MIXSRC_GVAR1+4)

View file

@ -1286,6 +1286,7 @@ void menuModelSetup(uint8_t event)
case ITEM_MODEL_BEEP_CENTER:
lcd_putsLeft(y, STR_BEEPCTR);
for (uint8_t i=0; i<NUM_STICKS+NUM_POTS+NUM_ROTARY_ENCODERS; i++) {
// TODO flash saving, \001 not needed in STR_RETA123
lcd_putsiAtt(MODEL_SETUP_2ND_COLUMN+i*FW, y, STR_RETA123, i, ((m_posHorz==i) && attr) ? BLINK|INVERS : (((g_model.beepANACenter & ((BeepANACenter)1<<i)) || (attr && m_posHorz<0)) ? INVERS : 0 ) );
}
if (attr && CURSOR_ON_CELL) {
@ -1791,7 +1792,7 @@ FlightModesType editFlightModes(uint8_t x, uint8_t y, uint8_t event, FlightModes
if (posHorz==p) flags |= BLINK;
}
if (value & (1<<p))
lcd_putcAtt(x, y, ' ', flags);
lcd_putcAtt(x, y, ' ', flags|FIXEDWIDTH);
else
lcd_putcAtt(x, y, '0'+p, flags);
#else
@ -3277,21 +3278,22 @@ static uint8_t s_copySrcCh;
#define _STR_MAX(x) PSTR("/" #x)
#define STR_MAX(x) _STR_MAX(x)
#define MIX_LINE_SRC_POS 4*FW-1
#if LCD_W >= 212
#define EXPO_LINE_WEIGHT_POS 8*FW+3
#define EXPO_LINE_SRC_POS 9*FW-2
#define EXPO_LINE_CURVE_POS 12*FW+4
#define EXPO_LINE_SWITCH_POS 17*FW-1
#define EXPO_LINE_SIDE_POS 20*FW-2
#define EXPO_LINE_WEIGHT_POS 8*FW+8
#define EXPO_LINE_SRC_POS 9*FW+3
#define EXPO_LINE_CURVE_POS 12*FW+11
#define EXPO_LINE_TRIM_POS 19*FW-4
#define EXPO_LINE_SWITCH_POS 20*FW-1
#define EXPO_LINE_SIDE_POS 23*FW
#define EXPO_LINE_FM_POS 24*FW+2
#define EXPO_LINE_SELECT_POS 5*FW+2
#define EXPO_LINE_FM_POS LCD_W-LEN_EXPOMIX_NAME*FW-MENUS_SCROLLBAR_WIDTH-FW
#define EXPO_LINE_NAME_POS LCD_W-LEN_EXPOMIX_NAME*FW-MENUS_SCROLLBAR_WIDTH
#define MIX_LINE_WEIGHT_POS 11*FW+5
#define MIX_LINE_CURVE_POS 12*FW+4
#define MIX_LINE_SWITCH_POS 16*FW+1
#define MIX_LINE_DELAY_POS 19*FW+2
#define MIX_LINE_WEIGHT_POS 6*FW+8
#define MIX_LINE_SRC_POS 7*FW+3
#define MIX_LINE_CURVE_POS 13*FW+3
#define MIX_LINE_SWITCH_POS 21*FW-1
#define MIX_LINE_FM_POS 24*FW+2
#define MIX_LINE_DELAY_POS 18*FW+2
#elif defined(CPUARM)
#define EXPO_LINE_WEIGHT_POS 7*FW+1
#define EXPO_LINE_EXPO_POS 10*FW+5
@ -3300,6 +3302,7 @@ static uint8_t s_copySrcCh;
#define EXPO_LINE_SELECT_POS 24
#define EXPO_LINE_FM_POS
#define EXPO_LINE_NAME_POS LCD_W-sizeof(ed->name)*FW-MENUS_SCROLLBAR_WIDTH
#define MIX_LINE_SRC_POS 4*FW-1
#define MIX_LINE_WEIGHT_POS 11*FW+3
#define MIX_LINE_CURVE_POS 12*FW+2
#define MIX_LINE_SWITCH_POS 16*FW
@ -3315,6 +3318,7 @@ static uint8_t s_copySrcCh;
#endif
#define EXPO_LINE_FM_POS LCD_W-FW-MENUS_SCROLLBAR_WIDTH
#define EXPO_LINE_SELECT_POS 24
#define MIX_LINE_SRC_POS 4*FW-1
#define MIX_LINE_WEIGHT_POS 11*FW+3
#define MIX_LINE_CURVE_POS 12*FW+2
#define MIX_LINE_SWITCH_POS 16*FW
@ -3567,6 +3571,8 @@ void menuModelExpoMix(uint8_t expo, uint8_t event)
#endif
#if defined(PCBTARANIS)
if (ed->carryTrim != TRIM_ON)
lcd_putc(EXPO_LINE_TRIM_POS, y, ed->carryTrim > 0 ? '-' : STR_RETA123[-ed->carryTrim]);
putsCurveRef(EXPO_LINE_CURVE_POS, y, ed->curve, 0);
#else
if (ed->curveMode == MODE_CURVE)
@ -3580,7 +3586,7 @@ void menuModelExpoMix(uint8_t expo, uint8_t event)
if (ed->mode!=3) lcd_putc(EXPO_LINE_SIDE_POS, y, ed->mode == 2 ? 126 : 127);
#if defined(CPUARM) && LCD_W >= 212
displayFlightModes(EXPO_LINE_FM_POS, y, ed->phases);
if (ed->phases) lcd_puts(EXPO_LINE_FM_POS, y, STR_FP);
if (ed->name[0]) lcd_putsnAtt(EXPO_LINE_NAME_POS, y, ed->name, sizeof(ed->name), ZCHAR | (isExpoActive(i) ? BOLD : 0));
#elif defined(CPUARM)
if (ed->name[0]) lcd_putsnAtt(EXPO_LINE_NAME_POS, y, ed->name, sizeof(ed->name), ZCHAR | (isExpoActive(i) ? BOLD : 0));
@ -3601,10 +3607,6 @@ void menuModelExpoMix(uint8_t expo, uint8_t event)
gvarWeightItem(MIX_LINE_WEIGHT_POS, y, md, attr | (isMixActive(i) ? BOLD : 0), event);
#if LCD_W >= 212
displayFlightModes(EXPO_LINE_FM_POS, y, md->phases);
#endif
#if defined(CPUARM)
if (md->name[0]) {
lcd_putsnAtt(EXPO_LINE_NAME_POS, y, md->name, sizeof(md->name), ZCHAR | (isMixActive(i) ? BOLD : 0));
@ -3615,6 +3617,8 @@ void menuModelExpoMix(uint8_t expo, uint8_t event)
#endif
{
#if defined(PCBTARANIS)
putsCurveRef(MIX_LINE_CURVE_POS, y, md->curve, 0);
if (md->phases) lcd_puts(MIX_LINE_FM_POS, y, STR_FP);
#else
if (md->curveParam) {
if (md->curveMode == MODE_CURVE)
@ -3623,7 +3627,9 @@ void menuModelExpoMix(uint8_t expo, uint8_t event)
displayGVar(MIX_LINE_CURVE_POS+3*FW, y, md->curveParam, -100, 100);
}
#endif
if (md->swtch) putsSwitches(MIX_LINE_SWITCH_POS, y, md->swtch);
if (md->swtch) {
putsSwitches(MIX_LINE_SWITCH_POS, y, md->swtch);
}
char cs = ' ';
if (md->speedDown || md->speedUp)
@ -4409,7 +4415,7 @@ void menuModelLogicalSwitchOne(uint8_t event)
void menuModelLogicalSwitches(uint8_t event)
{
SIMPLE_MENU(STR_MENULOGICALSWITCHES, menuTabModel, e_LogicalSwitches, NUM_CSW+1);
SIMPLE_MENU(STR_MENULOGICALSWITCHES, menuTabModel, e_LogicalSwitches, NUM_LOGICAL_SWITCH+1);
uint8_t y = 0;
uint8_t k = 0;
@ -4527,7 +4533,7 @@ void menuModelLogicalSwitches(uint8_t event)
{
INCDEC_DECLARE_VARS();
MENU(STR_MENULOGICALSWITCHES, menuTabModel, e_LogicalSwitches, NUM_CSW+1, {0, NAVIGATION_LINE_BY_LINE|LS_FIELD_LAST/*repeated...*/});
MENU(STR_MENULOGICALSWITCHES, menuTabModel, e_LogicalSwitches, NUM_LOGICAL_SWITCH+1, {0, NAVIGATION_LINE_BY_LINE|LS_FIELD_LAST/*repeated...*/});
uint8_t y = 0;
uint8_t k = 0;

View file

@ -1372,7 +1372,7 @@ bool isSourceAvailable(int source)
return false;
}
if (source>=MIXSRC_SW1 && source<=MIXSRC_LAST_CSW) {
if (source>=MIXSRC_SW1 && source<=MIXSRC_LAST_LOGICAL_SWITCH) {
LogicalSwitchData * cs = cswAddress(source-MIXSRC_SW1);
return (cs->func != LS_FUNC_NONE);
}
@ -1421,7 +1421,7 @@ bool isInputSourceAvailable(int source)
if (source>=MIXSRC_FIRST_CH && source<=MIXSRC_LAST_CH)
return true;
if (source>=MIXSRC_FIRST_PPM && source<=MIXSRC_LAST_PPM)
if (source>=MIXSRC_FIRST_TRAINER && source<=MIXSRC_LAST_TRAINER)
return true;
if (source>=MIXSRC_FIRST_TELEM && source<=MIXSRC_LAST_TELEM)

View file

@ -58,7 +58,7 @@
#define TIMER2_Y 45
#define TIMERS_R 193
#define REBOOT_X (LCD_W-FW)
#define VSWITCH_X(i) (((i>=NUM_CSW*3/4) ? BITMAP_X+28 : ((i>=NUM_CSW/2) ? BITMAP_X+25 : ((i>=NUM_CSW/4) ? 21 : 18))) + 3*i)
#define VSWITCH_X(i) (((i>=NUM_LOGICAL_SWITCH*3/4) ? BITMAP_X+28 : ((i>=NUM_LOGICAL_SWITCH/2) ? BITMAP_X+25 : ((i>=NUM_LOGICAL_SWITCH/4) ? 21 : 18))) + 3*i)
#define VSWITCH_Y (LCD_H-9)
#define BAR_HEIGHT (31-9)
#define TRIM_LH_X (32+9)
@ -802,23 +802,23 @@ void menuMainView(uint8_t event)
// Custom Switches
#if defined(PCBSKY9X)
for (uint8_t i=0; i<NUM_CSW; i++) {
for (uint8_t i=0; i<NUM_LOGICAL_SWITCH; i++) {
int8_t len = getSwitch(SWSRC_SW1+i) ? BAR_HEIGHT : 1;
uint8_t x = VSWITCH_X(i);
lcd_vline(x-1, VSWITCH_Y-len, len);
lcd_vline(x, VSWITCH_Y-len, len);
}
#elif defined(PCBGRUVIN9X) && ROTARY_ENCODERS > 2
for (uint8_t i=0; i<NUM_CSW; i++)
for (uint8_t i=0; i<NUM_LOGICAL_SWITCH; i++)
putsSwitches(2*FW-2 + (i/3)*(4*FW-2) + (i/3>1 ? 3*FW+6 : 0), 4*FH+1 + (i%3)*FH, SWSRC_SW1+i, getSwitch(SWSRC_SW1+i) ? INVERS : 0);
#elif defined(PCBGRUVIN9X)
for (uint8_t i=0; i<NUM_CSW; i++)
for (uint8_t i=0; i<NUM_LOGICAL_SWITCH; i++)
putsSwitches(2*FW-2 + (i/3)*(4*FW-2) + (i/3>1 ? 3*FW : 0), 4*FH+1 + (i%3)*FH, SWSRC_SW1+i, getSwitch(SWSRC_SW1+i) ? INVERS : 0);
#elif !defined(PCBSTD)
for (uint8_t i=0; i<NUM_CSW; i++)
for (uint8_t i=0; i<NUM_LOGICAL_SWITCH; i++)
putsSwitches(2*FW-2 + (i/3)*(4*FW-1), 4*FH+1 + (i%3)*FH, SWSRC_SW1+i, getSwitch(SWSRC_SW1+i) ? INVERS : 0);
#else
for (uint8_t i=0; i<NUM_CSW; i++)
for (uint8_t i=0; i<NUM_LOGICAL_SWITCH; i++)
putsSwitches(2*FW-2 + (i/3)*(5*FW), 4*FH+1 + (i%3)*FH, SWSRC_SW1+i, getSwitch(SWSRC_SW1+i) ? INVERS : 0);
#endif
}

View file

@ -958,16 +958,16 @@ void putsMixerSource(xcoord_t x, uint8_t y, uint8_t idx, LcdFlags att)
#if defined(PCBTARANIS)
else if (idx < MIXSRC_SW1)
lcd_putsiAtt(x, y, STR_VSRCRAW, idx-MIXSRC_Rud+1, att);
else if (idx <= MIXSRC_LAST_CSW)
else if (idx <= MIXSRC_LAST_LOGICAL_SWITCH)
putsSwitches(x, y, SWSRC_SW1+idx-MIXSRC_SW1, att);
#else
if (idx < MIXSRC_THR)
lcd_putsiAtt(x, y, STR_VSRCRAW, idx, att);
else if (idx < MIXSRC_FIRST_PPM)
else if (idx < MIXSRC_FIRST_TRAINER)
putsSwitches(x, y, idx-MIXSRC_THR+1+3*(1/*+EXTRA_3POS*/), att);
#endif
else if (idx < MIXSRC_CH1)
putsStrIdx(x, y, STR_PPM, idx-MIXSRC_FIRST_PPM+1, att);
putsStrIdx(x, y, STR_PPM_TRAINER, idx-MIXSRC_FIRST_TRAINER+1, att);
else if (idx <= MIXSRC_LAST_CH) {
putsStrIdx(x, y, STR_CH, idx-MIXSRC_CH1+1, att);
#if defined(PCBTARANIS)
@ -1036,12 +1036,12 @@ void putsCurveRef(xcoord_t x, uint8_t y, CurveRef &curve, LcdFlags att)
switch (curve.type) {
case CURVE_REF_DIFF:
lcd_putcAtt(x, y, 'D', att);
lcd_outdezAtt(x+FW, y, curve.value, LEFT|att);
GVAR_MENU_ITEM(x+FW, y, curve.value, -100, 100, LEFT|att, 0, 0);
break;
case CURVE_REF_EXPO:
lcd_putcAtt(x, y, 'E', att);
lcd_outdezAtt(x+FW, y, curve.value, LEFT|att);
GVAR_MENU_ITEM(x+FW, y, curve.value, -100, 100, LEFT|att, 0, 0);
break;
case CURVE_REF_FUNC:

View file

@ -517,7 +517,7 @@ static int luaModelDeleteMix(lua_State *L)
static int luaModelGetLogicalSwitch(lua_State *L)
{
int idx = luaL_checkunsigned(L, 1);
if (idx < NUM_CSW) {
if (idx < NUM_LOGICAL_SWITCH) {
LogicalSwitchData * sw = cswAddress(idx);
lua_newtable(L);
lua_pushtablenumber(L, "function", sw->func);
@ -537,7 +537,7 @@ static int luaModelGetLogicalSwitch(lua_State *L)
static int luaModelSetLogicalSwitch(lua_State *L)
{
int idx = luaL_checkunsigned(L, 1);
if (idx < NUM_CSW) {
if (idx < NUM_LOGICAL_SWITCH) {
LogicalSwitchData * sw = cswAddress(idx);
luaL_checktype(L, -1, LUA_TTABLE);
for (lua_pushnil(L); lua_next(L, -2); lua_pop(L, 1)) {

View file

@ -73,11 +73,11 @@
#define MAX_PHASES 9
#define MAX_MIXERS 64
#define MAX_EXPOS 64
#define NUM_CSW 32 // number of custom switches
#define NUM_LOGICAL_SWITCH 32 // number of custom switches
#define NUM_CFN 64 // number of functions assigned to switches
#define MAX_SCRIPTS 7
#define MAX_INPUTS 32
#define NUM_PPM 16
#define NUM_TRAINER 16
#define NUM_POTS 5
#define NUM_XPOTS 3
#elif defined(CPUARM)
@ -86,9 +86,9 @@
#define MAX_PHASES 9
#define MAX_MIXERS 64
#define MAX_EXPOS 32
#define NUM_CSW 32 // number of custom switches
#define NUM_LOGICAL_SWITCH 32 // number of custom switches
#define NUM_CFN 64 // number of functions assigned to switches
#define NUM_PPM 16
#define NUM_TRAINER 16
#define NUM_POTS 3
#define NUM_XPOTS 0
#elif defined(CPUM2560) || defined(CPUM2561)
@ -97,9 +97,9 @@
#define MAX_PHASES 6
#define MAX_MIXERS 32
#define MAX_EXPOS 16
#define NUM_CSW 15 // number of custom switches
#define NUM_LOGICAL_SWITCH 15 // number of custom switches
#define NUM_CFN 24 // number of functions assigned to switches
#define NUM_PPM 8
#define NUM_TRAINER 8
#define NUM_POTS 3
#define NUM_XPOTS 0
#elif defined(CPUM128)
@ -108,9 +108,9 @@
#define MAX_PHASES 5
#define MAX_MIXERS 32
#define MAX_EXPOS 14
#define NUM_CSW 15 // number of custom switches
#define NUM_LOGICAL_SWITCH 15 // number of custom switches
#define NUM_CFN 24 // number of functions assigned to switches
#define NUM_PPM 8
#define NUM_TRAINER 8
#define NUM_POTS 3
#define NUM_XPOTS 0
#else
@ -119,9 +119,9 @@
#define MAX_PHASES 5
#define MAX_MIXERS 32
#define MAX_EXPOS 14
#define NUM_CSW 12 // number of custom switches
#define NUM_LOGICAL_SWITCH 12 // number of custom switches
#define NUM_CFN 16 // number of functions assigned to switches
#define NUM_PPM 8
#define NUM_TRAINER 8
#define NUM_POTS 3
#define NUM_XPOTS 0
#endif
@ -1351,7 +1351,7 @@ enum SwitchSources {
SWSRC_SWA,
SWSRC_SWB,
SWSRC_SWC,
SWSRC_LAST_CSW = SWSRC_SW1+NUM_CSW-1,
SWSRC_LAST_CSW = SWSRC_SW1+NUM_LOGICAL_SWITCH-1,
SWSRC_ON,
SWSRC_OFF = -SWSRC_ON,
@ -1444,16 +1444,16 @@ enum MixSources {
MIXSRC_GEA,
MIXSRC_TRN,
#endif
MIXSRC_FIRST_CSW,
MIXSRC_SW1 = MIXSRC_FIRST_CSW,
MIXSRC_FIRST_LOGICAL_SWITCH,
MIXSRC_SW1 = MIXSRC_FIRST_LOGICAL_SWITCH,
MIXSRC_SW9 = MIXSRC_SW1 + 8,
MIXSRC_SWA,
MIXSRC_SWB,
MIXSRC_SWC,
MIXSRC_LAST_CSW = MIXSRC_FIRST_CSW+NUM_CSW-1,
MIXSRC_LAST_LOGICAL_SWITCH = MIXSRC_FIRST_LOGICAL_SWITCH+NUM_LOGICAL_SWITCH-1,
MIXSRC_FIRST_PPM,
MIXSRC_LAST_PPM = MIXSRC_FIRST_PPM+NUM_PPM-1,
MIXSRC_FIRST_TRAINER,
MIXSRC_LAST_TRAINER = MIXSRC_FIRST_TRAINER+NUM_TRAINER-1,
MIXSRC_FIRST_CH,
MIXSRC_CH1 = MIXSRC_FIRST_CH,
@ -1645,7 +1645,7 @@ PACK(typedef struct t_ModelData {
CURVDATA curves[MAX_CURVES];
int8_t points[NUM_POINTS];
LogicalSwitchData customSw[NUM_CSW];
LogicalSwitchData customSw[NUM_LOGICAL_SWITCH];
CustomFnData funcSw[NUM_CFN];
SwashRingData swashR;
PhaseData phaseData[MAX_PHASES];

View file

@ -1248,7 +1248,7 @@ getvalue_t getValue(uint8_t i)
else if (i==MIXSRC_SF) return (switchState(SW_SF0) ? -1024 : 1024);
else if (i==MIXSRC_SG) return (switchState(SW_SG0) ? -1024 : (switchState(SW_SG1) ? 0 : 1024));
else if (i==MIXSRC_SH) return (switchState(SW_SH0) ? -1024 : 1024);
else if (i<=MIXSRC_LAST_CSW) return getSwitch(SWSRC_FIRST_CSW+i-MIXSRC_FIRST_CSW) ? 1024 : -1024;
else if (i<=MIXSRC_LAST_LOGICAL_SWITCH) return getSwitch(SWSRC_FIRST_CSW+i-MIXSRC_FIRST_LOGICAL_SWITCH) ? 1024 : -1024;
#else
else if (i==MIXSRC_3POS) return (getSwitch(SW_ID0-SW_BASE+1) ? -1024 : (getSwitch(SW_ID1-SW_BASE+1) ? 0 : 1024));
// don't use switchState directly to give getSwitch possibility to hack values if needed for switch warning
@ -1256,10 +1256,10 @@ getvalue_t getValue(uint8_t i)
else if (i==MIXSRC_3POS2) return (getSwitch(SW_ID3-SW_BASE+1) ? -1024 : (getSwitch(SW_ID4-SW_BASE+1) ? 0 : 1024));
// don't use switchState directly to give getSwitch possibility to hack values if needed for switch warning
#endif
else if (i<=MIXSRC_LAST_CSW) return getSwitch(SWSRC_THR+i-MIXSRC_THR) ? 1024 : -1024;
else if (i<=MIXSRC_LAST_LOGICAL_SWITCH) return getSwitch(SWSRC_THR+i-MIXSRC_THR) ? 1024 : -1024;
#endif
else if (i<=MIXSRC_LAST_PPM) { int16_t x = g_ppmIns[i-MIXSRC_FIRST_PPM]; if (i<MIXSRC_FIRST_PPM+NUM_CAL_PPM) { x-= g_eeGeneral.trainer.calib[i-MIXSRC_FIRST_PPM]; } return x*2; }
else if (i<=MIXSRC_LAST_TRAINER) { int16_t x = g_ppmIns[i-MIXSRC_FIRST_TRAINER]; if (i<MIXSRC_FIRST_TRAINER+NUM_CAL_PPM) { x-= g_eeGeneral.trainer.calib[i-MIXSRC_FIRST_TRAINER]; } return x*2; }
else if (i<=MIXSRC_LAST_CH) return ex_chans[i-MIXSRC_CH1];
#if defined(GVARS)
@ -1319,9 +1319,9 @@ volatile GETSWITCH_RECURSIVE_TYPE s_last_switch_used = 0;
volatile GETSWITCH_RECURSIVE_TYPE s_last_switch_value = 0;
#if defined(CPUARM)
uint32_t cswDelays[NUM_CSW];
uint32_t cswDurations[NUM_CSW];
uint8_t cswStates[NUM_CSW];
uint32_t cswDelays[NUM_LOGICAL_SWITCH];
uint32_t cswDurations[NUM_LOGICAL_SWITCH];
uint8_t cswStates[NUM_LOGICAL_SWITCH];
#endif
#if defined(PCBTARANIS)
@ -1430,7 +1430,7 @@ void getSwitchesPosition(bool startup)
#define SWITCH_POSITION(idx) switchState((EnumKeys)(SW_BASE+(idx)))
#endif
int16_t csLastValue[NUM_CSW];
int16_t csLastValue[NUM_LOGICAL_SWITCH];
#define CS_LAST_VALUE_INIT -32768
/* recursive function. stack as of today (16/03/2012) grows by 8bytes at each call, which is ok! */
@ -2998,7 +2998,7 @@ void resetAll()
#if defined(FRSKY)
resetTelemetry();
#endif
for (uint8_t i=0; i<NUM_CSW; i++) {
for (uint8_t i=0; i<NUM_LOGICAL_SWITCH; i++) {
csLastValue[i] = CS_LAST_VALUE_INIT;
}
@ -4312,7 +4312,7 @@ void doMixerCalculations()
s_cnt_100ms -= 10;
s_cnt_1s += 1;
for (uint8_t i=0; i<NUM_CSW; i++) {
for (uint8_t i=0; i<NUM_LOGICAL_SWITCH; i++) {
LogicalSwitchData * cs = cswAddress(i);
if (cs->func == LS_FUNC_TIMER) {
int16_t *lastValue = &csLastValue[i];
@ -4953,7 +4953,7 @@ void perMain()
}
}
int16_t g_ppmIns[NUM_PPM];
int16_t g_ppmIns[NUM_TRAINER];
uint8_t ppmInState = 0; // 0=unsync 1..8= wait for value i-1
#if !defined(SIMU) && !defined(CPUARM)

View file

@ -774,7 +774,7 @@ extern uint8_t trimsCheckTimer;
extern volatile GETSWITCH_RECURSIVE_TYPE s_last_switch_used;
extern volatile GETSWITCH_RECURSIVE_TYPE s_last_switch_value;
extern int16_t csLastValue[NUM_CSW];
extern int16_t csLastValue[NUM_LOGICAL_SWITCH];
#define CS_LAST_VALUE_INIT -32768
#define TMR_OFF 0
@ -1011,7 +1011,7 @@ extern uint8_t g_beepCnt;
extern uint8_t g_beepVal[5];
extern uint8_t ppmInState; //0=unsync 1..8= wait for value i-1
extern int16_t g_ppmIns[NUM_PPM];
extern int16_t g_ppmIns[NUM_TRAINER];
extern int32_t chans[NUM_CHNOUT];
extern int16_t ex_chans[NUM_CHNOUT]; // Outputs (before LIMITS) of the last perMain
extern int16_t channelOutputs[NUM_CHNOUT];

View file

@ -259,7 +259,7 @@ const pm_char STR_TMR1JITTERUS[] PROGMEM = TR_TMR1JITTERUS;
const pm_char STR_TMIXMAXMS[] PROGMEM = TR_TMIXMAXMS;
const pm_char STR_FREESTACKMINB[] PROGMEM = TR_FREESTACKMINB;
const pm_char STR_MENUTORESET[] PROGMEM = TR_MENUTORESET;
const pm_char STR_PPM[] PROGMEM = TR_PPM;
const pm_char STR_PPM_TRAINER[] PROGMEM = TR_PPM_TRAINER;
const pm_char STR_CH[] PROGMEM = TR_CH;
const pm_char STR_MODEL[] PROGMEM = TR_MODEL;
const pm_char STR_FP[] PROGMEM = TR_FP;

View file

@ -420,7 +420,7 @@ extern const pm_char STR_TMR1JITTERUS[];
extern const pm_char STR_TMIXMAXMS[];
extern const pm_char STR_FREESTACKMINB[];
extern const pm_char STR_MENUTORESET[];
extern const pm_char STR_PPM[];
extern const pm_char STR_PPM_TRAINER[];
extern const pm_char STR_CH[];
extern const pm_char STR_MODEL[];
extern const pm_char STR_FP[];

View file

@ -377,11 +377,11 @@
#endif
#if defined(CPUARM)
#define TR_LOGICALSW "LS1""LS2""LS3""LS4""LS5""LS6""LS7""LS8""LS9""LSA""LSB""LSC""LSD""LSE""LSF""LSG""LSH""LSI""LSJ""LSK""LSL""LSM""LSN""LSO""LSP""LSQ""LSR""LSS""LST""LSU""LSV""LSW"
#define TR_LOGICALSW "L1\0""L2\0""L3\0""L4\0""L5\0""L6\0""L7\0""L8\0""L9\0""L10""L11""L12""L13""L14""L15""L16""L17""L18""L19""L20""L21""L22""L23""L24""L25""L26""L27""L28""L29""L30""L31""L32"
#elif defined(PCBGRUVIN9X) || defined(CPUM2561) || defined(CPUM128)
#define TR_LOGICALSW "LS1""LS2""LS3""LS4""LS5""LS6""LS7""LS8""LS9""LSA""LSB""LSC""LSD""LSE""LSF"
#define TR_LOGICALSW "L1\0""L2\0""L3\0""L4\0""L5\0""L6\0""L7\0""L8\0""L9\0""L10""L11""L12""L13""L14""L15"
#else
#define TR_LOGICALSW "LS1""LS2""LS3""LS4""LS5""LS6""LS7""LS8""LS9""LSA""LSB""LSC"
#define TR_LOGICALSW "L1\0""L2\0""L3\0""L4\0""L5\0""L6\0""L7\0""L8\0""L9\0""L10""L11""L12"
#endif
#define TR_TRIMS_SWITCHES "tSl""tSp""tVd""tVn""tPd""tPn""tKl""tKp"
@ -575,7 +575,7 @@
#endif
#define TR_MENUTORESET CENTER TR_ENTER" >> Reset"
#define TR_PPM "PPM"
#define TR_PPM_TRAINER "TR"
#define TR_CH "CH"
#define TR_MODEL "MODEL"
#define TR_FP "LR"

View file

@ -377,11 +377,11 @@
#endif
#if defined(CPUARM)
#define TR_LOGICALSW "LS1""LS2""LS3""LS4""LS5""LS6""LS7""LS8""LS9""LSA""LSB""LSC""LSD""LSE""LSF""LSG""LSH""LSI""LSJ""LSK""LSL""LSM""LSN""LSO""LSP""LSQ""LSR""LSS""LST""LSU""LSV""LSW"
#define TR_LOGICALSW "L1\0""L2\0""L3\0""L4\0""L5\0""L6\0""L7\0""L8\0""L9\0""L10""L11""L12""L13""L14""L15""L16""L17""L18""L19""L20""L21""L22""L23""L24""L25""L26""L27""L28""L29""L30""L31""L32"
#elif defined(PCBGRUVIN9X) || defined(CPUM2561) || defined(CPUM128)
#define TR_LOGICALSW "LS1""LS2""LS3""LS4""LS5""LS6""LS7""LS8""LS9""LSA""LSB""LSC""LSD""LSE""LSF"
#define TR_LOGICALSW "L1\0""L2\0""L3\0""L4\0""L5\0""L6\0""L7\0""L8\0""L9\0""L10""L11""L12""L13""L14""L15"
#else
#define TR_LOGICALSW "LS1""LS2""LS3""LS4""LS5""LS6""LS7""LS8""LS9""LSA""LSB""LSC"
#define TR_LOGICALSW "L1\0""L2\0""L3\0""L4\0""L5\0""L6\0""L7\0""L8\0""L9\0""L10""L11""L12"
#endif
#define TR_TRIMS_SWITCHES "tSl""tSr""tHd""tHu""tGd""tGu""tQl""tQr"
@ -575,7 +575,7 @@
#endif
#define TR_MENUTORESET CENTER TR_ENTER" für Reset"
#define TR_PPM "PPM"
#define TR_PPM_TRAINER "TR"
#define TR_CH "CH"
#define TR_MODEL "MODELL"
#define TR_FP "FP"

View file

@ -377,11 +377,11 @@
#endif
#if defined(CPUARM)
#define TR_LOGICALSW "LS1""LS2""LS3""LS4""LS5""LS6""LS7""LS8""LS9""LSA""LSB""LSC""LSD""LSE""LSF""LSG""LSH""LSI""LSJ""LSK""LSL""LSM""LSN""LSO""LSP""LSQ""LSR""LSS""LST""LSU""LSV""LSW"
#define TR_LOGICALSW "L1\0""L2\0""L3\0""L4\0""L5\0""L6\0""L7\0""L8\0""L9\0""L10""L11""L12""L13""L14""L15""L16""L17""L18""L19""L20""L21""L22""L23""L24""L25""L26""L27""L28""L29""L30""L31""L32"
#elif defined(PCBGRUVIN9X) || defined(CPUM2561) || defined(CPUM128)
#define TR_LOGICALSW "LS1""LS2""LS3""LS4""LS5""LS6""LS7""LS8""LS9""LSA""LSB""LSC""LSD""LSE""LSF"
#define TR_LOGICALSW "L1\0""L2\0""L3\0""L4\0""L5\0""L6\0""L7\0""L8\0""L9\0""L10""L11""L12""L13""L14""L15"
#else
#define TR_LOGICALSW "LS1""LS2""LS3""LS4""LS5""LS6""LS7""LS8""LS9""LSA""LSB""LSC"
#define TR_LOGICALSW "L1\0""L2\0""L3\0""L4\0""L5\0""L6\0""L7\0""L8\0""L9\0""L10""L11""L12"
#endif
#define TR_TRIMS_SWITCHES "tRl""tRr""tEd""tEu""tTd""tTu""tAl""tAr"
@ -575,7 +575,7 @@
#endif
#define TR_MENUTORESET CENTER TR_ENTER " to reset"
#define TR_PPM "PPM"
#define TR_PPM_TRAINER "TR"
#define TR_CH "CH"
#define TR_MODEL "MODEL"
#define TR_FP "FM"

View file

@ -575,7 +575,7 @@
#endif
#define TR_MENUTORESET CENTER TR_ENTER "Resetear"
#define TR_PPM "PPM"
#define TR_PPM_TRAINER "TR"
#define TR_CH "CH"
#define TR_MODEL "MODELO"
#define TR_FP "FM"

View file

@ -377,11 +377,11 @@
#endif
#if defined(CPUARM)
#define TR_LOGICALSW "LS1""LS2""LS3""LS4""LS5""LS6""LS7""LS8""LS9""LSA""LSB""LSC""LSD""LSE""LSF""LSG""LSH""LSI""LSJ""LSK""LSL""LSM""LSN""LSO""LSP""LSQ""LSR""LSS""LST""LSU""LSV""LSW"
#define TR_LOGICALSW "L1\0""L2\0""L3\0""L4\0""L5\0""L6\0""L7\0""L8\0""L9\0""L10""L11""L12""L13""L14""L15""L16""L17""L18""L19""L20""L21""L22""L23""L24""L25""L26""L27""L28""L29""L30""L31""L32"
#elif defined(PCBGRUVIN9X) || defined(CPUM2561) || defined(CPUM128)
#define TR_LOGICALSW "LS1""LS2""LS3""LS4""LS5""LS6""LS7""LS8""LS9""LSA""LSB""LSC""LSD""LSE""LSF"
#define TR_LOGICALSW "L1\0""L2\0""L3\0""L4\0""L5\0""L6\0""L7\0""L8\0""L9\0""L10""L11""L12""L13""L14""L15"
#else
#define TR_LOGICALSW "LS1""LS2""LS3""LS4""LS5""LS6""LS7""LS8""LS9""LSA""LSB""LSC"
#define TR_LOGICALSW "L1\0""L2\0""L3\0""L4\0""L5\0""L6\0""L7\0""L8\0""L9\0""L10""L11""L12"
#endif
#define TR_TRIMS_SWITCHES "tRl""tRr""tEd""tEu""tTd""tTu""tAl""tAr"
@ -575,7 +575,7 @@
#endif
#define TR_MENUTORESET CENTER TR_ENTER " to reset"
#define TR_PPM "PPM"
#define TR_PPM_TRAINER "TR"
#define TR_CH "CH"
#define TR_MODEL "MODEL"
#define TR_FP "FM"

View file

@ -575,7 +575,7 @@
#endif
#define TR_MENUTORESET CENTER TR_ENTER" pour reset"
#define TR_PPM "PPM"
#define TR_PPM_TRAINER "TR"
#define TR_CH "CH"
#define TR_MODEL "MODELE"
#define TR_FP "PV"

View file

@ -575,7 +575,7 @@
#endif
#define TR_MENUTORESET CENTER TR_ENTER" x Azzerare"
#define TR_PPM "PPM"
#define TR_PPM_TRAINER "TR"
#define TR_CH "CH"
#define TR_MODEL "MODELLO"
#define TR_FP "FV"

View file

@ -575,7 +575,7 @@
#endif
#define TR_MENUTORESET CENTER TR_ENTER" >> Reset"
#define TR_PPM "PPM"
#define TR_PPM_TRAINER "TR"
#define TR_CH "KN"
#define TR_MODEL "MODEL"
#define TR_FP "FL"

View file

@ -575,7 +575,7 @@
#endif
#define TR_MENUTORESET CENTER TR_ENTER" Reinicia"
#define TR_PPM "PPM"
#define TR_PPM_TRAINER "TR"
#define TR_CH "CH"
#define TR_MODEL "MODEL"
#define TR_FP "FP"

View file

@ -575,7 +575,7 @@
#endif
#define TR_MENUTORESET CENTER TR_ENTER " Nollar"
#define TR_PPM "PPM"
#define TR_PPM_TRAINER "TR"
#define TR_CH "KN"
#define TR_MODEL "Modell"
#define TR_FP "FL"