Skip to content

Commit

Permalink
Expand inputs and mixer to full 24 channels
Browse files Browse the repository at this point in the history
  • Loading branch information
mmosca committed Jun 21, 2024
1 parent b6f2976 commit 47bc883
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 12 deletions.
34 changes: 22 additions & 12 deletions src/main/fc/rc_controls.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,28 @@ typedef enum rc_alias {
PITCH,
YAW,
THROTTLE,
AUX1,
AUX2,
AUX3,
AUX4,
AUX5,
AUX6,
AUX7,
AUX8,
AUX9,
AUX10,
AUX11,
AUX12
AUX1, // 5
AUX2, // 6
AUX3, // 7
AUX4, // 8
AUX5, // 9
AUX6, // 10
AUX7, // 11
AUX8, // 12
AUX9, // 13
AUX10, // 14
AUX11, // 15
AUX12, // 16
AUX13, // 17
AUX14, // 18
#ifdef USE_24CHANNELS
AUX15, // 19
AUX16, // 20
AUX17, // 21
AUX18, // 22
AUX19, // 23
AUX20, // 24
#endif
} rc_alias_e;

typedef enum {
Expand Down
10 changes: 10 additions & 0 deletions src/main/flight/servos.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,16 @@ void servoMixer(float dT)
input[INPUT_RC_CH14] = GET_RX_CHANNEL_INPUT(AUX10);
input[INPUT_RC_CH15] = GET_RX_CHANNEL_INPUT(AUX11);
input[INPUT_RC_CH16] = GET_RX_CHANNEL_INPUT(AUX12);
input[INPUT_RC_CH17] = GET_RX_CHANNEL_INPUT(AUX13);
input[INPUT_RC_CH18] = GET_RX_CHANNEL_INPUT(AUX14);
#ifdef USE_24CHANNELS
input[INPUT_RC_CH19] = GET_RX_CHANNEL_INPUT(AUX15);
input[INPUT_RC_CH20] = GET_RX_CHANNEL_INPUT(AUX16);
input[INPUT_RC_CH21] = GET_RX_CHANNEL_INPUT(AUX17);
input[INPUT_RC_CH22] = GET_RX_CHANNEL_INPUT(AUX18);
input[INPUT_RC_CH23] = GET_RX_CHANNEL_INPUT(AUX19);
input[INPUT_RC_CH24] = GET_RX_CHANNEL_INPUT(AUX20);
#endif
#undef GET_RX_CHANNEL_INPUT

#ifdef USE_HEADTRACKER
Expand Down
10 changes: 10 additions & 0 deletions src/main/flight/servos.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@ typedef enum {
INPUT_HEADTRACKER_PAN = 39,
INPUT_HEADTRACKER_TILT = 40,
INPUT_HEADTRACKER_ROLL = 41,
INPUT_RC_CH17 = 42,
INPUT_RC_CH18 = 43,
#ifdef USE_24CHANNELS
INPUT_RC_CH19 = 44,
INPUT_RC_CH20 = 45,
INPUT_RC_CH21 = 46,
INPUT_RC_CH22 = 47,
INPUT_RC_CH23 = 48,
INPUT_RC_CH24 = 49,
#endif
INPUT_SOURCE_COUNT
} inputSource_e;

Expand Down

0 comments on commit 47bc883

Please sign in to comment.