testEcuDigitalOutput seems broken around high, low and banks fix #251

This commit is contained in:
rusefi 2023-10-29 13:31:07 -04:00
parent e2573c32dd
commit f2e7db001a
1 changed files with 5 additions and 3 deletions

View File

@ -269,9 +269,11 @@ bool testEcuDigitalOutput(int testLineIndex, bool isLowSide) {
// toggle the ECU pin for low side mode
sendCanPinState(testLineIndex, isSet ^ isLowSide);
int scenarioIndex = 1; // i % 2;
setScenarioIndex(scenarioIndex);
// wait for the pin to toggle
// at the moment we test both high-side and low-side in pull-up mode only
// effectively we could have just used constant 1111b pullUpDownPinsBitmap
// see also https://github.com/rusefi/rusefi-hardware/issues/252
int pullUpDownPinsBitmap = 1 << bankIndex; // i % 2
setScenarioIndex(pullUpDownPinsBitmap);
chThdSleepMilliseconds(cycleDurationMs);
float voltage = getAdcValue(bankIndex);