From 13ec4b780d5de6a7e4688eef0599893544319ac1 Mon Sep 17 00:00:00 2001 From: Hugo Pezziardi Date: Mon, 6 Mar 2023 09:47:13 +0100 Subject: [PATCH] :building_construction: ((interface)): Add IMUKit interface --- include/interface/libs/IMUKit.hpp | 36 +++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 include/interface/libs/IMUKit.hpp diff --git a/include/interface/libs/IMUKit.hpp b/include/interface/libs/IMUKit.hpp new file mode 100644 index 0000000000..4d2f80459b --- /dev/null +++ b/include/interface/libs/IMUKit.hpp @@ -0,0 +1,36 @@ +// Leka - LekaOS +// Copyright 2023 APF France handicap +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#include + +namespace leka { + +struct EulerAngles { + float pitch; + float roll; + float yaw; +}; + +namespace interface { + + class IMUKit + { + public: + using angles_ready_callback_t = std::function; + + 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