mirror of https://github.com/ArduPilot/ardupilot
AP_Relay: setup pin for PX4 relay support
This commit is contained in:
parent
a3b216bce3
commit
72d0721721
|
@ -14,6 +14,8 @@
|
||||||
#define RELAY_PIN 47
|
#define RELAY_PIN 47
|
||||||
#elif CONFIG_HAL_BOARD == HAL_BOARD_APM2 || CONFIG_HAL_BOARD == HAL_BOARD_AVR_SITL
|
#elif CONFIG_HAL_BOARD == HAL_BOARD_APM2 || CONFIG_HAL_BOARD == HAL_BOARD_AVR_SITL
|
||||||
#define RELAY_PIN 13
|
#define RELAY_PIN 13
|
||||||
|
#elif CONFIG_HAL_BOARD == HAL_BOARD_PX4
|
||||||
|
#define RELAY_PIN 99
|
||||||
#else
|
#else
|
||||||
// no relay for this board
|
// no relay for this board
|
||||||
#define RELAY_PIN -1
|
#define RELAY_PIN -1
|
||||||
|
@ -22,7 +24,7 @@
|
||||||
const AP_Param::GroupInfo AP_Relay::var_info[] PROGMEM = {
|
const AP_Param::GroupInfo AP_Relay::var_info[] PROGMEM = {
|
||||||
// @Param: PIN
|
// @Param: PIN
|
||||||
// @DisplayName: Relay Pin
|
// @DisplayName: Relay Pin
|
||||||
// @Description: Digital pin number for relay control. This is normally 47 for the APM1 relay and 13 for the A9 pin on APM2.
|
// @Description: Digital pin number for relay control. This is normally 47 for the APM1 relay, 13 for the A9 pin on APM2 and 99 for the high power relay pin on the PX4.
|
||||||
// @User: Standard
|
// @User: Standard
|
||||||
AP_GROUPINFO("PIN", 0, AP_Relay, _pin, RELAY_PIN),
|
AP_GROUPINFO("PIN", 0, AP_Relay, _pin, RELAY_PIN),
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue