Merge pull request #3405 from opentx/kilrah/extratrims

[Horus] Extra trims support
This commit is contained in:
Bertrand Songis
2016-04-09 22:59:43 +02:00
30 changed files with 272 additions and 65 deletions
+5 -1
View File
@@ -135,7 +135,11 @@ enum FailsafeModes {
#define TRIM_RV_UP 5
#define TRIM_RH_L 6
#define TRIM_RH_R 7
#define TRIM_NONE 8
#define TRIM_T5_DN 8
#define TRIM_T5_UP 9
#define TRIM_T6_DN 10
#define TRIM_T6_UP 11
#define TRIM_NONE 12
// Beep center bits
#define BC_BIT_RUD (0x01)
@@ -141,7 +141,12 @@ void SimulatorDialogHorus::getValues()
trimPressed == TRIM_RV_DN,
trimPressed == TRIM_RV_UP,
trimPressed == TRIM_RH_L,
trimPressed == TRIM_RH_R
trimPressed == TRIM_RH_R,
0,0,0,0
/*trimPressed == TRIM_T5_DN,
trimPressed == TRIM_T5_UP,
trimPressed == TRIM_T6_DN,
trimPressed == TRIM_T6_UP*/
}
};
+1 -1
View File
@@ -37,7 +37,7 @@ for (int i=0; i<C9X_NUM_SWITCHES; i++)
simuSetSwitch(i, inputs.switches[i]);
for (int i=0; i<C9X_NUM_KEYS; i++)
simuSetKey(i, inputs.keys[i]);
for (int i=0; i<NUM_STICKS*2; i++)
for (int i=0; i<(NUM_STICKS+NUM_AUX_TRIMS)*2; i++)
simuSetTrim(i, inputs.trims[i]);
#ifdef PCBGRUVIN9X
@@ -39,7 +39,7 @@ struct TxInputs
int switches[C9X_NUM_SWITCHES];
bool keys[C9X_NUM_KEYS];
bool rotenc;
bool trims[8];
bool trims[12];
};
class TxOutputs