engine sniffer - pins are not displayed #1995

This commit is contained in:
rusefillc 2020-12-01 22:57:00 -05:00
parent e89c042593
commit 3b6f3bb8ca
1 changed files with 15 additions and 3 deletions

View File

@ -2,6 +2,8 @@ package com.rusefi;
import com.devexperts.logging.Logging;
import com.rusefi.autodetect.PortDetector;
import com.rusefi.config.generated.Fields;
import com.rusefi.core.EngineState;
import com.rusefi.io.LinkManager;
import org.jetbrains.annotations.NotNull;
@ -15,9 +17,9 @@ import static com.rusefi.Timeouts.SECOND;
* A few jumper wires are used to test some subsystems as realistically as possible:
* PD1 <=> PC6
* PD2 <=> PA5
*
*
*
* <p>
* <p>
* <p>
* this test connects to real hardware via serial port
* Andrey Belomutskiy, (c) 2013-2020
* 2/22/2015
@ -25,6 +27,7 @@ import static com.rusefi.Timeouts.SECOND;
public class RealHwTest {
private static final Logging log = getLogging(RealHwTest.class);
private static final int STARTUP_SLEEP = 20;
private volatile static String firmwareVersion;
public static void main(String[] args) throws InterruptedException {
log.info("Sleeping " + STARTUP_SLEEP + " seconds to give OS time to connect VCP driver");
@ -92,9 +95,18 @@ public class RealHwTest {
private static void runRealHardwareTest(String port) {
LinkManager linkManager = new LinkManager().setCompositeLogicEnabled(false);
linkManager.getEngineState().registerStringValueAction(Fields.PROTOCOL_VERSION_TAG, new EngineState.ValueCallback<String>() {
@Override
public void onUpdate(String firmwareVersion) {
RealHwTest.firmwareVersion = firmwareVersion;
}
});
IoUtil.realHardwareConnect(linkManager, port);
// first run tests which require real hardware
new HardwareTests(linkManager.getCommandQueue()).runRealHardwareTests();
if (firmwareVersion == null)
throw new IllegalStateException("firmwareVersion has not arrived");
// now run common part of the test which should be same on real hardware and simulator
new AutoTest(linkManager, linkManager.getCommandQueue()).mainTestBody();