-
Notifications
You must be signed in to change notification settings - Fork 0
/
tachometer_window.h
executable file
·51 lines (38 loc) · 1.09 KB
/
tachometer_window.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
#ifndef TACHOMETER_WINDOW_H
#define TACHOMETER_WINDOW_H
#include <QWidget>
#include <QOpenGLWidget>
#include "tachometer.h"
#include "psa_van_receiver.h"
namespace Ui {
class tachometer_window;
}
class tachometer_window : public QWidget
{
Q_OBJECT
public:
explicit tachometer_window(QWidget *parent = nullptr);
~tachometer_window();
QTimer* screen_refresh_timer;
void change_tacho_angle(int rpm);
void update_display();
void change_speed(int speed);
void set_van_handle(psa_van_receiver* van_handle);
public slots:
void receive_engine_data(psa_engine_data_t engine_data);
void receive_dash_data(psa_dash_data_t dash_data);
void receive_trip_data(psa_trip_data_t trip_data);
void toggle_trip_visibility();
void send_trip_reset_a();
void send_trip_reset_b();
private:
Ui::tachometer_window *ui;
QGraphicsScene *scene;
tachometer *tacho_handle;
psa_van_receiver *van_handle;
QOpenGLWidget* widget;
int speed_x, speed_y;
psa_van_receiver *van_receiver = NULL;
int window_visible = 0;
};
#endif // TACHOMETER_WINDOW_H