Further development of Inertialsensor demonstration
This commit is contained in:
@@ -16,19 +16,26 @@ class ImuSerial
|
||||
void stop();
|
||||
|
||||
glm::quat get_quaternion();
|
||||
glm::vec3 get_accel();
|
||||
glm::vec3 get_gyro();
|
||||
const glm::mat4 get_rot_matrix();
|
||||
|
||||
private:
|
||||
std::string serial_device;
|
||||
unsigned int baud;
|
||||
std::mutex quat_mutex;
|
||||
std::mutex acc_mutex;
|
||||
std::mutex gyr_mutex;
|
||||
glm::quat quaternion;
|
||||
glm::vec3 acc;
|
||||
glm::vec3 gyr;
|
||||
std::thread worker;
|
||||
int stop_flag;
|
||||
int fd;
|
||||
friend void working_thread(ImuSerial *self);
|
||||
friend void update_quaternion(ImuSerial *self, const glm::quat &quat);
|
||||
|
||||
friend void update_acc_value(ImuSerial *self, const glm::vec3 &acc);
|
||||
friend void update_gyr_value(ImuSerial *self, const glm::vec3 &gyr);
|
||||
};
|
||||
|
||||
|
||||
|
@@ -4,7 +4,7 @@
|
||||
#include <string>
|
||||
#include <epoxy/gl.h>
|
||||
#include <opengl-playground/openglshader.hpp>
|
||||
//#include <glm/glm.hpp>
|
||||
#include <glm/glm.hpp>
|
||||
#include <memory>
|
||||
|
||||
class OpenGlGraphics
|
||||
|
Reference in New Issue
Block a user