Copter: log and notify when manual land repositionning is active

This commit is contained in:
Pierre Kancir 2018-11-12 11:31:22 +01:00 committed by Randy Mackay
parent e5fa728a28
commit c50eed5e9a
3 changed files with 7 additions and 0 deletions

View File

@ -335,6 +335,7 @@ enum LoggingParameters {
#define DATA_WINCH_RATE_CONTROL 70
#define DATA_ZIGZAG_STORE_A 71
#define DATA_ZIGZAG_STORE_B 72
#define DATA_LAND_REPO_ACTIVE 73
// Error message sub systems and error codes
#define ERROR_SUBSYSTEM_MAIN 1

View File

@ -478,6 +478,9 @@ void Copter::Mode::land_run_horizontal_control()
// record if pilot has overriden roll or pitch
if (!is_zero(target_roll) || !is_zero(target_pitch)) {
if (!ap.land_repo_active) {
copter.Log_Write_Event(DATA_LAND_REPO_ACTIVE);
}
ap.land_repo_active = true;
}
}

View File

@ -289,6 +289,9 @@ void Copter::ModeRTL::descent_run()
// record if pilot has overriden roll or pitch
if (!is_zero(target_roll) || !is_zero(target_pitch)) {
if (!ap.land_repo_active) {
copter.Log_Write_Event(DATA_LAND_REPO_ACTIVE);
}
ap.land_repo_active = true;
}
}