felHR85 / UsbSerial

Usb serial controller for Android
MIT License
1.8k stars 585 forks source link

added chunked stream methods #253

Closed rabidaudio closed 5 years ago

rabidaudio commented 5 years ago

A lack of implementation of the array slice methods on SerialInputStream/SerialOutputStream was causing any users of those methods to use the single-byte implementations, causing a bulkTransfer to get called for every individual byte, which in addition to being bad for performance was causing communication problems with my device.

This PR implements those methods by creating appropriate array slices.

felHR85 commented 5 years ago

Thank you! @rabidaudio I will check it out as soon as possible.

felHR85 commented 5 years ago

I implemented what @TheSven73 suggested but still is not tested (branch rabidaudio-outputstream-fix ). It would be great if you could check it out.

felHR85 commented 5 years ago

It will be implemented here #262

rabidaudio commented 5 years ago

Thanks both of you. It's been a busy week but I'll try that branch out this weekend.

felHR85 commented 5 years ago

@rabidaudio It is already in master