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:
rotorman
2021-11-19 21:33:03 +01:00
committed by Risto
parent 1002fddd12
commit 80a51837c1
24 changed files with 248 additions and 217 deletions
+1 -4
View File
@@ -244,7 +244,6 @@ options_jumper_t16 = {
"internalmulti": ("INTERNAL_MODULE_MULTI", "YES", "NO"),
"bluetooth": ("BLUETOOTH", "YES", "NO"),
"externalaccessmod": ("HARDWARE_EXTERNAL_ACCESS_MOD", "YES", "NO"),
"flyskyhallsticks": ("FLYSKY_HALL_STICKS", "NO", "YES"),
}
options_jumper_t18 = {
@@ -258,7 +257,6 @@ options_jumper_t18 = {
"flexr9m": ("MODULE_PROTOCOL_FLEX", "YES", None),
"bluetooth": ("BLUETOOTH", "YES", "NO"),
"externalaccessmod": ("HARDWARE_EXTERNAL_ACCESS_MOD", "YES", "NO"),
"flyskyhallsticks": ("FLYSKY_HALL_STICKS", "NO", "YES"),
}
options_radiomaster_tx12 = {
@@ -296,5 +294,4 @@ options_radiomaster_tx16s = {
"bluetooth": ("BLUETOOTH", "YES", "NO"),
"internalgps": ("INTERNAL_GPS", "YES", "NO"),
"externalaccessmod": ("HARDWARE_EXTERNAL_ACCESS_MOD", "YES", "NO"),
"flyskyhallsticks": ("FLYSKY_HALL_STICKS", "NO", "YES"),
}
}