Copter: Disable option code

Copter: Revert change

Copter: Change mistakes
This commit is contained in:
murata 2019-02-25 23:32:52 +09:00 committed by Randy Mackay
parent 4bb28eb63c
commit 8644f4d76e
8 changed files with 41 additions and 1 deletions

View File

@ -704,6 +704,18 @@
#error Helicopter frame requires acro mode support which is disabled
#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
//

View File

@ -1,5 +1,7 @@
#include "Copter.h"
#if MODE_BRAKE_ENABLED == ENABLED
/*
* 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_ms = timeout_ms;
}
#endif

View File

@ -1,5 +1,7 @@
#include "Copter.h"
#if MODE_GUIDED_ENABLED == ENABLED
/*
* 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
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
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
// update position controller with new target
@ -785,3 +787,5 @@ float Copter::ModeGuided::crosstrack_error() const
return 0;
}
}
#endif

View File

@ -1,5 +1,7 @@
#include "Copter.h"
#if MODE_GUIDED_NOGPS_ENABLED == ENABLED
/*
* Init and run calls for guided_nogps flight mode
*/
@ -19,3 +21,5 @@ void Copter::ModeGuidedNoGPS::run()
// run angle controller
Copter::ModeGuided::angle_control_run();
}
#endif

View File

@ -1,5 +1,7 @@
#include "Copter.h"
#if MODE_LOITER_ENABLED == ENABLED
/*
* 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();
}
#endif

View File

@ -1,5 +1,7 @@
#include "Copter.h"
#if MODE_POSHOLD_ENABLED == ENABLED
/*
* Init and run calls for PosHold flight mode
* 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
poshold.controller_final_pitch = poshold.pitch;
}
#endif

View File

@ -1,5 +1,7 @@
#include "Copter.h"
#if MODE_RTL_ENABLED == ENABLED
/*
* 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();
}
#endif

View File

@ -1,5 +1,7 @@
#include "Copter.h"
#if MODE_SPORT_ENABLED == ENABLED
/*
* Init and run calls for sport flight mode
*/
@ -165,3 +167,5 @@ void Copter::ModeSport::run()
break;
}
}
#endif