Skip to content

Commit

Permalink
AP_DDS: vehicle_type opbtained from fwversion()
Browse files Browse the repository at this point in the history
  • Loading branch information
fiorenzani committed Oct 7, 2024
1 parent 0704969 commit 31ca9c3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libraries/AP_DDS/AP_DDS_Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <AP_AHRS/AP_AHRS.h>
#include <AP_Arming/AP_Arming.h>
#include <AP_Vehicle/AP_Vehicle.h>
#include <AP_Common/AP_FWVersion.h>
#include <AP_ExternalControl/AP_ExternalControl_config.h>

#include "ardupilot_msgs/srv/ArmMotors.h"
Expand Down Expand Up @@ -529,7 +530,7 @@ void AP_DDS_Client::update_topic(geographic_msgs_msg_GeoPointStamped& msg)
bool AP_DDS_Client::update_topic(ardupilot_msgs_msg_Status& msg)
{
// Fill the new message.
msg.vehicle_type = static_cast<uint8_t>(APM_BUILD_DIRECTORY);
msg.vehicle_type = static_cast<uint8_t>(AP::fwversion().vehicle_type);
msg.armed = AP_Notify::flags.armed;
msg.mode = AP::vehicle()->get_mode();
msg.flying = AP_Notify::flags.flying;
Expand Down

0 comments on commit 31ca9c3

Please sign in to comment.