Skip to content

Commit

Permalink
core: added Mavsdk::Configuration for ComponentType::RemoteId
Browse files Browse the repository at this point in the history
  • Loading branch information
dakejahl committed Oct 4, 2024
1 parent 32da8cc commit a1084be
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/mavsdk/core/include/mavsdk/mavsdk.h
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ class Mavsdk {
static constexpr int DEFAULT_COMPONENT_ID_AUTOPILOT = MAV_COMP_ID_AUTOPILOT1;
static constexpr int DEFAULT_SYSTEM_ID_CAMERA = 1;
static constexpr int DEFAULT_COMPONENT_ID_CAMERA = MAV_COMP_ID_CAMERA;
static constexpr int DEFAULT_COMPONENT_ID_REMOTEID = MAV_COMP_ID_ODID_TXRX_1;

/* @private. */
std::shared_ptr<MavsdkImpl> _impl{};
Expand Down
5 changes: 5 additions & 0 deletions src/mavsdk/core/mavsdk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ Mavsdk::Configuration::Configuration(ComponentType component_type) :
_component_id = Mavsdk::DEFAULT_COMPONENT_ID_CAMERA;
_always_send_heartbeats = true;
break;
case Mavsdk::ComponentType::RemoteId:
_system_id = Mavsdk::DEFAULT_SYSTEM_ID_AUTOPILOT;
_component_id = Mavsdk::DEFAULT_COMPONENT_ID_REMOTEID;
_always_send_heartbeats = true;
break;
default:
break;
}
Expand Down

0 comments on commit a1084be

Please sign in to comment.