-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdab_mot.h
63 lines (47 loc) · 1.08 KB
/
dab_mot.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
62
63
#ifndef DAB_MOT_H
#define DAB_MOT_H
#include <QObject>
#include <QDebug>
#include <QImage>
#include <QApplication>
#include <QPixmap>
#include </opt/include/mediaclient.h>
#include <fcntl.h> //for O_RDWR
#include <unistd.h> //for usleep
#include <charsets.h>
#include <mot_manager.h>
#include <tools.h>
class dab_mot : public QObject
{
Q_OBJECT
public:
explicit dab_mot(QObject *parent = nullptr);
std::vector<uint8_t> mot_data;
std::vector<uint8_t> dls_data;
size_t len;
int charset;
signals:
void new_mot(QImage MOTImage);
void new_label(QString);
public slots:
void dab_mot_start();
void dab_mot_stop();
private:
void dab_read_mot();
void dab_process_mot_data();
void dab_process_dls_data();
struct mot_xdata {
uint8_t status;
uint8_t type;
uint16_t len;
uint8_t data[512];
uint8_t bufq;
} *xdata;
MOTManager mot_manager;
QImage motImage;
bool mStop_mot;
//int width = 320;
//int height = 240;
QImage empty_image = QPixmap().toImage();
};
#endif // DAB_MOT_H