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 #172: Return DataViews instead of ArrayBuffers. #201

Merged
merged 3 commits into from Jan 19, 2016

Conversation

This makes it easier to access most Bluetooth values, since they encode
little-endian values of different sizes, rather than a uniform sequence of
platform-endian values.
@g-ortuno

This comment has been minimized.

Copy link
Contributor

g-ortuno commented Jan 19, 2016

You need to change the examples to use the DataView directly.

@jyasskin

This comment has been minimized.

Copy link
Member Author

jyasskin commented Jan 19, 2016

I fixed one last use of new Uint8Array, but I think I got everything else. What are you seeing?

@g-ortuno

This comment has been minimized.

Copy link
Contributor

g-ortuno commented Jan 19, 2016

parseHeartRate "parseHeartRate() would be defined using the heart_rate_measurement documentation to read the ArrayBuffer stored in a BluetoothGATTCharacteristic's value field" and the code to implement it.

@jyasskin

This comment has been minimized.

Copy link
Member Author

jyasskin commented Jan 19, 2016

@g-ortuno

This comment has been minimized.

Copy link
Contributor

g-ortuno commented Jan 19, 2016

Ah my bad. LGTM.

@beaufortfrancois

This comment has been minimized.

Copy link
Member

beaufortfrancois commented Jan 19, 2016

s/sensorLocationArray/sensorLocation/g as it's not an array buffer anymore.

@jyasskin

This comment has been minimized.

Copy link
Member Author

jyasskin commented Jan 19, 2016

I went with sensorLocationData so it doesn't collide with the variable that was initialized with let sensorLocation = sensorLocationArray.getUint8(0);.

jyasskin added a commit that referenced this pull request Jan 19, 2016
Fix #172: Return DataViews instead of ArrayBuffers.
@jyasskin jyasskin merged commit e8f002e into WebBluetoothCG:gh-pages Jan 19, 2016
@jyasskin jyasskin deleted the jyasskin:data-view branch Jan 19, 2016
thegecko added a commit to thegecko/bleat that referenced this pull request Feb 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.