mirror of https://github.com/rusefi/rusefi-1.git
parent
a060991f73
commit
6d25864d98
|
@ -118,7 +118,7 @@ public class BinaryProtocol implements BinaryProtocolCommands {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
incomingData = stream.getDataBuffer();
|
incomingData = createDataBuffer(stream, logger);
|
||||||
Runtime.getRuntime().addShutdownHook(hook);
|
Runtime.getRuntime().addShutdownHook(hook);
|
||||||
rpmListener = value -> {
|
rpmListener = value -> {
|
||||||
if (value <= COMPOSITE_OFF_RPM) {
|
if (value <= COMPOSITE_OFF_RPM) {
|
||||||
|
@ -131,6 +131,12 @@ public class BinaryProtocol implements BinaryProtocolCommands {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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) {
|
public static void sleep(int millis) {
|
||||||
try {
|
try {
|
||||||
Thread.sleep(millis);
|
Thread.sleep(millis);
|
||||||
|
|
Loading…
Reference in New Issue