forked from TradeCrafter/lepton3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLeptonThread.h
53 lines (39 loc) · 895 Bytes
/
LeptonThread.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
#ifndef TEXTTHREAD
#define TEXTTHREAD
#include <ctime>
#include <stdint.h>
#include <QThread>
#include <QtCore>
#include <QPixmap>
#include <QImage>
#include <QString>
#include <iostream>
#include <QPainter>
#include <cstdlib>
#define PACKET_SIZE 164 //Bytes
#define PACKET_SIZE_UINT16 (PACKET_SIZE/2)
#define NUMBER_OF_SEGMENTS 4
#define PACKETS_PER_SEGMENT 60
#define PACKETS_PER_FRAME (PACKETS_PER_SEGMENT*NUMBER_OF_SEGMENTS)
#define FRAME_SIZE_UINT16 (PACKET_SIZE_UINT16*PACKETS_PER_FRAME)
//#define FPS 27;
class LeptonThread : public QThread
{
Q_OBJECT;
public:
LeptonThread();
~LeptonThread();
void run();
public slots:
void performFFC();
void snapshot();
void drawSquare(float);
signals:
void updateText(QString);
void updateImage(QImage);
private:
QImage myImage;
uint8_t result[PACKET_SIZE*PACKETS_PER_FRAME];
uint16_t *frameBuffer;
};
#endif