@@ -17,6 +17,7 @@ depends: []
1717// clang-format on
1818
1919#include " app_framework.hpp"
20+ #include " message.hpp"
2021#include " uart.hpp"
2122
2223class SharedTopicClient : public LibXR ::Application {
@@ -47,7 +48,6 @@ class SharedTopicClient : public LibXR::Application {
4748 ASSERT (uart_ != nullptr );
4849
4950 topics_pack_buffer_ = new LibXR::RawData[topic_configs.size ()];
50-
5151 uint32_t i = 0 ;
5252
5353 for (auto config : topic_configs) {
@@ -61,12 +61,13 @@ class SharedTopicClient : public LibXR::Application {
6161 new uint8_t [ans->data_ .max_length + LibXR::Topic::PACK_BASE_SIZE ],
6262 ans->data_ .max_length + LibXR::Topic::PACK_BASE_SIZE );
6363
64- void (*func)(bool , CallbackInfo, LibXR::RawData&) =
65- [](bool in_isr, CallbackInfo info, LibXR::RawData& data) {
66- LibXR::WriteOperation op;
64+ void (*func)(bool , CallbackInfo, LibXR::MicrosecondTimestamp,
65+ LibXR::ConstRawData&) =
66+ [](bool in_isr, CallbackInfo info,
67+ LibXR::MicrosecondTimestamp timestamp, LibXR::ConstRawData& data) {
6768 LibXR::Topic::PackData (info.topic_crc32 ,
6869 info.client ->topics_pack_buffer_ [info.index ],
69- data);
70+ timestamp, data);
7071 info.client ->tx_queue_ .PushBatch (
7172 static_cast <uint8_t *>(
7273 info.client ->topics_pack_buffer_ [info.index ].addr_ ),
@@ -91,8 +92,6 @@ class SharedTopicClient : public LibXR::Application {
9192 }
9293
9394 static void TxThreadFun (SharedTopicClient* client) {
94- LibXR::Semaphore write_op_sem;
95- LibXR::WriteOperation op (write_op_sem);
9695 LibXR::WriteOperation op_none;
9796 while (true ) {
9897 client->tx_sem_ .Wait ();
0 commit comments