Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Imu Interface initialization and closing #7

Open
rikba opened this issue Oct 14, 2022 · 1 comment
Open

Imu Interface initialization and closing #7

rikba opened this issue Oct 14, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@rikba
Copy link
Contributor

rikba commented Oct 14, 2022

From a user perspective I find it difficult to know which functions I have to call when loading an IMU, e.g., init after object creation, init and burst CRC activation in factory, self-test in node init. Where does the IMU call its close() function?

I think it is worth to sit down and make a clearer architecture on how a "sensor" is added and removed. I can also see that any routine that cannot fail (or we have no method to react to a fail) can go to the IMU object constructor or destructor and hiding the functionality from the public interface.

@rikba rikba added the enhancement New feature or request label Oct 14, 2022
@rikba rikba changed the title Imu Interface Imu Interface initialization and closing Oct 14, 2022
@4c3y
Copy link
Member

4c3y commented Nov 16, 2022

I think we could change the ImuInterface::init() signature to
ImuInterface::init(const std::unordered_map<std::string, std::string> &config) to allow initialization of imu-specific settings, which could then also be loaded from a yaml file. With this change we could activate crc and burst and also execute the self-test from the ImuInterface::init function. We could then also remove the ImuNode::init() function.

The close function was never called and was part of bug #6. In #14 the ImuInterface::close() function is called after ImuNode::run_node is set to false by the SIGINT handler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants