A partial commit that changes CANFrame over to be based on
QCanBusFrame so that things are more compatible with other Qt based CAN bus code. Not complete yet but getting there.
This commit is contained in:
@@ -300,20 +300,20 @@ void SnifferModel::update(CANConnection*, QVector<CANFrame>& pFrames)
|
||||
{
|
||||
foreach(const CANFrame& frame, pFrames)
|
||||
{
|
||||
if(!mMap.contains(frame.ID))
|
||||
if(!mMap.contains(frame.frameId()))
|
||||
{
|
||||
int index = std::distance(mMap.begin(), mMap.lowerBound(frame.ID));
|
||||
int index = std::distance(mMap.begin(), mMap.lowerBound(frame.frameId()));
|
||||
/* add the frame */
|
||||
beginInsertRows(QModelIndex(), index, index);
|
||||
mMap[frame.ID] = new SnifferItem(frame, mTimeSequence);
|
||||
mMap[frame.ID]->update(frame, mTimeSequence, mMuteNotched);
|
||||
mMap[frame.frameId()] = new SnifferItem(frame, mTimeSequence);
|
||||
mMap[frame.frameId()]->update(frame, mTimeSequence, mMuteNotched);
|
||||
endInsertRows();
|
||||
|
||||
emit idChange(frame.ID, true);
|
||||
emit idChange(frame.frameId(), true);
|
||||
}
|
||||
else
|
||||
//updateData
|
||||
mMap[frame.ID]->update(frame, mTimeSequence, mMuteNotched);
|
||||
mMap[frame.frameId()]->update(frame, mTimeSequence, mMuteNotched);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user