mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-21 16:18:29 -04:00
Plane: fully disable relay and mount code on APM1-1280
this saves some more flash space
This commit is contained in:
parent
a180437028
commit
9a2e77b797
@ -233,8 +233,9 @@ AP_HAL::AnalogSource * batt_curr_pin;
|
||||
// Relay
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if CONFIG_RELAY == ENABLED
|
||||
AP_Relay relay;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -583,6 +583,7 @@ static void do_set_servo()
|
||||
|
||||
static void do_set_relay()
|
||||
{
|
||||
#if CONFIG_RELAY == ENABLED
|
||||
if (next_nonnav_command.p1 == 1) {
|
||||
relay.on();
|
||||
} else if (next_nonnav_command.p1 == 0) {
|
||||
@ -590,6 +591,7 @@ static void do_set_relay()
|
||||
}else{
|
||||
relay.toggle();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void do_repeat_servo(uint8_t channel, uint16_t servo_value,
|
||||
|
@ -60,13 +60,13 @@
|
||||
|
||||
#if defined( __AVR_ATmega1280__ )
|
||||
// default choices for a 1280. We can't fit everything in, so we
|
||||
// make some popular choices
|
||||
// make some popular choices by default
|
||||
#define LOGGING_ENABLED DISABLED
|
||||
#ifndef CONFIG_RELAY
|
||||
# define CONFIG_RELAY DISABLED
|
||||
# define CONFIG_RELAY DISABLED
|
||||
#endif
|
||||
#ifndef GEOFENCE_ENABLED
|
||||
# define GEOFENCE_ENABLED DISABLED
|
||||
# define GEOFENCE_ENABLED DISABLED
|
||||
#endif
|
||||
#ifndef CLI_ENABLED
|
||||
# define CLI_ENABLED DISABLED
|
||||
@ -75,7 +75,7 @@
|
||||
# define MOUNT2 DISABLED
|
||||
#endif
|
||||
#ifndef MOUNT
|
||||
# define MOUNT ENABLED
|
||||
# define MOUNT DISABLED
|
||||
#endif
|
||||
#ifndef CAMERA
|
||||
# define CAMERA DISABLED
|
||||
|
@ -113,9 +113,11 @@ static void update_events(void)
|
||||
}
|
||||
break;
|
||||
|
||||
#if CONFIG_RELAY == ENABLED
|
||||
case EVENT_TYPE_RELAY:
|
||||
relay.toggle();
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (event_state.repeat > 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user