usability/progress?

This commit is contained in:
rusefi 2024-09-08 19:52:56 -04:00
parent e980cc1881
commit 8a6c3d26d6
1 changed files with 12 additions and 3 deletions

View File

@ -100,8 +100,6 @@ public:
bool haveSeenHigh; bool haveSeenHigh;
}; };
// huh? until some point this was working with only '2' ms?!
constexpr int cycleDurationMs = 50;
constexpr int cycleCount = 4; constexpr int cycleCount = 4;
BoardConfig boardConfigs[] = { BoardConfig boardConfigs[] = {
@ -906,6 +904,17 @@ size_t getBoardsCount() {
typedef void (*CanRequestSender) (int testLineIndex, bool value); typedef void (*CanRequestSender) (int testLineIndex, bool value);
static int getCycleDurationMs() {
// if (currentBoard!=nullptr)
// .boardName
return 2;
// // huh? until some point this was working with only '2' ms?!
// constexpr int cycleDurationMs = 50;
// return cycleDurationMs;
}
static bool doTestEcuDigitalOutput(int testLineIndex, bool isLowSide, CanRequestSender sender, bool expectation) { static bool doTestEcuDigitalOutput(int testLineIndex, bool isLowSide, CanRequestSender sender, bool expectation) {
static DigitalResult result; static DigitalResult result;
memset(&result, 0, sizeof(result)); memset(&result, 0, sizeof(result));
@ -928,7 +937,7 @@ static bool doTestEcuDigitalOutput(int testLineIndex, bool isLowSide, CanRequest
// see also https://github.com/rusefi/rusefi-hardware/issues/252 // see also https://github.com/rusefi/rusefi-hardware/issues/252
int pullUpDownPinsBitmap = isLowSide << bankIndex; // i % 2 int pullUpDownPinsBitmap = isLowSide << bankIndex; // i % 2
setScenarioIndex(pullUpDownPinsBitmap); setScenarioIndex(pullUpDownPinsBitmap);
chThdSleepMilliseconds(cycleDurationMs); chThdSleepMilliseconds(getCycleDurationMs());
float voltage = getAdcValue(bankIndex); float voltage = getAdcValue(bankIndex);
// low side sends roughly 2.8 but 5v high side is closer to 1v // low side sends roughly 2.8 but 5v high side is closer to 1v