cpn(fix): gyro and joystick (#2740)

* Add yaml conversion of gyro analogs

* Align XLites, X12S, X10 and T16 family gyro and joystick config with radios
This commit is contained in:
Neil Horne
2022-11-15 20:43:49 +10:00
committed by GitHub
parent f7d7ec2070
commit a88611ac27
3 changed files with 31 additions and 7 deletions
@@ -29,8 +29,6 @@
using namespace Board;
#define MAX_VIEWS(board) (HAS_LARGE_LCD(board) ? 2 : 256)
#define MAX_GYRO_ANALOGS(board, version) (version >= 219 ? Boards::getCapability(board, Board::GyroAnalogs) : 0)
inline int MAX_SWITCHES(Board::Type board, int version)
{
if (version <= 218) {
@@ -188,6 +186,16 @@ inline int MAX_MOUSE_ANALOG_SOURCES(Board::Type board, int version)
return 0;
}
inline int MAX_GYRO_ANALOGS(Board::Type board, int version)
{
if (version <= 220) {
if (IS_FAMILY_HORUS_OR_T16(board))
return 0;
}
return Boards::getCapability(board, Board::GyroAnalogs);
}
#define MAX_ROTARY_ENCODERS(board) 0
#define MAX_FLIGHT_MODES(board, version) 9
#define MAX_TIMERS(board, version) 3