mirror of
https://github.com/opentx/opentx.git
synced 2025-07-23 16:25:16 +03:00
Issue #192 - Trims and Rotary encoders buttons added to the switches
list
This commit is contained in:
parent
46fe25fd24
commit
4a20329b2b
14 changed files with 178 additions and 108 deletions
|
@ -268,6 +268,10 @@ QString RawSwitch::toString()
|
|||
QObject::tr("S21"), QObject::tr("S22"), QObject::tr("S23"), QObject::tr("S24"), QObject::tr("S25"), QObject::tr("S26")
|
||||
};
|
||||
|
||||
static const QString rotaryEncoders[] = {
|
||||
QObject::tr("REa"), QObject::tr("REb")
|
||||
};
|
||||
|
||||
switch(type) {
|
||||
case SWITCH_TYPE_SWITCH:
|
||||
if (IS_TARANIS(GetEepromInterface()->getBoard()))
|
||||
|
@ -278,6 +282,8 @@ QString RawSwitch::toString()
|
|||
return index > 0 ? CHECK_IN_ARRAY(virtualSwitches, index-1) : QString("!") + CHECK_IN_ARRAY(virtualSwitches, -index-1);
|
||||
case SWITCH_TYPE_MULTIPOS_POT:
|
||||
return CHECK_IN_ARRAY(multiposPots, index);
|
||||
case SWITCH_TYPE_ROTARY_ENCODER:
|
||||
return CHECK_IN_ARRAY(rotaryEncoders, index);
|
||||
case SWITCH_TYPE_ON:
|
||||
return QObject::tr("ON");
|
||||
case SWITCH_TYPE_OFF:
|
||||
|
|
|
@ -318,6 +318,7 @@ enum RawSwitchType {
|
|||
SWITCH_TYPE_SWITCH,
|
||||
SWITCH_TYPE_VIRTUAL,
|
||||
SWITCH_TYPE_MULTIPOS_POT,
|
||||
SWITCH_TYPE_ROTARY_ENCODER,
|
||||
SWITCH_TYPE_ON,
|
||||
SWITCH_TYPE_OFF
|
||||
};
|
||||
|
|
|
@ -506,18 +506,22 @@ void populateSwitchCB(QComboBox *b, const RawSwitch & value, unsigned long attr,
|
|||
}
|
||||
}
|
||||
|
||||
for (int i=1; i<=GetEepromInterface()->getCapability(CustomSwitches); i++) {
|
||||
item = RawSwitch(SWITCH_TYPE_VIRTUAL, i);
|
||||
b->addItem(item.toString(), item.toValue());
|
||||
if (item == value) b->setCurrentIndex(b->count()-1);
|
||||
}
|
||||
|
||||
if (IS_TARANIS(GetEepromInterface()->getBoard())) {
|
||||
for (int i=0; i<GetEepromInterface()->getCapability(MultiposPots) * GetEepromInterface()->getCapability(MultiposPotsPositions); i++) {
|
||||
item = RawSwitch(SWITCH_TYPE_MULTIPOS_POT, i);
|
||||
b->addItem(item.toString(), item.toValue());
|
||||
if (item == value) b->setCurrentIndex(b->count()-1);
|
||||
}
|
||||
|
||||
for (int i=0; i<GetEepromInterface()->getCapability(RotaryEncoders); i++) {
|
||||
item = RawSwitch(SWITCH_TYPE_ROTARY_ENCODER, i);
|
||||
b->addItem(item.toString(), item.toValue());
|
||||
if (item == value) b->setCurrentIndex(b->count()-1);
|
||||
}
|
||||
|
||||
for (int i=1; i<=GetEepromInterface()->getCapability(CustomSwitches); i++) {
|
||||
item = RawSwitch(SWITCH_TYPE_VIRTUAL, i);
|
||||
b->addItem(item.toString(), item.toValue());
|
||||
if (item == value) b->setCurrentIndex(b->count()-1);
|
||||
}
|
||||
|
||||
if (attr & POPULATE_ONOFF) {
|
||||
|
|
|
@ -196,15 +196,18 @@ void ConvertGeneralSettings_215_to_216(EEGeneral &settings)
|
|||
#if defined(PCBTARANIS)
|
||||
int ConvertSwitch_215_to_216(int swtch)
|
||||
{
|
||||
if (swtch < SWSRC_ON)
|
||||
if (swtch <= SWSRC_LAST_SWITCH)
|
||||
return swtch;
|
||||
else
|
||||
return swtch + (2*6); // 2 * 6-pos pots added as switches
|
||||
return swtch + 4 + (2*6); // 4 trims and 2 * 6-pos added as switches
|
||||
}
|
||||
#else
|
||||
inline int ConvertSwitch_215_to_216(int swtch)
|
||||
{
|
||||
if (swtch <= SWSRC_LAST_SWITCH)
|
||||
return swtch;
|
||||
else
|
||||
return swtch + 4 + 1; // 4 trims and REa added
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -219,7 +222,7 @@ void ConvertModel_215_to_216(ModelData &model)
|
|||
// Custom Switches: better precision for x when A comes from telemetry
|
||||
// Main View: altitude in top bar
|
||||
// Mixes: GVARS in weight moved from 512 to 4096 and -512 to -4096, because GVARS may be used in limits [-1250:1250]
|
||||
// Switches: two 6-pos pots added
|
||||
// Switches: two 6-pos pots added, REa added to Sky9x
|
||||
|
||||
TRACE("Model conversion from v215 to v216");
|
||||
|
||||
|
|
|
@ -4483,7 +4483,7 @@ void menuModelCustomSwitches(uint8_t event)
|
|||
v1_min = SWSRC_OFF+1; v1_max = SWSRC_ON-1;
|
||||
v2_min = SWSRC_OFF+1; v2_max = SWSRC_ON-1;
|
||||
INCDEC_SET_FLAG(INCDEC_SWITCH);
|
||||
INCDEC_ENABLE_CHECK(NULL);
|
||||
INCDEC_ENABLE_CHECK(isSwitchAvailableInCustomSwitches);
|
||||
}
|
||||
else if (cstate == CS_VCOMP) {
|
||||
putsMixerSource(CSW_2ND_COLUMN, y, cs->v1, attr1);
|
||||
|
|
|
@ -1260,7 +1260,7 @@ bool isInputSourceAvailable(int16_t source)
|
|||
return false;
|
||||
}
|
||||
|
||||
bool isSwitchAvailable(int16_t swtch)
|
||||
bool isSwitchAvailableInCustomSwitches(int16_t swtch)
|
||||
{
|
||||
if (swtch < 0) {
|
||||
if (swtch <= -SWSRC_ON)
|
||||
|
@ -1286,6 +1286,15 @@ bool isSwitchAvailable(int16_t swtch)
|
|||
}
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool isSwitchAvailable(int16_t swtch)
|
||||
{
|
||||
if (!isSwitchAvailableInCustomSwitches(swtch)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (swtch >= SWSRC_FIRST_CSW && swtch <= SWSRC_LAST_CSW) {
|
||||
CustomSwData * cs = cswAddress(swtch-SWSRC_FIRST_CSW);
|
||||
return (cs->func != CS_OFF);
|
||||
|
@ -1293,4 +1302,6 @@ bool isSwitchAvailable(int16_t swtch)
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
@ -191,6 +191,7 @@ int8_t checkIncDecGen(uint8_t event, int8_t i_val, int8_t i_min, int8_t i_max);
|
|||
|
||||
#if defined(CPUARM)
|
||||
bool isSwitchAvailable(int16_t swtch);
|
||||
bool isSwitchAvailableInCustomSwitches(int16_t swtch);
|
||||
#define AUTOSWITCH_ENTER_LONG() (attr && event==EVT_KEY_LONG(KEY_ENTER))
|
||||
#define CHECK_INCDEC_MODELSWITCH(event, var, min, max) \
|
||||
var = checkIncDec(event,var,min,max,EE_MODEL|INCDEC_SWITCH|NO_INCDEC_MARKS, isSwitchAvailable)
|
||||
|
|
|
@ -1165,6 +1165,7 @@ enum SwitchSources {
|
|||
SWSRC_SG2,
|
||||
SWSRC_SH0,
|
||||
SWSRC_SH2,
|
||||
SWSRC_TRAINER = SWSRC_SH2,
|
||||
#else
|
||||
SWSRC_ID0 = SWSRC_FIRST_SWITCH,
|
||||
SWSRC_ID1,
|
||||
|
@ -1180,11 +1181,39 @@ enum SwitchSources {
|
|||
SWSRC_AIL,
|
||||
SWSRC_GEA,
|
||||
SWSRC_TRN,
|
||||
SWSRC_TRAINER = SWSRC_TRN,
|
||||
#endif
|
||||
|
||||
SWSRC_LAST_SWITCH = SWSRC_TRAINER,
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
SWSRC_P11,
|
||||
SWSRC_P16 = SWSRC_P11+5,
|
||||
SWSRC_P21,
|
||||
SWSRC_P26 = SWSRC_P21+5,
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
SWSRC_FIRST_TRIM,
|
||||
SWSRC_TrimRudLeft = SWSRC_FIRST_TRIM,
|
||||
SWSRC_TrimRudRight,
|
||||
SWSRC_TrimEleDown,
|
||||
SWSRC_TrimEleUp,
|
||||
SWSRC_TrimThrDown,
|
||||
SWSRC_TrimThrUp,
|
||||
SWSRC_TrimAilLeft,
|
||||
SWSRC_TrimAilRight,
|
||||
SWSRC_LAST_TRIM = SWSRC_TrimAilRight,
|
||||
#endif
|
||||
|
||||
#if defined(PCBSKY9X)
|
||||
SWSRC_REa,
|
||||
#elif defined(PCBGRUVIN9X) || defined(PCBMEGA2560)
|
||||
SWSRC_REa,
|
||||
SWSRC_REb,
|
||||
#endif
|
||||
|
||||
SWSRC_FIRST_CSW,
|
||||
SWSRC_LAST_SWITCH = SWSRC_FIRST_CSW-1,
|
||||
|
||||
SWSRC_SW1 = SWSRC_FIRST_CSW,
|
||||
SWSRC_SW2,
|
||||
SWSRC_SW3,
|
||||
|
@ -1199,18 +1228,9 @@ enum SwitchSources {
|
|||
SWSRC_SWC,
|
||||
SWSRC_LAST_CSW = SWSRC_SW1+NUM_CSW-1,
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
SWSRC_P11,
|
||||
SWSRC_P16 = SWSRC_P11+5,
|
||||
SWSRC_P21,
|
||||
SWSRC_P26 = SWSRC_P21+5,
|
||||
#endif
|
||||
|
||||
SWSRC_ON,
|
||||
SWSRC_OFF = -SWSRC_ON,
|
||||
|
||||
SWSRC_TRAINER = SWSRC_SW1-1,
|
||||
|
||||
SWSRC_FIRST = SWSRC_OFF,
|
||||
SWSRC_LAST = SWSRC_ON
|
||||
};
|
||||
|
|
|
@ -1386,9 +1386,24 @@ bool getSwitch(int8_t swtch)
|
|||
result = SWITCH_POSITION(cs_idx-SWSRC_FIRST_SWITCH);
|
||||
}
|
||||
#if defined(PCBTARANIS)
|
||||
else if (cs_idx >= SWSRC_P11 && cs_idx <= SWSRC_P26) {
|
||||
else if (cs_idx <= SWSRC_P26) {
|
||||
result = POT_POSITION(cs_idx-SWSRC_P11);
|
||||
}
|
||||
#endif
|
||||
#if defined(CPUARM)
|
||||
else if (cs_idx <= SWSRC_LAST_TRIM) {
|
||||
result = readTrims() & (1 << (cs_idx-SWSRC_FIRST_TRIM));
|
||||
}
|
||||
#endif
|
||||
#if ROTARY_ENCODERS > 0
|
||||
else if (cs_idx == SWSRC_REa) {
|
||||
result = REA_DOWN();
|
||||
}
|
||||
#endif
|
||||
#if ROTARY_ENCODERS > 1
|
||||
else if (cs_idx == SWSRC_REb) {
|
||||
result = REB_DOWN();
|
||||
}
|
||||
#endif
|
||||
else {
|
||||
cs_idx -= SWSRC_FIRST_CSW;
|
||||
|
@ -3072,8 +3087,9 @@ void evalFunctions()
|
|||
}
|
||||
|
||||
#if defined(GVARS)
|
||||
for (uint8_t i=0; i<NUM_STICKS; i++)
|
||||
for (uint8_t i=0; i<NUM_STICKS; i++) {
|
||||
trimGvar[i] = -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
for (uint8_t i=0; i<NUM_CFN; i++) {
|
||||
|
@ -4175,7 +4191,7 @@ void opentxClose()
|
|||
hapticOff();
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#if defined(CPUARM) && defined(FRSKY)
|
||||
if((g_model.frsky.mAhPersistent) && (g_model.frsky.storedMah != frskyData.hub.currentConsumption)) {
|
||||
g_model.frsky.storedMah = frskyData.hub.currentConsumption;
|
||||
eeDirty(EE_MODEL);
|
||||
|
|
|
@ -182,12 +182,6 @@ void pwrOff()
|
|||
#endif
|
||||
}
|
||||
|
||||
#if ROTARY_ENCODERS <= 2
|
||||
#define ROTENC_DOWN() ((~PIND & 0x20) || (~PIND & 0x10))
|
||||
#else
|
||||
#define ROTENC_DOWN() (0)
|
||||
#endif
|
||||
|
||||
FORCEINLINE uint8_t keyDown()
|
||||
{
|
||||
return ((~PINL) & 0x3F) || ROTENC_DOWN();
|
||||
|
@ -278,25 +272,24 @@ FORCEINLINE void readKeysAndTrims()
|
|||
|
||||
uint8_t enuk = KEY_MENU;
|
||||
|
||||
#if ROTARY_ENCODERS <= 2
|
||||
keys[BTN_REa].input(~PIND & 0x20, BTN_REa);
|
||||
#if defined(ROTARY_ENCODERS)
|
||||
keys[BTN_REa].input(REA_DOWN(), BTN_REa);
|
||||
keys[BTN_REb].input(REB_DOWN(), BTN_REb);
|
||||
#endif
|
||||
keys[BTN_REb].input(~PIND & 0x10, BTN_REb);
|
||||
|
||||
uint8_t tin = ~PINL;
|
||||
uint8_t in;
|
||||
in = (tin & 0x0f) << 3;
|
||||
in |= (tin & 0x30) >> 3;
|
||||
|
||||
for (int i=1; i<7; i++)
|
||||
{
|
||||
for (int i=1; i<7; i++) {
|
||||
//INP_B_KEY_MEN 1 .. INP_B_KEY_LFT 6
|
||||
keys[enuk].input(in & (1<<i),(EnumKeys)enuk);
|
||||
keys[enuk].input(in & (1<<i), (EnumKeys)enuk);
|
||||
++enuk;
|
||||
}
|
||||
|
||||
// Trim switches ...
|
||||
static const pm_uchar crossTrim[] PROGMEM ={
|
||||
static const pm_uchar crossTrim[] PROGMEM = {
|
||||
1<<INP_J_TRM_LH_DWN,
|
||||
1<<INP_J_TRM_LH_UP,
|
||||
1<<INP_J_TRM_LV_DWN,
|
||||
|
@ -311,7 +304,7 @@ FORCEINLINE void readKeysAndTrims()
|
|||
|
||||
for (int i=0; i<8; i++) {
|
||||
// INP_D_TRM_RH_UP 0 .. INP_D_TRM_LH_UP 7
|
||||
keys[enuk].input(in & pgm_read_byte(crossTrim+i),(EnumKeys)enuk);
|
||||
keys[enuk].input(in & pgm_read_byte(crossTrim+i), (EnumKeys)enuk);
|
||||
++enuk;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -100,63 +100,63 @@ void sdPoll10ms();
|
|||
#define IS_BACKLIGHT_ON() (PORTC & (1<<OUT_C_LIGHT))
|
||||
|
||||
|
||||
# define INP_L_SPARE6 7
|
||||
# define INP_L_SPARE5 6
|
||||
# define INP_L_KEY_EXT 5
|
||||
# define INP_L_KEY_MEN 4
|
||||
# define INP_L_KEY_LFT 3
|
||||
# define INP_L_KEY_RGT 2
|
||||
# define INP_L_KEY_UP 1
|
||||
# define INP_L_KEY_DWN 0
|
||||
#define INP_L_SPARE6 7
|
||||
#define INP_L_SPARE5 6
|
||||
#define INP_L_KEY_EXT 5
|
||||
#define INP_L_KEY_MEN 4
|
||||
#define INP_L_KEY_LFT 3
|
||||
#define INP_L_KEY_RGT 2
|
||||
#define INP_L_KEY_UP 1
|
||||
#define INP_L_KEY_DWN 0
|
||||
|
||||
# define INP_J_TRM_RH_UP 7
|
||||
# define INP_J_TRM_RH_DWN 6
|
||||
# define INP_J_TRM_RV_UP 5
|
||||
# define INP_J_TRM_RV_DWN 4
|
||||
# define INP_J_TRM_LV_UP 3
|
||||
# define INP_J_TRM_LV_DWN 2
|
||||
# define INP_J_TRM_LH_UP 1
|
||||
# define INP_J_TRM_LH_DWN 0
|
||||
#define INP_J_TRM_RH_UP 7
|
||||
#define INP_J_TRM_RH_DWN 6
|
||||
#define INP_J_TRM_RV_UP 5
|
||||
#define INP_J_TRM_RV_DWN 4
|
||||
#define INP_J_TRM_LV_UP 3
|
||||
#define INP_J_TRM_LV_DWN 2
|
||||
#define INP_J_TRM_LH_UP 1
|
||||
#define INP_J_TRM_LH_DWN 0
|
||||
|
||||
# define INP_E_PPM_IN 7
|
||||
# define INP_E_ROT_ENC_1_B 6
|
||||
# define INP_E_ROT_ENC_1_A 5
|
||||
# define INP_E_USB_D_PLS 4
|
||||
# define OUT_E_BUZZER 3
|
||||
# define INP_E_USB_D_NEG 2
|
||||
# define INP_E_TELEM_RX 1
|
||||
# define OUT_E_TELEM_TX 0
|
||||
#define INP_E_PPM_IN 7
|
||||
#define INP_E_ROT_ENC_1_B 6
|
||||
#define INP_E_ROT_ENC_1_A 5
|
||||
#define INP_E_USB_D_PLS 4
|
||||
#define OUT_E_BUZZER 3
|
||||
#define INP_E_USB_D_NEG 2
|
||||
#define INP_E_TELEM_RX 1
|
||||
#define OUT_E_TELEM_TX 0
|
||||
|
||||
# define OUT_D_HAPTIC 7
|
||||
# define INP_D_SPARE4 6
|
||||
# define INP_D_ROT_ENC_2_PUSH 5
|
||||
# define INP_D_ROT_ENC_1_PUSH 4
|
||||
# define OUT_D_ROT_ENC_2_B 3
|
||||
# define INP_D_ROT_ENC_2_A 2
|
||||
# define INP_D_I2C_SCL 1
|
||||
# define INP_D_I2C_SDA 0
|
||||
#define OUT_D_HAPTIC 7
|
||||
#define INP_D_SPARE4 6
|
||||
#define INP_D_ROT_ENC_2_PUSH 5
|
||||
#define INP_D_ROT_ENC_1_PUSH 4
|
||||
#define OUT_D_ROT_ENC_2_B 3
|
||||
#define INP_D_ROT_ENC_2_A 2
|
||||
#define INP_D_I2C_SCL 1
|
||||
#define INP_D_I2C_SDA 0
|
||||
|
||||
# define INP_G_Gear 5
|
||||
# define INP_G_ThrCt 2
|
||||
# define OUT_G_SIM_CTL 4 //1 : phone-jack=ppm_in
|
||||
# define INP_G_ID1 3
|
||||
# define INP_G_RF_POW 1
|
||||
# define INP_G_RuddDR 0
|
||||
#define INP_G_Gear 5
|
||||
#define INP_G_ThrCt 2
|
||||
#define OUT_G_SIM_CTL 4 //1 : phone-jack=ppm_in
|
||||
#define INP_G_ID1 3
|
||||
#define INP_G_RF_POW 1
|
||||
#define INP_G_RuddDR 0
|
||||
|
||||
# define INP_C_AileDR 7
|
||||
# define INP_C_ElevDR 6
|
||||
# define OUT_C_LIGHT 0
|
||||
#define INP_C_AileDR 7
|
||||
#define INP_C_ElevDR 6
|
||||
#define OUT_C_LIGHT 0
|
||||
|
||||
# define OUT_B_Speaker 7
|
||||
# define OUT_B_PPM 6 // will be switched by TCNT1==OCR1B in hardware
|
||||
# define INP_B_Trainer 5
|
||||
# define INP_B_ID2 4
|
||||
#define OUT_B_Speaker 7
|
||||
#define OUT_B_PPM 6 // will be switched by TCNT1==OCR1B in hardware
|
||||
#define INP_B_Trainer 5
|
||||
#define INP_B_ID2 4
|
||||
|
||||
#if defined(VOICE)
|
||||
# define OUT_H_14DRESET 3
|
||||
# define OUT_H_14DCLK 4
|
||||
# define OUT_H_14DDATA 5
|
||||
# define INP_H_14DBUSY 6
|
||||
#define OUT_H_14DRESET 3
|
||||
#define OUT_H_14DCLK 4
|
||||
#define OUT_H_14DDATA 5
|
||||
#define INP_H_14DBUSY 6
|
||||
#endif
|
||||
|
||||
// Keys driver
|
||||
|
@ -187,4 +187,14 @@ void pwrOff();
|
|||
// Haptic driver
|
||||
#define hapticOff() // TODO hapticOn() cleaner ...
|
||||
|
||||
// Rotary encoder driver
|
||||
#if ROTARY_ENCODERS <= 2
|
||||
#define REA_DOWN() (~PIND & 0x20)
|
||||
#define REB_DOWN() (~PIND & 0x10)
|
||||
#else
|
||||
#define REA_DOWN() (0)
|
||||
#define REB_DOWN() (0)
|
||||
#endif
|
||||
#define ROTENC_DOWN() (REA_DOWN() || REB_DOWN())
|
||||
|
||||
#endif
|
||||
|
|
|
@ -253,9 +253,9 @@ void rotencInit();
|
|||
void rotencEnd();
|
||||
|
||||
#if ROTARY_ENCODERS > 0
|
||||
#define rotencDown() (!(PIOB->PIO_PDSR & 0x40))
|
||||
#define REA_DOWN() (!(PIOB->PIO_PDSR & 0x40))
|
||||
#else
|
||||
#define rotencDown() 0
|
||||
#define REA_DOWN() (0)
|
||||
#endif
|
||||
|
||||
// Debug driver
|
||||
|
|
|
@ -115,7 +115,7 @@ uint32_t readTrims()
|
|||
|
||||
uint8_t keyDown()
|
||||
{
|
||||
return (~readKeys() & 0x7E) || rotencDown();
|
||||
return (~readKeys() & 0x7E) || REA_DOWN();
|
||||
}
|
||||
|
||||
void readKeysAndTrims()
|
||||
|
@ -123,7 +123,7 @@ void readKeysAndTrims()
|
|||
register uint32_t i;
|
||||
|
||||
#if ROTARY_ENCODERS > 0
|
||||
keys[BTN_REa].input(rotencDown(), BTN_REa);
|
||||
keys[BTN_REa].input(REA_DOWN(), BTN_REa);
|
||||
#endif
|
||||
|
||||
uint8_t enuk = KEY_MENU;
|
||||
|
|
|
@ -338,21 +338,26 @@
|
|||
#define TR_CUSTOMSW "CS1""CS2""CS3""CS4""CS5""CS6""CS7""CS8""CS9""CSA""CSB""CSC"
|
||||
#endif
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26"
|
||||
#define TR_VSWITCHES "SA\300""SA-""SA\301""SB\300""SB-""SB\301""SC\300""SC-""SC\301""SD\300""SD-""SD\301""SE\300""SE-""SE\301""SF\300""SF\301""SG\300""SG-""SG\301""SH\300""SH\301" TR_CUSTOMSW TR_6POS_POTS
|
||||
#else
|
||||
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_CUSTOMSW
|
||||
#endif
|
||||
#define TR_TRIMS_SWITCHES "tRl""tRr""tEd""tEu""tTd""tTu""tAl""tAr"
|
||||
|
||||
#if defined(PCBSKY9X)
|
||||
#define TR_ROTARY_ENCODERS_VSRCRAW "REnc"
|
||||
#elif defined(PCBGRUVIN9X) && ROTARY_ENCODERS > 2
|
||||
#define TR_ROTARY_ENCODERS_VSRCRAW "REa ""REb ""REc ""REd "
|
||||
#elif defined(PCBGRUVIN9X) && ROTARY_ENCODERS <= 2
|
||||
#define TR_ROTARY_ENCODERS_VSRCRAW "REa ""REb "
|
||||
#define TR_ROTARY_ENCODERS "REa\0"
|
||||
#define TR_ROTENC_SWITCHES "REa"
|
||||
#elif defined(PCBGRUVIN9X) || defined(PCBMEGA2560)
|
||||
#define TR_ROTARY_ENCODERS "REa\0""REb\0"
|
||||
#define TR_ROTENC_SWITCHES "REa""REb"
|
||||
#else
|
||||
#define TR_ROTARY_ENCODERS_VSRCRAW
|
||||
#define TR_ROTARY_ENCODERS
|
||||
#define TR_ROTENC_SWITCHES
|
||||
#endif
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26"
|
||||
#define TR_VSWITCHES "SA\300""SA-""SA\301""SB\300""SB-""SB\301""SC\300""SC-""SC\301""SD\300""SD-""SD\301""SE\300""SE-""SE\301""SF\300""SF\301""SG\300""SG-""SG\301""SH\300""SH\301" TR_6POS_POTS TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_CUSTOMSW
|
||||
#elif defined(CPUARM)
|
||||
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_CUSTOMSW
|
||||
#else
|
||||
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_ROTENC_SWITCHES TR_CUSTOMSW
|
||||
#endif
|
||||
|
||||
#if defined(HELI)
|
||||
|
@ -361,7 +366,7 @@
|
|||
#define TR_CYC_VSRCRAW "[C1]""[C2]""[C3]"
|
||||
#endif
|
||||
|
||||
#define TR_VSRCRAW "---\0""Rud\0""Ele\0""Thr\0""Ail\0" TR_POTS_VSRCRAW TR_ROTARY_ENCODERS_VSRCRAW "MAX\0" TR_CYC_VSRCRAW "TrmR" "TrmE" "TrmT" "TrmA" TR_SW_VSRCRAW
|
||||
#define TR_VSRCRAW "---\0""Rud\0""Ele\0""Thr\0""Ail\0" TR_POTS_VSRCRAW TR_ROTARY_ENCODERS "MAX\0" TR_CYC_VSRCRAW "TrmR" "TrmE" "TrmT" "TrmA" TR_SW_VSRCRAW
|
||||
|
||||
#define LEN_VTMRMODES "\003"
|
||||
#define TR_VTMRMODES "OFF""ABS""THs""TH%""THt"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue