Much work on custom frame sender window. It is reasonably functional now and tested for timed sending

This commit is contained in:
Collin Kidder
2015-08-16 20:00:35 -04:00
parent 3ec7638e7b
commit 3f5d8b6159
4 changed files with 380 additions and 274 deletions
+21 -1
View File
@@ -3,6 +3,8 @@
#include <QDialog>
#include <QTimer>
#include <QElapsedTimer>
#include <QTime>
#include "can_structs.h"
#include "can_trigger_structs.h"
@@ -21,14 +23,26 @@ public:
private slots:
void onCellChanged(int, int);
void handleTick();
void enableAll();
void disableAll();
void clearGrid();
void saveGrid();
void loadGrid();
void updatedFrames(int);
signals:
void sendCANFrame(const CANFrame *, int);
private:
Ui::FrameSenderWindow *ui;
QList<FrameSendData> sendingData;
QList<CANFrame> frameCache;
QHash<int, CANFrame> frameCache; //hash with frame ID as the key and the most recent frame as the value
const QVector<CANFrame> *modelFrames;
QTimer *intervalTimer;
QElapsedTimer elapsedTimer;
bool inhibitChanged = false;
void createBlankRow();
void doModifiers(int);
int fetchOperand(int, ModifierOperand);
CANFrame* lookupFrame(int, int);
@@ -36,6 +50,12 @@ private:
void processTriggerText(int);
void parseOperandString(QStringList tokens, ModifierOperand&);
ModifierOperationType parseOperation(QString);
void saveSenderFile(QString filename);
void loadSenderFile(QString filename);
void updateGridRow(int idx);
void processCellChange(int line, int col);
void buildFrameCache();
void processIncomingFrame(CANFrame *frame);
};
#endif // FRAMESENDERWINDOW_H