-
Notifications
You must be signed in to change notification settings - Fork 288
/
firmwareuploaderwindow.h
50 lines (41 loc) · 1.06 KB
/
firmwareuploaderwindow.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef FIRMWAREUPLOADERWINDOW_H
#define FIRMWAREUPLOADERWINDOW_H
#include <QDialog>
#include <QTimer>
#include "can_structs.h"
#include "connections/canconmanager.h"
#include "utility.h"
namespace Ui {
class FirmwareUploaderWindow;
}
class FirmwareUploaderWindow : public QDialog
{
Q_OBJECT
public:
explicit FirmwareUploaderWindow(const QVector<CANFrame> *frames, QWidget *parent = 0);
~FirmwareUploaderWindow();
public slots:
void gotTargettedFrame(CANFrame frame);
private slots:
void handleLoadFile();
void handleStartStopTransfer();
void updatedFrames(int);
void timerElapsed();
private:
void updateProgress();
void loadBinaryFile(QString);
void sendFirmwareChunk();
void sendFirmwareEnding();
Ui::FirmwareUploaderWindow *ui;
bool transferInProgress;
bool startedProcess;
int firmwareSize;
int currentSendingPosition;
int baseAddress;
int bus;
uint32_t token;
QByteArray firmwareData;
const QVector<CANFrame> *modelFrames;
QTimer *timer;
};
#endif // FIRMWAREUPLOADERWINDOW_H