MYNT-EYE-S-SDK/src/internal/motions.h

51 lines
1012 B
C
Raw Normal View History

2018-04-12 06:48:09 +03:00
#ifndef MYNTEYE_INTERNAL_MOTIONS_H_ // NOLINT
#define MYNTEYE_INTERNAL_MOTIONS_H_
#pragma once
#include <memory>
2018-04-12 07:22:55 +03:00
#include <mutex>
2018-04-12 06:48:09 +03:00
#include <vector>
#include "mynteye/callbacks.h"
2018-04-12 06:48:09 +03:00
#include "mynteye/mynteye.h"
MYNTEYE_BEGIN_NAMESPACE
class Channels;
class Motions {
public:
using motion_data_t = device::MotionData;
using motion_datas_t = std::vector<motion_data_t>;
using motion_callback_t = device::MotionCallback;
explicit Motions(std::shared_ptr<Channels> channels);
~Motions();
void SetMotionCallback(motion_callback_t callback);
void StartMotionTracking();
void StopMotionTracking();
void EnableMotionDatas(std::size_t max_size);
motion_datas_t GetMotionDatas();
private:
std::shared_ptr<Channels> channels_;
motion_callback_t motion_callback_;
motion_datas_t motion_datas_;
bool motion_datas_enabled_;
std::size_t motion_datas_max_size;
bool is_imu_tracking;
2018-04-12 07:22:55 +03:00
std::mutex mtx_datas_;
2018-04-12 06:48:09 +03:00
};
MYNTEYE_END_NAMESPACE
#endif // MYNTEYE_INTERNAL_MOTIONS_H_ NOLINT