Skip to content

Commit

Permalink
AP_DDS: fixed stack frame size on build.
Browse files Browse the repository at this point in the history
  • Loading branch information
paul.quillen committed Nov 5, 2024
1 parent 16245ec commit 1129087
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libraries/AP_DDS/AP_DDS_Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,14 @@ ardupilot_msgs_msg_GlobalPosition AP_DDS_Client::rx_global_position_control_topi
#endif // AP_DDS_GLOBAL_POS_CTRL_ENABLED

// Define the parameter server data members, which are static class scope.
// If these are created on the stack, then the AP_DDS_Client::on_request
// frame size is exceeded.
#if AP_DDS_PARAMETER_SERVER_ENABLED
rcl_interfaces_srv_SetParameters_Request AP_DDS_Client::set_parameter_request {};
rcl_interfaces_srv_SetParameters_Response AP_DDS_Client::set_parameter_response {};
rcl_interfaces_srv_GetParameters_Request AP_DDS_Client::get_parameters_request {};
rcl_interfaces_srv_GetParameters_Response AP_DDS_Client::get_parameters_response {};
rcl_interfaces_msg_Parameter AP_DDS_Client::param {};
#endif

const AP_Param::GroupInfo AP_DDS_Client::var_info[] {
Expand Down Expand Up @@ -823,7 +826,7 @@ void AP_DDS_Client::on_request(uxrSession* uxr_session, uxrObjectId object_id, u
// Set parameters and responses for each one requested
set_parameter_response.results_size = set_parameter_request.parameters_size;
for (size_t i = 0; i < set_parameter_request.parameters_size; i++) {
rcl_interfaces_msg_Parameter param = set_parameter_request.parameters[i];
param = set_parameter_request.parameters[i];

enum ap_var_type var_type;

Expand Down
1 change: 1 addition & 0 deletions libraries/AP_DDS/AP_DDS_Client.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ class AP_DDS_Client
static rcl_interfaces_srv_SetParameters_Response set_parameter_response;
static rcl_interfaces_srv_GetParameters_Request get_parameters_request;
static rcl_interfaces_srv_GetParameters_Response get_parameters_response;
static rcl_interfaces_msg_Parameter param;
#endif

// connection parametrics
Expand Down

0 comments on commit 1129087

Please sign in to comment.