Index: sources/canbus/FrameInterface.h =================================================================== diff -u -r00d9bb06ec2bad14f6dc2db678b750c244f694ef -rc503f43840024e18650c1ac558448dd0f3b70427 --- sources/canbus/FrameInterface.h (.../FrameInterface.h) (revision 00d9bb06ec2bad14f6dc2db678b750c244f694ef) +++ sources/canbus/FrameInterface.h (.../FrameInterface.h) (revision c503f43840024e18650c1ac558448dd0f3b70427) @@ -19,7 +19,7 @@ #include // Project -#include "main.h" +#include "main.h" // Doxygen : don't remove #include "MessageGlobals.h" // Define @@ -44,6 +44,9 @@ { Q_OBJECT + // Singleton + SINGLETON(FrameInterface) + // friends friend class ::tst_canbus; friend class ::tst_acknow; @@ -63,26 +66,23 @@ QThread *_thread = nullptr; bool _init = false; - struct Frame { - Can_Id can_Id; - QByteArray data ; + Can_Id can_Id; + QByteArray data ; - Frame(Can_Id vCan_Id, const QByteArray &vData) { - can_Id = vCan_Id; - data = vData ; - } - }; - QList _txFrameList; - const quint16 _txFrameList_Max = 4000; // maximum number of frames in the transmit buffer - bool _transmitted = false; + Frame(Can_Id vCan_Id, const QByteArray &vData) { + can_Id = vCan_Id; + data = vData ; + } + }; - const quint8 _interval = 7; // keep awake call of the UI board in ms + QList _txFrameList; + const quint16 _txFrameList_Max = 4000; // maximum number of frames in the transmit buffer + bool _transmitted = false; - QString _timestamp; + const quint8 _interval = 7; // keep awake call of the UI board in ms -// Singleton -SINGLETON(FrameInterface); + QString _timestamp; protected: void timerEvent(QTimerEvent *);