move to communication struct
This commit is contained in:
2026-02-14 14:31:12 +01:00
parent 47578eb677
commit e9bec527a6
8 changed files with 24 additions and 14 deletions
+2 -1
View File
@@ -9,7 +9,7 @@
#include "websocket.hpp"
#define INSERT_SIMULATOR(type) \
m_simulators.insert(std::make_pair(type().name(), std::make_unique<type>(m_can_wrapper, m_serial, this)));
m_simulators.insert(std::make_pair(type().name(), std::make_unique<type>(&m_com, this)));
class Simulators : public QObject
{
@@ -59,6 +59,7 @@ class Simulators : public QObject
Websocket *m_server;
CAN_Wrapper *m_can_wrapper;
QSerialPort *m_serial;
Communication m_com;
std::map<std::string, std::unique_ptr<Simulator_base>> m_simulators;
std::string m_current_simulator = "";
std::mutex m_mutex;