H7 console scare #3923
This commit is contained in:
parent
c0e28e35bc
commit
58dddb61a1
|
@ -2,7 +2,6 @@ package com.rusefi.binaryprotocol.test;
|
|||
|
||||
import com.rusefi.autodetect.PortDetector;
|
||||
import com.rusefi.autodetect.SerialAutoChecker;
|
||||
import com.rusefi.binaryprotocol.BinaryProtocol;
|
||||
import com.rusefi.io.HeartBeatListeners;
|
||||
import com.rusefi.io.LinkManager;
|
||||
|
||||
|
@ -11,6 +10,7 @@ import java.util.concurrent.CountDownLatch;
|
|||
|
||||
public class SerialSandbox {
|
||||
public static void main(String[] args) {
|
||||
boolean textPull = false;
|
||||
long startTime = System.currentTimeMillis();
|
||||
|
||||
SerialAutoChecker.AutoDetectResult autoDetectResult = PortDetector.autoDetectSerial(callbackContext -> null);
|
||||
|
@ -19,11 +19,11 @@ public class SerialSandbox {
|
|||
|
||||
HeartBeatListeners.INSTANCE.addListener(() -> {
|
||||
int seconds = (int) ((System.currentTimeMillis() - startTime) / 1000);
|
||||
System.out.println(new Date() + ": onDataArrival alive for " + seconds + " second(s) " + autoDetectResult.getSignature());
|
||||
System.out.println(new Date() + ": onDataArrival alive for " + seconds + " second(s) textPull=" + textPull + " " + autoDetectResult.getSignature());
|
||||
});
|
||||
|
||||
LinkManager linkManager = new LinkManager()
|
||||
.setNeedPullText(false) // todo: open issue #2
|
||||
.setNeedPullText(textPull) // todo: open issue #2
|
||||
.setNeedPullLiveData(true);
|
||||
CountDownLatch connected = linkManager.connect(port);
|
||||
if (connected.getCount() > 0)
|
||||
|
|
Loading…
Reference in New Issue