-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgpsthread.h
61 lines (46 loc) · 964 Bytes
/
gpsthread.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
51
52
53
54
55
56
57
58
59
60
61
#ifndef GPSTHREAD_H
#define GPSTHREAD_H
#include <QObject>
#include <QWidget>
#include <QLabel>
#include <QTimer>
#include <QThread>
#include <QDebug>
#include <QCoreApplication>
#include <string>
#include <iostream>
#include "Timestamp.h"
#include "Strtok_m.h"
#include "Can_serial.h"
#define GPSDEVICE "/dev/ttyACM0"
#define BAUDRATE B9600
class gpsThread : public QThread
{
Q_OBJECT
public:
explicit gpsThread(QObject *parent = 0);
Timestamp ts;
Strtok_m stm;
Can_serial cs;
int iDev;
int iRet;
string latitude;
string longitude;
char cBuff[526];
const char * mtime;
string dir;
string path;
ofstream writeFile;
QTimer timer;
bool stop_flag = false;
long double Convert_to_dd(long double raw);
public slots:
void get_dir(QString);
void stop();
private:
void run() override;
signals:
void send_ll(QString, QString);
void send_end();
};
#endif // GPSTHREAD_H