ITPNYU / p5.ble.js

A Javascript library that enables communication between BLE devices and a p5 sketch using Web Bluetooth API. https://itpnyu.github.io/p5ble-website.
MIT License
41 stars 29 forks source link

Quick fix for issue 6 #7

Closed armsp closed 4 years ago

armsp commented 4 years ago

As discussed the proper fix will be pushed later. This fix fixes a more common use case where data is little endian. This would fail if big endian data is passed to p5.ble.js.

@yining1023 I followed the steps mentioned in CONTRIBUTING.md. Everything was a success. Tested the code too using <script src="http://localhost:8080/p5.ble.js"></script>. However the modified files in the dist folder - which are the actual library that we release - were not committed as they are ignored from the .gitignore file. Hence only parseData.js has been pushed here.
Is this correct? This is my first time developing with javascript so I don't know the exact details. Please let me know if I made a mistake, I will correct it soon.

yining1023 commented 4 years ago

Hi, @armsp, this looks good! I will merge it now. I will make some API change to support big-endian soon, and publish a new version of the library.

this is correct! dist is ignored. When a new version is published, a new public link to the library will be generated. (But I'm thinking it might be helpful to keep it in case people would like to download it and use it locally.)

Thank you for your contribution, @armsp! 🎉❤️