Automatically detect FlySky digital hall sticks on X10-class radios without necessity of build-time CMake option FLYSKY_HALL_STICKS.
Added special UART4 init to sample if FlySky sticks are present or not. Added boolean globalData.flyskygimbals to save the detection result. Removed FLYSKY_HALL_STICKS and FLYSKY_HALL_STICKS_REVERSE CMake build options. Tested on two RM TX16S radios, one with FlySky digital hall sticks and second with stock analog sticks.
This commit is contained in:
@@ -31,11 +31,10 @@
|
||||
#define FIRST_ANALOG_ADC 0
|
||||
#define NUM_ANALOGS_ADC 11
|
||||
#define NUM_ANALOGS_ADC_EXT (NUM_ANALOGS - NUM_ANALOGS_ADC)
|
||||
#elif defined(PCBNV14) && defined(FLYSKY_HALL_STICKS)
|
||||
#define FIRST_ANALOG_ADC 4
|
||||
#define NUM_ANALOGS_ADC 10
|
||||
#define NUM_ANALOGS_ADC_EXT 2
|
||||
#else
|
||||
#define FIRST_ANALOG_ADC_FS 4
|
||||
#define NUM_ANALOGS_ADC_FS 10
|
||||
#define NUM_ANALOGS_ADC_EXT 2
|
||||
#define FIRST_ANALOG_ADC 0
|
||||
#define NUM_ANALOGS_ADC NUM_ANALOGS
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user