-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtripmaster.h
77 lines (53 loc) · 1.46 KB
/
tripmaster.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
64
65
66
67
68
69
70
71
72
73
74
#ifndef TRIPMASTER_H
#define TRIPMASTER_H
#include "screen.h"
#include "wheel.h"
#include "buttons.h"
#include "whatever.h"
#include "compass.h"
#include "trip.h"
class Wheel;
class Screen;
class Compass;
class Buttons;
class Trip;
class TripMaster {
friend class Screen;
private:
static TripMaster *instance;
TripMaster();
TripMaster(TripMaster const &other);
TripMaster& operator=(TripMaster const &other);
static Wheel* wheel;
static PinLayout* pinLayout;
static Screen* screen;
static Compass* compass;
static Buttons* buttons;
static Trip* trip1;
static Trip* trip2;
static Trip* tank;
static Direction currentDirection;
static Function currentFunction;
public:
static TripMaster* getInstance();
static void registerWheel(Wheel* _wheel);
static void registerPinLayout(PinLayout* _pinLayout);
static void registerScreen(Screen* _screen);
static void registerCompass(Compass* _compass);
static void registerButtons(Buttons* _buttons);
static void registerTrip1(Trip* _trip1);
static void registerTrip2(Trip* _trip2);
static void registerTank(Trip* _tank);
void setupPins();
static void wheelInterrupt();
static void increaseInterrupt();
static void decreaseInterrupt();
static void resetInterrupt();
static void wheelRotationDetected();
static void increaseTrip();
static void decreaseTrip();
static void resetTrip();
static void toggleMenu();
static void toggleDirection();
};
#endif