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

How can I read a Unsigned Int of 24 bits,three octets? #18

Closed
CristianMG opened this issue Dec 2, 2022 · 2 comments
Closed

How can I read a Unsigned Int of 24 bits,three octets? #18

CristianMG opened this issue Dec 2, 2022 · 2 comments

Comments

@CristianMG
Copy link

I'm using this library to read bluetooth values, in some standards exist this type of value.
uint24. There are ways to read this, with this library.

@CristianMG CristianMG changed the title How can I read a Unsigned 24 bits,three octets. How can I read a Unsigned Int of 24 bits,three octets? Dec 2, 2022
@thebehera
Copy link
Contributor

thebehera commented Dec 15, 2022

Hi, that currently isn't supported at the moment. Feel free to add this as an option!

You could try by reading three bytes from the buffer, then manually converting that to a uint24

@thebehera
Copy link
Contributor

@CristianMG in the latest version (1.1.3) you can try using ReadBuffer. writeNumberOfByteSize(3).toInt()

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

2 participants