Line 3... |
Line 3... |
3 |
|
3 |
|
4 |
#include <QWidget> |
4 |
#include <QWidget> |
5 |
#include <QTimer> |
5 |
#include <QTimer> |
6 |
#include <QSlider> |
6 |
#include <QSlider> |
7 |
#include <stdint.h> |
7 |
#include <stdint.h> |
- |
|
8 |
#include <QLabel> |
8 |
|
9 |
|
9 |
#define TICK 150 // time in ms for one sampling (of LEN values) |
10 |
#define TICK 250 // time in ms for one sample (LEN values) |
10 |
#define LEN 100 // number of sampled values |
11 |
#define LEN 100 // number of sampled values |
11 |
|
12 |
|
12 |
#define DEF_SCALE 256 //divisor |
13 |
#define DEF_SCALE 128 //divisor |
13 |
#define DEF_SHIFT 0 |
14 |
#define DEF_SHIFT 37203 |
14 |
|
15 |
|
15 |
#define LEFT 10 |
16 |
#define LEFT 10 |
16 |
#define TOP 10 |
17 |
#define TOP 10 |
17 |
#define PIXPT_X 4 |
18 |
#define PIXPT_X 4 |
18 |
#define PIXPT_Y 1 |
19 |
#define PIXPT_Y 1 |
Line 34... |
Line 35... |
34 |
|
35 |
|
35 |
protected: |
36 |
protected: |
36 |
void paintEvent(QPaintEvent *event); |
37 |
void paintEvent(QPaintEvent *event); |
37 |
|
38 |
|
38 |
private: |
39 |
private: |
- |
|
40 |
|
39 |
uint8_t buffer[2*LEN]; |
41 |
uint8_t buffer[2*LEN]; |
40 |
int data[LEN]; |
42 |
int data[LEN]; |
41 |
char dataAquired; |
43 |
char dataAquired; |
- |
|
44 |
void UI(void); |
42 |
|
45 |
|
43 |
long shift, scale; |
46 |
int shift, scale; |
44 |
|
47 |
|
45 |
QTimer *updateTimer; |
48 |
QTimer *updateTimer; |
46 |
QSlider *shiftSlider; |
49 |
QSlider *shiftSlider; |
47 |
QSlider *scaleSlider; |
50 |
QSlider *scaleSlider; |
- |
|
51 |
|
- |
|
52 |
QLabel * labels[5]; |
48 |
}; |
53 |
}; |
49 |
|
54 |
|
50 |
#endif |
55 |
#endif |