Changed the way the filter system works in the CAN connection objects - now used only for sending frames immediately to relevant objects. Tested to work in firmware updater. Currently broken elsewhere. Also switched main frame update interval from 4 times per second to 8 to make things smoother.
This commit is contained in:
@@ -36,12 +36,30 @@ public:
|
||||
//just the multi-frame version of above function.
|
||||
bool sendFrames(const QList<CANFrame>& pFrames);
|
||||
|
||||
/**
|
||||
* @brief Add a new filter for the targetted frames. If a frame matches it will immediately be sent via the targettedFrameReceived signal
|
||||
* @param pBusId - Which bus to bond to. -1 for any, otherwise a bitfield of buses (but 0 = first bus, etc)
|
||||
* @param target - The filter to use for selected targetted frames
|
||||
* @return true if filter was able to be added, false otherwise.
|
||||
*/
|
||||
bool addTargettedFrame(int pBusId, const CANFlt &target);
|
||||
|
||||
/**
|
||||
* @brief Try to find a matching filter in the list and remove it, no longer targetting those frames
|
||||
* @param pBusId - Which bus to bond to. Doesn't have to match the call to addTargettedFrame exactly. You could disconnect just one bus for instance.
|
||||
* @param target - The filter that was set
|
||||
* @return true if filter was found and deleted, false otherwise.
|
||||
*/
|
||||
bool removeTargettedFrame(int pBusId, const CANFlt &target);
|
||||
|
||||
signals:
|
||||
void framesReceived(CANConnection* pConn_p, QVector<CANFrame>& pFrames);
|
||||
void targettedFrameReceived(CANFrame frame);
|
||||
void connectionStatusUpdated(int conns);
|
||||
|
||||
private slots:
|
||||
void refreshCanList();
|
||||
void refreshCanList();
|
||||
void gotTargettedFrame(CANFrame frame);
|
||||
|
||||
private:
|
||||
explicit CANConManager(QObject *parent = 0);
|
||||
|
||||
Reference in New Issue
Block a user