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

No way to check ConversionReadyFlag only waitForConversion is possible. #43

Closed
miky2k opened this issue May 28, 2019 · 3 comments
Closed
Assignees
Labels
enhancement New feature or request

Comments

@miky2k
Copy link

miky2k commented May 28, 2019

To coordinate reading of data from ina226 registers is necessary to read ConversionReadyFlag,
but it can done only calling waitForConversion,
that function in not cooperative multithread friendly (in esp8266 is necessary to call yeld or delay function when waiting).
I suggest same function whit single device target without loop and return cvBits.

@SV-Zanshin SV-Zanshin self-assigned this May 28, 2019
@SV-Zanshin SV-Zanshin added the enhancement New feature or request label May 28, 2019
@SV-Zanshin
Copy link
Collaborator

The existing routine can't be changed that way due to backwards compatibility issues with existing code. But it does open up the possibility of creating a conversionState() function which could return the state for either a single device or all devices. Let me think upon this.

@SV-Zanshin
Copy link
Collaborator

I lost this open issue, sorry! I'm working on adding a new function called "conversionFinished" which returns a true or false for a given device.

SV-Zanshin pushed a commit that referenced this issue Sep 2, 2019
Added new method "conversionFinished()"
@SV-Zanshin
Copy link
Collaborator

I've added the new "conversionFinished()" method.

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