proxy progress
This commit is contained in:
parent
ebecc65404
commit
a15c7104fd
|
@ -106,7 +106,7 @@ public class BinaryProtocol implements BinaryProtocolCommands {
|
|||
|
||||
private final Thread hook = new Thread(() -> closeComposites());
|
||||
|
||||
public BinaryProtocol(LinkManager linkManager, final Logger logger, IoStream stream) {
|
||||
public BinaryProtocol(LinkManager linkManager, final Logger logger, IoStream stream, IncomingDataBuffer dataBuffer) {
|
||||
this.linkManager = linkManager;
|
||||
this.logger = logger;
|
||||
this.stream = stream;
|
||||
|
@ -118,7 +118,7 @@ public class BinaryProtocol implements BinaryProtocolCommands {
|
|||
}
|
||||
};
|
||||
|
||||
incomingData = IncomingDataBuffer.createDataBuffer(stream, logger);
|
||||
incomingData = dataBuffer;
|
||||
Runtime.getRuntime().addShutdownHook(hook);
|
||||
rpmListener = value -> {
|
||||
if (value <= COMPOSITE_OFF_RPM) {
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.rusefi.io.serial;
|
|||
import com.opensr5.Logger;
|
||||
import com.rusefi.Callable;
|
||||
import com.rusefi.binaryprotocol.BinaryProtocol;
|
||||
import com.rusefi.binaryprotocol.IncomingDataBuffer;
|
||||
import com.rusefi.core.MessagesCentral;
|
||||
import com.rusefi.io.ConnectionStateListener;
|
||||
import com.opensr5.io.DataListener;
|
||||
|
@ -53,7 +54,7 @@ public class PortHolder {
|
|||
return false;
|
||||
}
|
||||
synchronized (portLock) {
|
||||
bp = new BinaryProtocol(linkManager, logger, stream);
|
||||
bp = new BinaryProtocol(linkManager, logger, stream, IncomingDataBuffer.createDataBuffer(stream, logger));
|
||||
portLock.notifyAll();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue