In combination with TX16S & FLYSKY HALL GIMBAL - enable the right joystick two analogs as EX3 and EX4.

At the same time disable PWM Sticks on TX16S.
This commit is contained in:
rotorman
2021-09-11 19:40:05 +02:00
parent 3778ed26dd
commit 17325ae30b
5 changed files with 75 additions and 18 deletions
+24 -4
View File
@@ -335,7 +335,11 @@ void watchdogInit(unsigned int duration);
// ADC driver
#if defined(PCBX10)
#define NUM_POTS 5
#if defined(RADIO_TX16S) && defined(FLYSKY_HALL_STICKS)
#define NUM_POTS 7
#else
#define NUM_POTS 5
#endif
#else
#define NUM_POTS 3
#endif
@@ -345,7 +349,11 @@ void watchdogInit(unsigned int duration);
#if defined(PCBX10)
#define NUM_SLIDERS 2
#define NUM_PWMSTICKS 4
#if defined(RADIO_TX16S)
#define NUM_PWMSTICKS 0
#else
#define NUM_PWMSTICKS 4
#endif
#else
#define NUM_SLIDERS 4
#define NUM_PWMSTICKS 0
@@ -365,6 +373,10 @@ enum Analogs {
#if defined(PCBX10)
EXT1,
EXT2,
#endif
#if defined(RADIO_TX16S) && defined(FLYSKY_HALL_STICKS)
EXT3,
EXT4,
#endif
POT_LAST = POT_FIRST + NUM_POTS - 1,
SLIDER_FIRST,
@@ -406,8 +418,12 @@ enum Analogs {
#define HARDWARE_POT3
#if !defined(PCBX12S) // ext are used by mouse on X12S
#define HARDWARE_EXT1
#define HARDWARE_EXT2
#define HARDWARE_EXT1
#define HARDWARE_EXT2
#if (defined(RADIO_TX16S) && defined(FLYSKY_HALL_STICKS))
#define HARDWARE_EXT3
#define HARDWARE_EXT4
#endif
#endif
enum CalibratedAnalogs {
@@ -428,6 +444,10 @@ enum CalibratedAnalogs {
#else
CALIBRATED_POT_EXT1,
CALIBRATED_POT_EXT2,
#if (defined(RADIO_TX16S) && defined(FLYSKY_HALL_STICKS))
CALIBRATED_POT_EXT3,
CALIBRATED_POT_EXT4,
#endif
CALIBRATED_SLIDER_REAR_LEFT,
CALIBRATED_SLIDER_REAR_RIGHT,
#endif