Completely revamped frame playback window that can play back files in sequence with various forms of looping.
This commit is contained in:
@@ -6,11 +6,22 @@
|
||||
#include <QTimer>
|
||||
#include "can_structs.h"
|
||||
#include "serialworker.h"
|
||||
#include "framefileio.h"
|
||||
|
||||
namespace Ui {
|
||||
class FramePlaybackWindow;
|
||||
}
|
||||
|
||||
//one entry in the sequence of data to use
|
||||
struct SequenceItem
|
||||
{
|
||||
QString filename;
|
||||
QVector<CANFrame> data;
|
||||
QHash<int, bool> idFilters;
|
||||
int maxLoops;
|
||||
int currentLoopCount;
|
||||
};
|
||||
|
||||
class FramePlaybackWindow : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -33,6 +44,10 @@ private slots:
|
||||
void btnSelectAllClick();
|
||||
void btnSelectNoneClick();
|
||||
void timerTriggered();
|
||||
void btnLoadFile();
|
||||
void btnLoadLive();
|
||||
void seqTableCellClicked(int row, int col);
|
||||
void seqTableCellChanged(int row, int col);
|
||||
|
||||
signals:
|
||||
void sendCANFrame(const CANFrame *, int);
|
||||
@@ -48,10 +63,14 @@ private:
|
||||
bool playbackActive;
|
||||
bool playbackForward;
|
||||
int whichBusSend;
|
||||
QList<SequenceItem> seqItems;
|
||||
SequenceItem *currentSeqItem;
|
||||
int currentSeqNum;
|
||||
|
||||
void refreshIDList();
|
||||
void updateFrameLabel();
|
||||
void updatePosition(bool forward);
|
||||
void fillIDHash(SequenceItem &item);
|
||||
};
|
||||
|
||||
#endif // FRAMEPLAYBACKWINDOW_H
|
||||
|
||||
Reference in New Issue
Block a user