Rover: support 14 RC channels on PX4

This commit is contained in:
Andrew Tridgell 2014-03-25 14:41:38 +11:00
parent 09ed8d5819
commit ce3ed33649
4 changed files with 18 additions and 0 deletions

View File

@ -36,6 +36,8 @@ public:
k_param_relay,
k_param_BoardConfig,
k_param_pivot_turn_angle,
k_param_rc_13,
k_param_rc_14,
// IO pins
k_param_rssi_pin = 20,
@ -231,6 +233,8 @@ public:
#endif
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4
RC_Channel_aux rc_12;
RC_Channel_aux rc_13;
RC_Channel_aux rc_14;
#endif
// Throttle
@ -294,6 +298,8 @@ public:
#endif
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4
rc_12 (CH_12),
rc_13 (CH_13),
rc_14 (CH_14),
#endif
// PID controller initial P initial I initial D initial imax

View File

@ -213,6 +213,14 @@ const AP_Param::Info var_info[] PROGMEM = {
// @Group: RC12_
// @Path: ../libraries/RC_Channel/RC_Channel.cpp,../libraries/RC_Channel/RC_Channel_aux.cpp
GGROUP(rc_12, "RC12_", RC_Channel_aux),
// @Group: RC13_
// @Path: ../libraries/RC_Channel/RC_Channel.cpp,../libraries/RC_Channel/RC_Channel_aux.cpp
GGROUP(rc_13, "RC13_", RC_Channel_aux),
// @Group: RC14_
// @Path: ../libraries/RC_Channel/RC_Channel.cpp,../libraries/RC_Channel/RC_Channel_aux.cpp
GGROUP(rc_14, "RC14_", RC_Channel_aux),
#endif
// @Param: THR_MIN

View File

@ -264,6 +264,8 @@ static void set_servos(void)
#endif
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4
g.rc_12.output_ch(CH_12);
g.rc_13.output_ch(CH_13);
g.rc_14.output_ch(CH_14);
#endif
#endif

View File

@ -40,6 +40,8 @@ static void init_rc_out()
#endif
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4
servo_write(CH_12, g.rc_12.radio_trim);
servo_write(CH_13, g.rc_13.radio_trim);
servo_write(CH_14, g.rc_14.radio_trim);
#endif
}