From 4ffdb65288b4ba9dd790a2fb45a934bc2c24bf15 Mon Sep 17 00:00:00 2001 From: olliw42 Date: Sat, 4 Nov 2023 10:03:14 +0100 Subject: [PATCH] AP_Mount: gimbal_manager_set_pitchyaw is not a command --- libraries/AP_Mount/AP_Mount.cpp | 6 +++--- libraries/AP_Mount/AP_Mount.h | 2 +- libraries/AP_Mount/AP_Mount_Alexmos.cpp | 2 +- libraries/AP_Mount/AP_Mount_Backend.cpp | 2 +- libraries/AP_Mount/AP_Mount_SToRM32_serial.cpp | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libraries/AP_Mount/AP_Mount.cpp b/libraries/AP_Mount/AP_Mount.cpp index ebcf2a0f8cbdd..8ff5a5362ba2d 100644 --- a/libraries/AP_Mount/AP_Mount.cpp +++ b/libraries/AP_Mount/AP_Mount.cpp @@ -380,7 +380,7 @@ MAV_RESULT AP_Mount::handle_command_do_gimbal_manager_configure(const mavlink_co return backend->handle_command_do_gimbal_manager_configure(packet, msg); } -void AP_Mount::handle_gimbal_manager_set_attitude(const mavlink_message_t &msg){ +void AP_Mount::handle_gimbal_manager_set_attitude(const mavlink_message_t &msg) { mavlink_gimbal_manager_set_attitude_t packet; mavlink_msg_gimbal_manager_set_attitude_decode(&msg,&packet); @@ -445,7 +445,7 @@ void AP_Mount::handle_gimbal_manager_set_attitude(const mavlink_message_t &msg){ } } -void AP_Mount::handle_command_gimbal_manager_set_pitchyaw(const mavlink_message_t &msg) +void AP_Mount::handle_gimbal_manager_set_pitchyaw(const mavlink_message_t &msg) { mavlink_gimbal_manager_set_pitchyaw_t packet; mavlink_msg_gimbal_manager_set_pitchyaw_decode(&msg,&packet); @@ -906,7 +906,7 @@ void AP_Mount::handle_message(mavlink_channel_t chan, const mavlink_message_t &m handle_gimbal_manager_set_attitude(msg); break; case MAVLINK_MSG_ID_GIMBAL_MANAGER_SET_PITCHYAW: - handle_command_gimbal_manager_set_pitchyaw(msg); + handle_gimbal_manager_set_pitchyaw(msg); break; case MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION: handle_gimbal_device_information(msg); diff --git a/libraries/AP_Mount/AP_Mount.h b/libraries/AP_Mount/AP_Mount.h index 1dec3ab9d50f9..fe3003eca536a 100644 --- a/libraries/AP_Mount/AP_Mount.h +++ b/libraries/AP_Mount/AP_Mount.h @@ -296,7 +296,7 @@ class AP_Mount MAV_RESULT handle_command_do_gimbal_manager_pitchyaw(const mavlink_command_int_t &packet); MAV_RESULT handle_command_do_gimbal_manager_configure(const mavlink_command_int_t &packet, const mavlink_message_t &msg); void handle_gimbal_manager_set_attitude(const mavlink_message_t &msg); - void handle_command_gimbal_manager_set_pitchyaw(const mavlink_message_t &msg); + void handle_gimbal_manager_set_pitchyaw(const mavlink_message_t &msg); void handle_global_position_int(const mavlink_message_t &msg); void handle_gimbal_device_information(const mavlink_message_t &msg); void handle_gimbal_device_attitude_status(const mavlink_message_t &msg); diff --git a/libraries/AP_Mount/AP_Mount_Alexmos.cpp b/libraries/AP_Mount/AP_Mount_Alexmos.cpp index f7f39f6119be4..a08eccf34fd8a 100644 --- a/libraries/AP_Mount/AP_Mount_Alexmos.cpp +++ b/libraries/AP_Mount/AP_Mount_Alexmos.cpp @@ -259,7 +259,7 @@ void AP_Mount_Alexmos::read_incoming() numc = _port->available(); - if (numc < 0 ){ + if (numc < 0 ) { return; } diff --git a/libraries/AP_Mount/AP_Mount_Backend.cpp b/libraries/AP_Mount/AP_Mount_Backend.cpp index ee4c76d6255f5..d3cc0cb490ddc 100644 --- a/libraries/AP_Mount/AP_Mount_Backend.cpp +++ b/libraries/AP_Mount/AP_Mount_Backend.cpp @@ -106,7 +106,7 @@ void AP_Mount_Backend::clear_roi_target() _roi_target_set = false; // reset the mode if in GPS tracking mode - if (_mode == MAV_MOUNT_MODE_GPS_POINT) { + if (get_mode() == MAV_MOUNT_MODE_GPS_POINT) { MAV_MOUNT_MODE default_mode = (MAV_MOUNT_MODE)_params.default_mode.get(); set_mode(default_mode); } diff --git a/libraries/AP_Mount/AP_Mount_SToRM32_serial.cpp b/libraries/AP_Mount/AP_Mount_SToRM32_serial.cpp index 0fdcdd53c70fb..518b698ef69e7 100644 --- a/libraries/AP_Mount/AP_Mount_SToRM32_serial.cpp +++ b/libraries/AP_Mount/AP_Mount_SToRM32_serial.cpp @@ -219,7 +219,7 @@ void AP_Mount_SToRM32_serial::read_incoming() { numc = _port->available(); - if (numc < 0 ){ + if (numc < 0 ) { return; }