CAN debuger

This commit is contained in:
2026-02-01 18:42:24 +01:00
parent 10604e4b03
commit e7f13d9965
6 changed files with 86 additions and 25 deletions
+9 -4
View File
@@ -7,11 +7,15 @@
class UI_can : public UI_item
{
Q_OBJECT
public:
UI_can(std::string text, Color fg_color, Color bg_color);
UI_can(const json &j);
UI_can(Color fg_color, Color bg_color, QObject *parent = nullptr);
UI_can(const json &j, QObject *parent = nullptr);
void add_can_message(QCanBusFrame& msg);
void add_send_message(QCanBusFrame& msg);
void add_received_message(QCanBusFrame& msg);
void clear_send_buffer();
void clear_receive_buffer();
void from_json(const json &j) override;
json to_json(size_t id) const override;
@@ -20,5 +24,6 @@ class UI_can : public UI_item
signals:
void on_send(QCanBusFrame msg);
private:
std::vector<QCanBusFrame> m_can_messages;
std::vector<QCanBusFrame> m_can_send_messages;
std::vector<QCanBusFrame> m_can_received_messages;
};