mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-03-03 04:03:59 -04:00
Mount: AlexMos fix to stop crashing before init
This commit is contained in:
parent
66d2328163
commit
b8e3fe8f26
@ -76,6 +76,10 @@ void AP_Mount_Alexmos::set_mode(enum MAV_MOUNT_MODE mode)
|
|||||||
// status_msg - called to allow mounts to send their status to GCS using the MOUNT_STATUS message
|
// status_msg - called to allow mounts to send their status to GCS using the MOUNT_STATUS message
|
||||||
void AP_Mount_Alexmos::status_msg(mavlink_channel_t chan)
|
void AP_Mount_Alexmos::status_msg(mavlink_channel_t chan)
|
||||||
{
|
{
|
||||||
|
if (!_initialised) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
get_angles();
|
get_angles();
|
||||||
mavlink_msg_mount_status_send(chan, 0, 0, _current_angle.y*100, _current_angle.x*100, _current_angle.z*100);
|
mavlink_msg_mount_status_send(chan, 0, 0, _current_angle.y*100, _current_angle.x*100, _current_angle.z*100);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user