Closed untaman closed 2 years ago
I experienced this too. Losing pairs of bytes. It looks like newer FTDI devices use 512 byte packets rather than 64. The FTDI Class currently assumes packets that have repeats of 2 bytes of status and 62 bytes of data. The newer FTDI devices go 2 bytes of status followed by 510 bytes of data. There is a 1 bit difference in the first status byte that might be indicating 64/512 byte packets size but I have not been able to find information that confirms that.
Ah that makes sense. I did a work around. I triggered on textView onChange(). Which worked.
Hi! So i have a app that takes data from a teensy arduino via to usb and add it to a text field and then parses it. The issue i am having is that if i try to run another function in "onReceivedData" (a la get my location) I apparently seem to lose bytes in normally the 3rd buffer and fail the parse. But if i leave the function out it works fine. The buffers are 4x 2048 Bytes ( which i am loath to change size of ) appended to some text.
As stated before if i leave out the "GetLocandandBearing();" function this works if a good sample is provided. I am guessing the function cause the program to miss a byte or two and mangles the buffer thus making me fail at the parsing. But that is just a guess. I have tested the output from the teensy via hard coding it and it works fine. So what do? Else, is there a work around where i can trigger the function on the receiving of data for a event from the teensy?