mirror of
https://github.com/BotChain-Robots/firmware.git
synced 2026-07-08 17:47:21 +02:00
Fix wired integration
This commit is contained in:
@@ -26,6 +26,7 @@ CommunicationRouter::~CommunicationRouter() {
|
||||
|
||||
while (true) {
|
||||
const auto buffer = that->m_tcp_rx_queue->dequeue();
|
||||
std::cout << "routing from tcp" << std::endl;
|
||||
that->route(buffer->data(), buffer->size());
|
||||
}
|
||||
}
|
||||
@@ -55,6 +56,7 @@ CommunicationRouter::~CommunicationRouter() {
|
||||
continue;
|
||||
}
|
||||
|
||||
std::cout << "routing message from rmt" << std::endl;
|
||||
that->route(reinterpret_cast<uint8_t *>(buffer), bytes_received);
|
||||
}
|
||||
}
|
||||
@@ -103,10 +105,6 @@ void CommunicationRouter::route(uint8_t* buffer, const size_t length) const {
|
||||
if (mpi_message->destination() == m_module_id) {
|
||||
std::cout << "Routing to this module [dest:" << static_cast<int>(mpi_message->destination()) << ", length: " << length << "]" << std::endl;
|
||||
|
||||
const auto temp = Flatbuffers::AngleControlMessageBuilder::parse_angle_control_message(reinterpret_cast<const uint8_t *>(mpi_message->payload()))->angle();
|
||||
|
||||
std::cout << "angle from before router" << temp << std::endl;
|
||||
|
||||
this->m_rx_callback(reinterpret_cast<char *>(buffer), 512);
|
||||
} else if (mpi_message->destination() == PC_ADDR && this->m_leader == m_module_id) {
|
||||
std::cout << "Routing to wifi [dest:" << static_cast<int>(mpi_message->destination()) << ", length: " << length << "]" << std::endl;
|
||||
|
||||
Reference in New Issue
Block a user