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

newDataCallback returns copy of Bsec2 instance #37

Open
szprytny opened this issue Apr 21, 2024 · 0 comments
Open

newDataCallback returns copy of Bsec2 instance #37

szprytny opened this issue Apr 21, 2024 · 0 comments

Comments

@szprytny
Copy link

By calling newDataCallback this way:

newDataCallback(data, outputs, *this);

I do get copy of Bsec2 Instance. This is problematic when I want to know which instance is calling my handler. I would prefer to get pointer to Bsec2 address as a third argument of newDataCallback

typedef void (*bsecCallback)(const bme68xData data, const bsecOutputs outputs, const Bsec2 bsec);

so bsecCallback could be changed to something like:

typedef void (*bsecCallback)(const bme68xData data, const bsecOutputs outputs, Bsec2 *bsec);

I have very basic knowledge of c++, so I don't know if this approach would be correct. What do you think?

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

No branches or pull requests

1 participant