refactoring
This commit is contained in:
parent
a542ff0ce0
commit
7782153fd3
|
@ -24,7 +24,7 @@ public class PCanIoStream extends AbstractIoStream {
|
|||
static Logging log = getLogging(PCanIoStream.class);
|
||||
|
||||
public static final TPCANHandle CHANNEL = TPCANHandle.PCAN_USBBUS1;
|
||||
private final IncomingDataBuffer dataBuffer;
|
||||
private final IncomingDataBuffer dataBuffer = createDataBuffer("[PCAN] ");
|
||||
private final PCANBasic can;
|
||||
private final IsoTpCanDecoder canDecoder = new IsoTpCanDecoder() {
|
||||
@Override
|
||||
|
@ -78,7 +78,6 @@ public class PCanIoStream extends AbstractIoStream {
|
|||
|
||||
public PCanIoStream(PCANBasic can) {
|
||||
this.can = can;
|
||||
dataBuffer = createDataBuffer("");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -5,6 +5,7 @@ import com.opensr5.ConfigurationImage;
|
|||
import com.rusefi.binaryprotocol.BinaryProtocol;
|
||||
import com.rusefi.config.generated.Fields;
|
||||
import com.rusefi.io.LinkManager;
|
||||
import com.rusefi.io.serial.AbstractIoStream;
|
||||
import com.rusefi.io.stream.PCanIoStream;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -18,7 +19,7 @@ public class PCanSandbox {
|
|||
private static final Logging log = getLogging(PCanSandbox.class);
|
||||
|
||||
public static void main(String[] args) throws IOException, InterruptedException {
|
||||
PCanIoStream tsStream = PCanIoStream.getPCANIoStream();
|
||||
AbstractIoStream tsStream = PCanIoStream.getPCANIoStream();
|
||||
if (tsStream == null)
|
||||
throw new IOException("No PCAN");
|
||||
|
||||
|
|
Loading…
Reference in New Issue