File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ depends: []
1717// clang-format on
1818
1919#include < cstdint>
20+ #include < cstring>
2021
2122#include " app_framework.hpp"
2223#include " libxr_def.hpp"
@@ -47,7 +48,10 @@ class SharedTopic : public LibXR::Application
4748 : uart_(hw.template Find<LibXR::UART>(uart_name)),
4849 server_ (buffer_size),
4950 rx_buffer_(new uint8_t [buffer_size], buffer_size),
50- cmd_file_(LibXR::RamFS::CreateFile(" shared_topic" , CommandFunc, this ))
51+ cmd_name_(new char [sizeof (" shared_topic:" ) + strlen(uart_name)]),
52+ cmd_file_((strcpy(cmd_name_, " shared_topic:" ),
53+ strcpy(cmd_name_ + strlen(" shared_topic:" ), uart_name),
54+ LibXR::RamFS::CreateFile(cmd_name_, CommandFunc, this )))
5155 {
5256 for (auto config : topic_configs)
5357 {
@@ -136,6 +140,8 @@ class SharedTopic : public LibXR::Application
136140
137141 size_t rx_count_ = 0 ;
138142
143+ char *cmd_name_;
144+
139145 LibXR::RamFS::File cmd_file_;
140146
141147 LibXR::Thread rx_thread_;
You can’t perform that action at this time.
0 commit comments