Commit 6be6ddd9 authored by levi's avatar levi
Browse files

more

parent 709e54d2
......@@ -234,6 +234,21 @@ namespace mm
//TODO: Implement this
void MMNode::RestartDeviceCallback(const std::shared_ptr<mm_controller_interfaces::srv::NodeExecution::Request> request, std::shared_ptr<mm_controller_interfaces::srv::NodeExecution::Response> response)
{
std::string msg;
if (!mmResetDevice(request->id))
{
msg = "Failed to soft reset device.";
RCLCPP_WARN(this->get_logger(), msg);
response->is_success = false;
response->message = msg;
}
else
{
msg = "Device with id " + std::to_string(request->id) + "successfully rebooted.";
RCLCPP_INFO(this->get_logger(), msg);
response->is_success = true;
response->message = msg;
}
}
void MMNode::StatusPublisherCallback()
......@@ -244,7 +259,7 @@ namespace mm
GetLatestLocationDataFromModem();
GetTelemetryDataFromModem();
GetLatestDistances();
//GetSubmapSettings(0); //submap id
GetSubmapSettings(0); //submap id
}
_statusMsg.name = "test";
//_statusMessagePtr->name = "test";
......
......@@ -18,7 +18,7 @@ find_package(rosidl_default_generators REQUIRED)
rosidl_generate_interfaces(${PROJECT_NAME}
"msg/MMControllerStatus.msg"
"msg/DeviceStatus.msg"
"srv/DeviceChange.srv"
"srv/NodeExecution.srv"
)
ament_export_dependencies(rosidl_default_runtime)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment