Function keys now allow trainer for each stick

This commit is contained in:
bsongis
2011-09-16 19:53:01 +00:00
parent b228f1397b
commit 46b340a06b
3 changed files with 9 additions and 5 deletions
+1 -1
View File
@@ -1169,7 +1169,7 @@ uint8_t evalSticks()
if (i < NUM_STICKS) { //only do this for sticks
if (!s_noStickInputs && isFunctionActive(FUNC_TRAINER)) {
if (!s_noStickInputs && (isFunctionActive(FUNC_TRAINER) || isFunctionActive(FUNC_TRAINER_RUD+i))) {
// trainer mode
TrainerMix* td = &g_eeGeneral.trainer.mix[i];
if (td->mode) {
+1 -1
View File
@@ -325,7 +325,7 @@ enum EnumKeys {
#define CSWITCH_STR "---- v>ofs v<ofs |v|>ofs|v|<ofsAND OR XOR ""v1==v2 ""v1!=v2 ""v1>v2 ""v1<v2 ""v1>=v2 ""v1<=v2 "
#define CSW_LEN_FUNC 7
#define FSWITCH_STR "---- ""Trainer ""Instant Trim ""Telemetry View"
#define FSWITCH_STR "---- ""Trainer ""Trainer RUD ""Trainer ELE ""Trainer THR ""Trainer AIL ""Instant Trim ""Telemetry View"
#define FSW_LEN_FUNC 14
#define SWASH_TYPE_STR "--- ""120 ""120X ""140 ""90 "
+7 -3
View File
@@ -153,9 +153,13 @@ typedef struct t_SafetySwData { // Safety Switches data
} __attribute__((packed)) SafetySwData;
#define FUNC_TRAINER 1
#define FUNC_INSTANT_TRIM 2
#define FUNC_VIEW_TELEMETRY 3
#define FUNC_LAST 3
#define FUNC_TRAINER_RUD 2
#define FUNC_TRAINER_ELE 3
#define FUNC_TRAINER_THR 4
#define FUNC_TRAINER_AIL 5
#define FUNC_INSTANT_TRIM 6
#define FUNC_VIEW_TELEMETRY 7
#define FUNC_LAST 7
typedef struct t_FuncSwData { // Function Switches data
int8_t swtch; //input