Copter: Log NTUN while in LAND mode with GPS

This commit is contained in:
Jonathan Challinger 2014-09-15 17:16:41 -07:00 committed by Randy Mackay
parent b212c02057
commit 3993927cb7
2 changed files with 6 additions and 1 deletions

View File

@ -1112,7 +1112,7 @@ static void ten_hz_logging_loop()
if (g.log_bitmask & MASK_LOG_RCOUT) {
DataFlash.Log_Write_RCOUT();
}
if ((g.log_bitmask & MASK_LOG_NTUN) && mode_requires_GPS(control_mode)) {
if ((g.log_bitmask & MASK_LOG_NTUN) && (mode_requires_GPS(control_mode) || landing_with_GPS())) {
Log_Write_Nav_Tuning();
}
}

View File

@ -227,3 +227,8 @@ static void set_mode_land_with_pause()
set_mode(LAND);
land_pause = true;
}
// landing_with_GPS - returns true if vehicle is landing using GPS
static bool landing_with_GPS() {
return (control_mode == LAND && land_with_gps);
}