Skip to content

Commit

Permalink
AP_DDS: removed GCS logs for Rally
Browse files Browse the repository at this point in the history
  • Loading branch information
tizianofiorenzani committed Nov 21, 2024
1 parent dd3c421 commit 1dc0005
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions libraries/AP_DDS/AP_DDS_Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <AP_Vehicle/AP_Vehicle.h>
#include <AP_Common/AP_FWVersion.h>
#include <AP_ExternalControl/AP_ExternalControl_config.h>
#include <AP_Rally/AP_Rally.h>

#if AP_DDS_ARM_SERVER_ENABLED
#include "ardupilot_msgs/srv/ArmMotors.h"
Expand All @@ -28,6 +27,7 @@
#include "ardupilot_msgs/srv/ModeSwitch.h"
#endif // AP_DDS_MODE_SWITCH_SERVER_ENABLED
#if AP_DDS_RALLY_SERVER_ENABLED
#include <AP_Rally/AP_Rally.h>
#include "ardupilot_msgs/srv/RallyGet.h"
#include "ardupilot_msgs/srv/RallySet.h"
#endif // AP_DDS_RALLY_SERVER_ENABLED
Expand Down Expand Up @@ -906,10 +906,7 @@ void AP_DDS_Client::on_request(uxrSession* uxr_session, uxrObjectId object_id, u
} else {
rally_get_response.rally.altitude_frame = static_cast<uint8_t>(Location::AltFrame::ABOVE_HOME);
}
GCS_SEND_TEXT(MAV_SEVERITY_INFO, "%s Req Rally %u valid: lat: %.4f lon: %.4f",
msg_prefix, rally_get_request.index, rally_get_response.rally.point.latitude, rally_get_response.rally.point.longitude);
} else {
GCS_SEND_TEXT(MAV_SEVERITY_WARNING, "%s Req Rally %u invalid", msg_prefix, rally_get_request.index);
rally_get_response.success = false;
}

Expand Down Expand Up @@ -946,9 +943,6 @@ void AP_DDS_Client::on_request(uxrSession* uxr_session, uxrObjectId object_id, u
if (rally_set_request.clear) {
rally->truncate(0);
rally_set_response.success = rally->get_rally_total() == 0;
if (rally_set_response.success) {
GCS_SEND_TEXT(MAV_SEVERITY_INFO, "%s Rally Point List cleared", msg_prefix);
}
} else {
rally_location.lat = static_cast<int32_t>(rally_set_request.rally.point.latitude * 1e7);
rally_location.lng = static_cast<int32_t>(rally_set_request.rally.point.longitude * 1e7);
Expand All @@ -961,13 +955,10 @@ void AP_DDS_Client::on_request(uxrSession* uxr_session, uxrObjectId object_id, u
&& rally_set_request.rally.altitude_frame <= static_cast<uint8_t>(Location::AltFrame::ABOVE_TERRAIN)) {
if (rally->append(rally_location)) {
rally_set_response.success = true;
GCS_SEND_TEXT(MAV_SEVERITY_INFO, "%s Rally Point appended", msg_prefix);
} else {
GCS_SEND_TEXT(MAV_SEVERITY_WARNING, "%s Failed to append Rally Point", msg_prefix);
rally_set_response.success = false;
}
} else {
GCS_SEND_TEXT(MAV_SEVERITY_WARNING, "%s Invalid Rally requested", msg_prefix);
rally_set_response.success = false;
}
}
Expand Down

0 comments on commit 1dc0005

Please sign in to comment.