Well,
Unfortunately, Prefix mode doesn't stop the messages queuing.
I am prefixing messages with little endian 4 byte value (first byte only = 60) and I can see the 64 byte USB messages coming in at regular intervals but the :
Sub AStream_NewData (Buffer() As Byte)
Dim localmsg As String
'If Buffer(0) = 1 AND Buffer(1) = 1 Then
localmsg = BytesToString(Buffer, 0, Buffer.Length, "UTF8") ' 3rd byte is start of data
Log(localmsg)
msg = localmsg.SubString(2) ' Process Global - First 2 bytes are command bytes
If IsPaused(Page2) = False Then
CallSub(Page2,"LoadLabelText") ' Only update label text if Page2 is active
End If
'End If
End Sub
Sub is only firing after about 2 minutes when 129 messages (60 bytes each) have queued.
Then all messages are dumped and the last message only is written to my labels.
I've tried moving AStream_NewData back into the current activity.
Tried stripping all other code out of activity but no change.
My messages are 64 bytes including 4 prefix bytes, so I use a prefix value of 60.
Running out of ideas.
Outgoing packets when buttons are pressed are immediate so there is no delay with the outgoing USB traffic.
Is there a way to stop messages queuing at AStream_NewData?
FP