Skip to content

Commit

Permalink
🏗️ ((interface)): Add IMUKit interface
Browse files Browse the repository at this point in the history
  • Loading branch information
HPezz committed Mar 6, 2023
1 parent c00770c commit 13ec4b7
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions include/interface/libs/IMUKit.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// Leka - LekaOS
// Copyright 2023 APF France handicap
// SPDX-License-Identifier: Apache-2.0

#pragma once

#include <functional>

namespace leka {

struct EulerAngles {
float pitch;
float roll;
float yaw;
};

namespace interface {

class IMUKit
{
public:
using angles_ready_callback_t = std::function<void(const EulerAngles &)>;

virtual ~IMUKit() = default;

virtual void start() = 0;
virtual void stop() = 0;

virtual void setOrigin() = 0;
virtual void onEulerAnglesReady(angles_ready_callback_t const &callback) = 0;
[[nodiscard]] virtual auto getEulerAngles() const -> EulerAngles = 0;
};

} // namespace interface

} // namespace leka

0 comments on commit 13ec4b7

Please sign in to comment.