From 36a1e291f10fa5e64cb817641f16b50825d1e1fa Mon Sep 17 00:00:00 2001 From: rusefillc Date: Fri, 18 Dec 2020 14:52:11 -0500 Subject: [PATCH] progress --- .../autotest/src/com/rusefi/PwmHardwareTest.java | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/java_console/autotest/src/com/rusefi/PwmHardwareTest.java b/java_console/autotest/src/com/rusefi/PwmHardwareTest.java index 0f49a13a9b..247c895652 100644 --- a/java_console/autotest/src/com/rusefi/PwmHardwareTest.java +++ b/java_console/autotest/src/com/rusefi/PwmHardwareTest.java @@ -15,10 +15,10 @@ import static com.rusefi.config.generated.Fields.*; * This test relies on jumpers connecting physical pins on Discovery: * PD1<>PC6 * PD2<>PA5 - * */ public class PwmHardwareTest { + private static final int FREQUENCY = 160; @Test public void testIdlePin() { @@ -40,10 +40,10 @@ public class PwmHardwareTest { ecu.sendCommand(CMD_TRIGGER_PIN + " 1 PA8"); /* DBG_LOGIC_ANALYZER */ - ecu.sendCommand("set debug_mode 45"); + ecu.sendCommand("set debug_mode " + DBG_DBG_LOGIC_ANALYZER); /* 160 Hz */ - ecu.sendCommand("set idle_solenoid_freq 160"); + ecu.sendCommand("set idle_solenoid_freq " + FREQUENCY); /* save these for last to ensure logic is started */ ecu.sendCommand(CMD_LOGIC_PIN + " 0 PA5"); @@ -54,12 +54,6 @@ public class PwmHardwareTest { sleep(2 * Timeouts.SECOND); /* +-1% is still acceptable */ - EcuTestHelper.assertEquals("Idle PWM freq", 160, SensorCentral.getInstance().getValue(Sensor.debugIntField1),0.01); - - - if (ControllerConnectorState.firmwareVersion == null) - throw new IllegalStateException("firmwareVersion has not arrived"); - + EcuTestHelper.assertEquals("Idle PWM freq", FREQUENCY, SensorCentral.getInstance().getValue(Sensor.debugIntField1), 0.01); } - } \ No newline at end of file