Tracker: remove arguments to send_home and send_ekf_origin

This commit is contained in:
Peter Barker 2018-05-16 14:49:01 +10:00 committed by Peter Barker
parent 0e8f01021d
commit 62a3faf448
2 changed files with 8 additions and 7 deletions

View File

@ -461,11 +461,8 @@ void GCS_MAVLINK_Tracker::handleMessage(mavlink_message_t* msg)
break;
case MAV_CMD_GET_HOME_POSITION:
send_home(tracker.ahrs.get_home());
Location ekf_origin;
if (tracker.ahrs.get_origin(ekf_origin)) {
send_ekf_origin(ekf_origin);
}
send_home();
send_ekf_origin();
result = MAV_RESULT_ACCEPTED;
break;

View File

@ -158,11 +158,15 @@ void Tracker::set_home(struct Location temp)
{
set_home_eeprom(temp);
current_loc = temp;
gcs().send_home(temp);
// check EKF origin has been set
Location ekf_origin;
if (ahrs.get_origin(ekf_origin)) {
gcs().send_ekf_origin(ekf_origin);
ahrs.set_home(temp);
}
gcs().send_home();
gcs().send_ekf_origin();
}
void Tracker::arm_servos()