EFI_TCU TS connected causes red LED #6543

HW CI improvement
This commit is contained in:
rusefi 2024-05-24 21:42:45 -04:00
parent 4665afc4ca
commit 1ea4401ac9
2 changed files with 25 additions and 2 deletions

View File

@ -6,9 +6,11 @@ import com.rusefi.core.Sensor;
import com.rusefi.core.SensorCentral; import com.rusefi.core.SensorCentral;
import org.junit.Test; import org.junit.Test;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import static com.devexperts.util.TimeUtil.SECOND; import static com.devexperts.util.TimeUtil.SECOND;
import static com.rusefi.IoUtil.sleepSeconds; import static com.rusefi.IoUtil.sleepSeconds;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
public class MiscTest extends RusefiTestBase { public class MiscTest extends RusefiTestBase {
@ -19,6 +21,17 @@ public class MiscTest extends RusefiTestBase {
bp.burn(); bp.burn();
} }
@Test
public void testGetAllOutputs() throws InterruptedException {
CountDownLatch responseLatch = new CountDownLatch(1);
ecu.getLinkManager().execute(() -> {
boolean result = ecu.getLinkManager().getBinaryProtocol().requestOutputChannels();
System.out.println("requestOutputChannels=" + result);
responseLatch.countDown();
});
responseLatch.await(1, TimeUnit.MINUTES);
}
@Test @Test
public void testMcuTemperature() throws InterruptedException { public void testMcuTemperature() throws InterruptedException {
double mcuTemp = Double.NaN; double mcuTemp = Double.NaN;

View File

@ -10,7 +10,7 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
public class SerialSandbox { public class SerialSandbox {
public static void main(String[] args) { public static void main(String[] args) throws InterruptedException {
boolean textPull = false; boolean textPull = false;
long startTime = System.currentTimeMillis(); long startTime = System.currentTimeMillis();
@ -32,5 +32,15 @@ public class SerialSandbox {
} catch (InterruptedException e) { } catch (InterruptedException e) {
throw new IllegalStateException("Not connected in time"); throw new IllegalStateException("Not connected in time");
} }
CountDownLatch latch = new CountDownLatch(1);
linkManager.execute(new Runnable() {
@Override
public void run() {
boolean result = linkManager.getBinaryProtocol().requestOutputChannels();
System.out.println("requestOutputChannels=" + result);
latch.countDown();
}
});
latch.await(1, TimeUnit.MINUTES);
} }
} }