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

Fix: remove function definition for not implemented function "getTemperature". #28

Merged
merged 1 commit into from
Sep 6, 2023

Conversation

aentinger
Copy link
Contributor

This fixes #27.

Hi @simonmicro, you're right, the function is not implemented ...

At first I though this would be quick to fix, but the more I dived into the existing library the more roadblocks I encountered.

The main issue is that this library is built around a sensor interface library provided by Bosch (BMI270-Sensor-API). And while the sensor provides a temperature sensor and it would be relatively easy to bypass the Bosch interface library to directly read it out doing so could create problems down the road (since then there would be direct chip access bypassing the Bosch interface library). Extending the Bosch interface library would have been the option, but boy is that one tailored for a specific use case. Given that I have neither the time nor the mandate to do this I'm going with the easiest option - removing the misleading prototype so that future users do not fall into the same trap.

@aentinger aentinger self-assigned this Sep 6, 2023
@aentinger aentinger merged commit 837088a into master Sep 6, 2023
@aentinger aentinger deleted the fix-27 branch September 6, 2023 09:34
@per1234 per1234 added type: imperfection Perceived defect in any part of project topic: code Related to content of the project itself labels Sep 6, 2023
@simonmicro
Copy link

simonmicro commented Sep 6, 2023

Heyho @aentinger ,

thanks for your time looking into it - but do not be afraid of the Bosch C-Library!

but boy is that one tailored for a specific use case

Boi - you are very right! I have to admit, starting from scratch is very unintuitive, but... Well... I did it myself, after this library failed to provide me the needed features (specifically raw register access) 🤣

https://github.com/Open-Smartwatch/open-smartwatch-os/blob/feature/flow3r_badge/src/devices/bmi270.cpp

...in case you are wondering how access the correct register to retrieve the temperature, there you go:

https://github.com/Open-Smartwatch/open-smartwatch-os/blob/8a0e48a3cfc46f04479f64957ed3232aa1904700/src/devices/bmi270.cpp#L154

After much bit-banging I also figured that out, sadly the Bosch library does not offer any easy way (or defines) to directly access that. By the way, much thanks for your work - it was a really great start to build my own implementation of it! Thank you very much! ❤️

Hope this helps 😉

@aentinger
Copy link
Contributor Author

aentinger commented Sep 7, 2023

Hah, I even looked at your fork at https://github.com/Open-Smartwatch/BMI270-Sensor-API 😉 .

Thank you for pointing out your solution, I'll create a feature request with Bosch, so that they may find it in their power to extend the API.

@aentinger
Copy link
Contributor Author

Or maybe there is a way ... https://github.com/boschsensortec/BMI270-Sensor-API/blob/master/bmi270_examples/temperature/temperature.c 🤔 ? Reopening - need to examine this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing implementation of getTemperature()
3 participants