mirror of https://github.com/ArduPilot/ardupilot
AP_DDS: add param DDS_DOMAIN_ID
- Require reboot. - Set DDS_DOMAIN_ID range: 0 to 232.. Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
This commit is contained in:
parent
a5c8f45b7d
commit
bd1a28c64c
|
@ -72,6 +72,14 @@ const AP_Param::GroupInfo AP_DDS_Client::var_info[] {
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// @Param: _DOMAIN_ID
|
||||||
|
// @DisplayName: DDS DOMAIN ID
|
||||||
|
// @Description: Set the ROS_DOMAIN_ID
|
||||||
|
// @Range: 0 232
|
||||||
|
// @RebootRequired: True
|
||||||
|
// @User: Standard
|
||||||
|
AP_GROUPINFO("_DOMAIN_ID", 4, AP_DDS_Client, domain_id, 0),
|
||||||
|
|
||||||
AP_GROUPEND
|
AP_GROUPEND
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -743,7 +751,8 @@ bool AP_DDS_Client::create()
|
||||||
.type = UXR_PARTICIPANT_ID
|
.type = UXR_PARTICIPANT_ID
|
||||||
};
|
};
|
||||||
const char* participant_ref = "participant_profile";
|
const char* participant_ref = "participant_profile";
|
||||||
const auto participant_req_id = uxr_buffer_create_participant_ref(&session, reliable_out, participant_id,0,participant_ref,UXR_REPLACE);
|
const auto participant_req_id = uxr_buffer_create_participant_ref(&session, reliable_out, participant_id,
|
||||||
|
static_cast<uint16_t>(domain_id), participant_ref, UXR_REPLACE);
|
||||||
|
|
||||||
//Participant requests
|
//Participant requests
|
||||||
constexpr uint8_t nRequestsParticipant = 1;
|
constexpr uint8_t nRequestsParticipant = 1;
|
||||||
|
|
|
@ -198,6 +198,9 @@ public:
|
||||||
//! @brief Parameter storage
|
//! @brief Parameter storage
|
||||||
static const struct AP_Param::GroupInfo var_info[];
|
static const struct AP_Param::GroupInfo var_info[];
|
||||||
|
|
||||||
|
//! @brief ROS_DOMAIN_ID
|
||||||
|
AP_Int32 domain_id;
|
||||||
|
|
||||||
//! @brief Convenience grouping for a single "channel" of data
|
//! @brief Convenience grouping for a single "channel" of data
|
||||||
struct Topic_table {
|
struct Topic_table {
|
||||||
const uint8_t topic_id;
|
const uint8_t topic_id;
|
||||||
|
|
Loading…
Reference in New Issue