Copter: move set_land_complete_maybe to landing_detector.cpp

This commit is contained in:
Randy Mackay 2015-05-30 17:31:14 +09:00
parent b139dfedae
commit 42c202a08f
2 changed files with 13 additions and 15 deletions

View File

@ -96,21 +96,6 @@ void Copter::set_failsafe_gcs(bool b)
// ---------------------------------------------
// set land complete maybe flag
void Copter::set_land_complete_maybe(bool b)
{
// if no change, exit immediately
if (ap.land_complete_maybe == b)
return;
if (b) {
Log_Write_Event(DATA_LAND_COMPLETE_MAYBE);
}
ap.land_complete_maybe = b;
}
// ---------------------------------------------
void Copter::set_pre_arm_check(bool b)
{
if(ap.pre_arm_check != b) {

View File

@ -77,6 +77,19 @@ void Copter::set_land_complete(bool b)
ap.land_complete = b;
}
// set land complete maybe flag
void Copter::set_land_complete_maybe(bool b)
{
// if no change, exit immediately
if (ap.land_complete_maybe == b)
return;
if (b) {
Log_Write_Event(DATA_LAND_COMPLETE_MAYBE);
}
ap.land_complete_maybe = b;
}
// update_throttle_thr_mix - sets motors throttle_low_comp value depending upon vehicle state
// low values favour pilot/autopilot throttle over attitude control, high values favour attitude control over throttle
// has no effect when throttle is above hover throttle