-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
⬆️ (IMUKit): IMUKit derive from interface
- Loading branch information
Showing
4 changed files
with
36 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Leka - LekaOS | ||
// Copyright 2023 APF France handicap | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
#pragma once | ||
|
||
#include "gmock/gmock.h" | ||
#include "interface/libs/IMUKit.hpp" | ||
|
||
namespace leka::mock { | ||
|
||
class IMUKit : public interface::IMUKit | ||
{ | ||
public: | ||
MOCK_METHOD(void, start, (), (override)); | ||
MOCK_METHOD(void, stop, (), (override)); | ||
MOCK_METHOD(void, setOrigin, (), (override)); | ||
MOCK_METHOD(EulerAngles, getEulerAngles, (), (const, override)); | ||
|
||
void onEulerAnglesReady(angles_ready_callback_t const &cb) override { angles_ready_callback = cb; } | ||
|
||
void call_angles_ready_callback(const EulerAngles &data) { angles_ready_callback(data); } | ||
|
||
private: | ||
angles_ready_callback_t angles_ready_callback {}; | ||
}; | ||
|
||
} // namespace leka::mock |