Rover: enable RELAY_* parameters

This commit is contained in:
Andrew Tridgell 2013-06-25 12:48:58 +10:00
parent 76d1791073
commit a5586ec394
4 changed files with 5 additions and 9 deletions

View File

@ -33,6 +33,7 @@ public:
k_param_reset_switch_chan,
k_param_initial_mode,
k_param_scheduler,
k_param_relay,
// IO pins
k_param_rssi_pin = 20,

View File

@ -422,6 +422,10 @@ const AP_Param::Info var_info[] PROGMEM = {
// @Path: ../libraries/AP_Scheduler/AP_Scheduler.cpp
GOBJECT(scheduler, "SCHED_", AP_Scheduler),
// @Group: RELAY_
// @Path: ../libraries/AP_Relay/AP_Relay.cpp
GOBJECT(relay, "RELAY_", AP_Relay),
// @Group: RCMAP_
// @Path: ../libraries/AP_RCMapper/AP_RCMapper.cpp
GOBJECT(rcmap, "RCMAP_", RCMapper),

View File

@ -36,9 +36,6 @@
// default choices for a 1280. We can't fit everything in, so we
// make some popular choices by default
#define LOGGING_ENABLED DISABLED
#ifndef CONFIG_RELAY
# define CONFIG_RELAY DISABLED
#endif
#ifndef MOUNT2
# define MOUNT2 DISABLED
#endif
@ -74,14 +71,12 @@
# define SLIDE_SWITCH_PIN 40
# define PUSHBUTTON_PIN 41
# define USB_MUX_PIN -1
# define CONFIG_RELAY ENABLED
# define BATTERY_PIN_1 0
# define CURRENT_PIN_1 1
#elif CONFIG_HAL_BOARD == HAL_BOARD_APM2
# define CONFIG_INS_TYPE CONFIG_INS_MPU6000
# define CONFIG_COMPASS AP_COMPASS_HMC5843
# define CONFIG_PUSHBUTTON DISABLED
# define CONFIG_RELAY DISABLED
# define A_LED_PIN 27
# define B_LED_PIN 26
# define C_LED_PIN 25
@ -97,7 +92,6 @@
# define CONFIG_INS_TYPE CONFIG_INS_STUB
# define CONFIG_COMPASS AP_COMPASS_HIL
# define CONFIG_PUSHBUTTON DISABLED
# define CONFIG_RELAY DISABLED
# define A_LED_PIN 27
# define B_LED_PIN 26
# define C_LED_PIN 25
@ -113,7 +107,6 @@
# define CONFIG_INS_TYPE CONFIG_INS_PX4
# define CONFIG_COMPASS AP_COMPASS_PX4
# define CONFIG_PUSHBUTTON DISABLED
# define CONFIG_RELAY DISABLED
# define A_LED_PIN 27
# define B_LED_PIN 26
# define C_LED_PIN 25

View File

@ -206,9 +206,7 @@ static void init_ardupilot()
#if CONFIG_PUSHBUTTON == ENABLED
pinMode(PUSHBUTTON_PIN, INPUT); // unused
#endif
#if CONFIG_RELAY == ENABLED
relay.init();
#endif
/*
setup the 'main loop is dead' check. Note that this relies on