Bike-X  0.8
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Bikex.h
Go to the documentation of this file.
1 #ifndef BIKEX_H
2 #define BIKEX_H
3 
4 #include <Battery.h>
5 #include <Oximetry.h>
6 #include <Speed.h>
7 #include <Direction.h>
8 #include <Break.h>
9 #include <Unity.h>
10 #include <Ovr.h>
11 
12 #define MAX_DT 100 // 100 == (1/10) * 1000
13 #define MIN_DT 33 // 33 == (1/30) * 1000
14 #define SAMPLES_FPS 128
15 typedef struct _position
16 {
17  double x, y, z;
18 } xyz;
19 
20 class Bikex
21 {
22 public:
23 
29  float dt;
30 
34  float FRAME_RATE;
35 
40 
45 
49  unsigned char currBattery;
50 
54  unsigned char currHearBeat;
55 
60 
64  unsigned char currSpeed;
65 
69  unsigned char currDirection;
70 
78  float currAngle;
79 
84 
88  Ovr * ovr;
89 
94 
99 
104 
109 
114 
115  Bikex();
116  ~Bikex();
117 
121  void init();
122 
126  void printCurrState();
127 
128  // ********************* Methods declared in UML *************************
129 
134 
139 
143  void setBreakIntensity();
144 
149  int writeDevices();
150 
155  int readDevices();
156 
160  void play();
161 
166  float calcFPS(int dt);
167 
171 };
172 
173 #endif
void setBreakIntensity()
Definition: Bikex.cpp:118
xyz currPosition
Definition: Bikex.h:39
void calculatePlayerPosition()
Definition: Bikex.cpp:96
Bikex()
Definition: Bikex.cpp:22
Battery * battery
Definition: Bikex.h:93
Ovr * ovr
Definition: Bikex.h:88
int readDevices()
Definition: Bikex.cpp:146
Definition: Unity.h:15
void play()
Definition: Bikex.cpp:163
double x
Definition: Bikex.h:17
Definition: Bikex.h:20
unsigned char currHearBeat
Definition: Bikex.h:54
Break * _break
Definition: Bikex.h:98
Definition: Speed.h:6
struct _position xyz
Oximetry * oximetry
Definition: Bikex.h:108
unsigned char currSpeed
Definition: Bikex.h:64
int currDistance
Definition: Bikex.h:59
unsigned char currBattery
Definition: Bikex.h:49
double y
Definition: Bikex.h:17
Unity * unity
Definition: Bikex.h:83
double z
Definition: Bikex.h:17
float FRAME_RATE
Definition: Bikex.h:34
void printCurrState()
Definition: Bikex.cpp:81
Speed * speed
Definition: Bikex.h:113
float currAngle
Definition: Bikex.h:78
~Bikex()
Definition: Bikex.cpp:51
void calculatePlayerRotation()
Definition: Bikex.cpp:112
xyz currRotation
Definition: Bikex.h:44
float dt
Definition: Bikex.h:29
Definition: Ovr.h:15
Direction * direction
Definition: Bikex.h:103
unsigned char currDirection
Definition: Bikex.h:69
int writeDevices()
Definition: Bikex.cpp:127
void init()
Definition: Bikex.cpp:66
Definition: Break.h:6
float calcFPS(int dt)
Definition: Bikex.cpp:216
Definition: Battery.h:6