This commit is contained in:
2026-02-14 14:30:25 +01:00
parent d3c0cb1066
commit ee5c156e56
48 changed files with 549 additions and 510 deletions
+7 -6
View File
@@ -1,13 +1,12 @@
#include "can_debugger.hpp"
Can_Debugger::Can_Debugger(CAN_Wrapper* can_wrapper, QObject* parent) :
Simulator_base("Can_Debugger", can_wrapper, std::chrono::milliseconds(100), parent),
m_wrapper(can_wrapper),
Can_Debugger::Can_Debugger(CAN_Wrapper *can_wrapper, QObject *parent)
: Simulator_base("Can_Debugger", can_wrapper, std::chrono::milliseconds(100), parent), m_wrapper(can_wrapper),
m_can_ui(Color::Black, Color::White)
{
this->add_UI_item(&this->m_can_ui);
connect(&m_can_ui, &UI_can::on_send, this, [=, this](QCanBusFrame frame){m_wrapper->send_can_message(frame);});
connect(&m_can_ui, &UI_can::on_send, this, [=, this](QCanBusFrame frame) { m_wrapper->send_can_message(frame); });
}
void Can_Debugger::timer()
@@ -17,8 +16,10 @@ void Can_Debugger::timer()
void Can_Debugger::run_at_startup()
{
connect(m_wrapper, &CAN_Wrapper::on_can_message, this, [=, this](QCanBusFrame frame){this->m_can_ui.add_received_message(frame);});
connect(m_wrapper, &CAN_Wrapper::on_can_send, this, [=, this](QCanBusFrame frame){this->m_can_ui.add_send_message(frame);});
connect(m_wrapper, &CAN_Wrapper::on_can_message, this,
[=, this](QCanBusFrame frame) { this->m_can_ui.add_received_message(frame); });
connect(m_wrapper, &CAN_Wrapper::on_can_send, this,
[=, this](QCanBusFrame frame) { this->m_can_ui.add_send_message(frame); });
}
void Can_Debugger::run_at_stop()