kopia lustrzana https://github.com/felHR85/UsbSerial
minor fix
rodzic
1dbe983cc7
commit
e74f659894
Plik binarny nie jest wyświetlany.
Plik binarny nie jest wyświetlany.
Plik binarny nie jest wyświetlany.
Plik binarny nie jest wyświetlany.
|
@ -120,12 +120,15 @@ public abstract class UsbSerialDevice implements UsbSerialInterface
|
|||
byte[] data = serialBuffer.getDataReceived();
|
||||
// FTDI devices reserves two first bytes of an IN endpoint with info about
|
||||
// modem and Line.
|
||||
if(isFTDIDevice() && data.length > 2)
|
||||
if(isFTDIDevice())
|
||||
{
|
||||
data = FTDISerialDevice.FTDIUtilities.adaptArray(data);
|
||||
// Clear buffer, execute the callback
|
||||
serialBuffer.clearReadBuffer();
|
||||
onReceivedData(data);
|
||||
if(data.length > 2)
|
||||
{
|
||||
data = FTDISerialDevice.FTDIUtilities.adaptArray(data);
|
||||
// Clear buffer, execute the callback
|
||||
serialBuffer.clearReadBuffer();
|
||||
onReceivedData(data);
|
||||
}
|
||||
}else
|
||||
{
|
||||
// Clear buffer, execute the callback
|
||||
|
|
Ładowanie…
Reference in New Issue