Sub: move handling of MAG_CAL command longs up

This commit is contained in:
Peter Barker 2017-07-17 10:47:40 +10:00 committed by Francisco Ferreira
parent 6047026b11
commit c430b3affe
2 changed files with 6 additions and 7 deletions

View File

@ -1347,13 +1347,6 @@ void GCS_MAVLINK_Sub::handleMessage(mavlink_message_t* msg)
break;
}
case MAV_CMD_DO_START_MAG_CAL:
case MAV_CMD_DO_ACCEPT_MAG_CAL:
case MAV_CMD_DO_CANCEL_MAG_CAL:
result = sub.compass.handle_mag_cal_command(packet);
break;
case MAV_CMD_DO_SEND_BANNER: {
result = MAV_RESULT_ACCEPTED;
@ -1724,6 +1717,11 @@ void Sub::gcs_check_input(void)
gcs().update();
}
Compass *GCS_MAVLINK_Sub::get_compass() const
{
return &sub.compass;
}
AP_Mission *GCS_MAVLINK_Sub::get_mission()
{
return &sub.mission;

View File

@ -14,6 +14,7 @@ protected:
return 0;
};
Compass *get_compass() const override;
AP_Mission *get_mission() override;
AP_Rally *get_rally() const override;
AP_ServoRelayEvents *get_servorelayevents() const override;