mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-21 07:13:56 -04:00
Copter: Disable option code
Copter: Revert change Copter: Change mistakes
This commit is contained in:
parent
4bb28eb63c
commit
8644f4d76e
@ -704,6 +704,18 @@
|
|||||||
#error Helicopter frame requires acro mode support which is disabled
|
#error Helicopter frame requires acro mode support which is disabled
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if MODE_SMARTRTL_ENABLED && !MODE_RTL_ENABLED
|
||||||
|
#error SmartRTL requires ModeRTL which is disabled
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if ADSB_ENABLED && !MODE_GUIDED_ENABLED
|
||||||
|
#error ADSB requires ModeGuided which is disabled
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if MODE_FOLLOW_ENABLED && !MODE_GUIDED_ENABLED
|
||||||
|
#error Follow requires ModeGuided which is disabled
|
||||||
|
#endif
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
// Developer Items
|
// Developer Items
|
||||||
//
|
//
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#include "Copter.h"
|
#include "Copter.h"
|
||||||
|
|
||||||
|
#if MODE_BRAKE_ENABLED == ENABLED
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Init and run calls for brake flight mode
|
* Init and run calls for brake flight mode
|
||||||
*/
|
*/
|
||||||
@ -79,3 +81,5 @@ void Copter::ModeBrake::timeout_to_loiter_ms(uint32_t timeout_ms)
|
|||||||
_timeout_start = millis();
|
_timeout_start = millis();
|
||||||
_timeout_ms = timeout_ms;
|
_timeout_ms = timeout_ms;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#include "Copter.h"
|
#include "Copter.h"
|
||||||
|
|
||||||
|
#if MODE_GUIDED_ENABLED == ENABLED
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Init and run calls for guided flight mode
|
* Init and run calls for guided flight mode
|
||||||
*/
|
*/
|
||||||
@ -666,7 +668,7 @@ void Copter::ModeGuided::set_desired_velocity_with_accel_and_fence_limits(const
|
|||||||
// limit the velocity to prevent fence violations
|
// limit the velocity to prevent fence violations
|
||||||
copter.avoid.adjust_velocity(pos_control->get_pos_xy_p().kP(), pos_control->get_max_accel_xy(), curr_vel_des, G_Dt);
|
copter.avoid.adjust_velocity(pos_control->get_pos_xy_p().kP(), pos_control->get_max_accel_xy(), curr_vel_des, G_Dt);
|
||||||
// get avoidance adjusted climb rate
|
// get avoidance adjusted climb rate
|
||||||
curr_vel_des.z = get_avoidance_adjusted_climbrate(curr_vel_des.z);
|
curr_vel_des.z = get_avoidance_adjusted_climbrate(curr_vel_des.z);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// update position controller with new target
|
// update position controller with new target
|
||||||
@ -785,3 +787,5 @@ float Copter::ModeGuided::crosstrack_error() const
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#include "Copter.h"
|
#include "Copter.h"
|
||||||
|
|
||||||
|
#if MODE_GUIDED_NOGPS_ENABLED == ENABLED
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Init and run calls for guided_nogps flight mode
|
* Init and run calls for guided_nogps flight mode
|
||||||
*/
|
*/
|
||||||
@ -19,3 +21,5 @@ void Copter::ModeGuidedNoGPS::run()
|
|||||||
// run angle controller
|
// run angle controller
|
||||||
Copter::ModeGuided::angle_control_run();
|
Copter::ModeGuided::angle_control_run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#include "Copter.h"
|
#include "Copter.h"
|
||||||
|
|
||||||
|
#if MODE_LOITER_ENABLED == ENABLED
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Init and run calls for loiter flight mode
|
* Init and run calls for loiter flight mode
|
||||||
*/
|
*/
|
||||||
@ -238,3 +240,5 @@ int32_t Copter::ModeLoiter::wp_bearing() const
|
|||||||
{
|
{
|
||||||
return loiter_nav->get_bearing_to_target();
|
return loiter_nav->get_bearing_to_target();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#include "Copter.h"
|
#include "Copter.h"
|
||||||
|
|
||||||
|
#if MODE_POSHOLD_ENABLED == ENABLED
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Init and run calls for PosHold flight mode
|
* Init and run calls for PosHold flight mode
|
||||||
* PosHold tries to improve upon regular loiter by mixing the pilot input with the loiter controller
|
* PosHold tries to improve upon regular loiter by mixing the pilot input with the loiter controller
|
||||||
@ -667,3 +669,5 @@ void Copter::ModePosHold::poshold_pitch_controller_to_pilot_override()
|
|||||||
// store final loiter outputs for mixing with pilot input
|
// store final loiter outputs for mixing with pilot input
|
||||||
poshold.controller_final_pitch = poshold.pitch;
|
poshold.controller_final_pitch = poshold.pitch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#include "Copter.h"
|
#include "Copter.h"
|
||||||
|
|
||||||
|
#if MODE_RTL_ENABLED == ENABLED
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Init and run calls for RTL flight mode
|
* Init and run calls for RTL flight mode
|
||||||
*
|
*
|
||||||
@ -492,3 +494,5 @@ int32_t Copter::ModeRTL::wp_bearing() const
|
|||||||
{
|
{
|
||||||
return wp_nav->get_wp_bearing_to_destination();
|
return wp_nav->get_wp_bearing_to_destination();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#include "Copter.h"
|
#include "Copter.h"
|
||||||
|
|
||||||
|
#if MODE_SPORT_ENABLED == ENABLED
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Init and run calls for sport flight mode
|
* Init and run calls for sport flight mode
|
||||||
*/
|
*/
|
||||||
@ -165,3 +167,5 @@ void Copter::ModeSport::run()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user