mirror of https://github.com/rusefi/rusefi-1.git
progress
This commit is contained in:
parent
8a3ccbc242
commit
bd588c0bf2
|
@ -20,7 +20,6 @@ import jssc.SerialPortException;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.io.EOFException;
|
import java.io.EOFException;
|
||||||
import java.io.FileWriter;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.nio.ByteOrder;
|
import java.nio.ByteOrder;
|
||||||
|
@ -99,11 +98,16 @@ public class BinaryProtocol implements BinaryProtocolCommands {
|
||||||
this.logger = logger;
|
this.logger = logger;
|
||||||
this.stream = stream;
|
this.stream = stream;
|
||||||
|
|
||||||
incomingData = new IncomingDataBuffer(logger);
|
incomingData = createDataBuffer(stream, logger);
|
||||||
stream.setInputListener(incomingData::addData);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void sleep(int millis) {
|
public static IncomingDataBuffer createDataBuffer(IoStream stream, Logger logger) {
|
||||||
|
IncomingDataBuffer incomingData = new IncomingDataBuffer(logger);
|
||||||
|
stream.setInputListener(incomingData::addData);
|
||||||
|
return incomingData;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void sleep(int millis) {
|
||||||
try {
|
try {
|
||||||
Thread.sleep(millis);
|
Thread.sleep(millis);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
|
|
Loading…
Reference in New Issue