encapsulation and optimization
This commit is contained in:
@@ -5,18 +5,26 @@
|
||||
#include "SparkFun_BNO080_Arduino_Library.h"
|
||||
|
||||
class SensorManager {
|
||||
public:
|
||||
SensorManager();
|
||||
void sensorSetup();
|
||||
struct Rotation {
|
||||
float i;
|
||||
float j;
|
||||
float k;
|
||||
float w;
|
||||
};
|
||||
Rotation readLoop();
|
||||
private:
|
||||
BNO080 myIMU;
|
||||
public:
|
||||
SensorManager();
|
||||
void sensorSetup();
|
||||
struct eulerAngles {
|
||||
float yaw;
|
||||
float pitch;
|
||||
float roll;
|
||||
};
|
||||
eulerAngles getEulerAngles();
|
||||
|
||||
|
||||
private:
|
||||
struct RotationQuintillions {
|
||||
float i;
|
||||
float j;
|
||||
float k;
|
||||
float w;
|
||||
};
|
||||
RotationQuintillions getQuintillions();
|
||||
BNO080 myIMU;
|
||||
};
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user