Added in code to interface with the GVRET firmware on candue or gevcu hardware.

This commit is contained in:
Collin Kidder
2015-04-28 21:44:31 -04:00
parent b7cf954898
commit a29c83e2a7
6 changed files with 166 additions and 11 deletions
+19 -1
View File
@@ -10,6 +10,18 @@ namespace Ui {
class MainWindow;
}
enum STATE //keep this enum synchronized with the Arduino firmware project
{
IDLE,
GET_COMMAND,
BUILD_CAN_FRAME,
TIME_SYNC,
GET_DIG_INPUTS,
GET_ANALOG_INPUTS,
SET_DIG_OUTPUTS,
SETUP_CANBUS
};
class MainWindow : public QMainWindow
{
Q_OBJECT
@@ -21,17 +33,23 @@ public:
private slots:
void handleLoadFile();
void connButtonPress();
void readSerialData();
private:
Ui::MainWindow *ui;
CANFrameModel *model;
QSerialPort *port;
QByteArray inputBuffer;
STATE rx_state;
int rx_step;
CANFrame buildFrame;
void loadCRTDFile(QString);
void loadNativeCSVFile(QString);
void loadGenericCSVFile(QString);
void loadLogFile(QString);
void loadMicrochipFile(QString);
void addFrameToDisplay(CANFrame &);
void addFrameToDisplay(CANFrame &, bool);
void procRXChar(unsigned char);
};
#endif // MAINWINDOW_H