diff --git a/firmware/console/binary/output_channels.txt b/firmware/console/binary/output_channels.txt index 9d86e0a36b..e45f5ae80f 100644 --- a/firmware/console/binary/output_channels.txt +++ b/firmware/console/binary/output_channels.txt @@ -287,7 +287,8 @@ uint16_t rpmAcceleration;dRPM;"RPM/s",1, 0, 0, 0, 0 int luaInvocationCounter;;"count",1, 0, 0, 0, 0 int luaLastCycleDuration;;"nt",1, 0, 0, 0, 0 - uint8_t[80 iterate] unusedAtTheEnd;;"",1, 0, 0, 0, 0 + uint8_t testBenchIter;;"count",1, 0, 0, 0, 0 + uint8_t[79 iterate] unusedAtTheEnd;;"",1, 0, 0, 0, 0 bit launchSpeedCondition bit launchRpmCondition diff --git a/firmware/controllers/bench_test.cpp b/firmware/controllers/bench_test.cpp index 39a205440e..649c5c93bc 100644 --- a/firmware/controllers/bench_test.cpp +++ b/firmware/controllers/bench_test.cpp @@ -99,6 +99,7 @@ static void runBench(brain_pin_e brainPin, OutputPin *output, float startDelayMs isRunningBench = true; for (int i = 0; i < count; i++) { + engine->outputChannels.testBenchIter = i; efitick_t nowNt = getTimeNowNt(); // start in a short time so the scheduler can precisely schedule the start event efitick_t startTime = nowNt + US2NT(50); @@ -111,7 +112,8 @@ static void runBench(brain_pin_e brainPin, OutputPin *output, float startDelayMs // Wait one full cycle time for the event + delay to happen chThdSleepMicroseconds(onTimeUs + offTimeUs); } - + /* last */ + engine->outputChannels.testBenchIter++; efiPrintf("Done!"); isRunningBench = false; diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index 28838f3639..cae38de583 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -986,6 +986,7 @@ triggerVvtFallGauge = triggerVvtFall,"triggerVvtFall", "", -10000.0,10000.0, -10 triggerVvtRiseGauge = triggerVvtRise,"triggerVvtRise", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 3,3 luaInvocationCounterGauge = luaInvocationCounter,"luaInvocationCounter", "count", 0.0,0.0, 0.0,0.0, 0.0,0.0, 0,0 luaLastCycleDurationGauge = luaLastCycleDuration,"luaLastCycleDuration", "nt", 0.0,0.0, 0.0,0.0, 0.0,0.0, 0,0 +testBenchIterGauge = testBenchIter, "Test Bench Iterations", "count", -10, {benchTestCount + 10}, -5, 0, {benchTestCount}, {benchTestCount + 5}, 1, 1 gaugeCategory = PIDs alternatorStatus_iTermGauge = alternatorStatus_iTerm,"alternatorStatus_ iTerm", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 3,3 @@ -1554,6 +1555,7 @@ menuDialog = main subMenu = ecuStimulator, "ECU stimulator" subMenu = datalogSettings, "Datalogging" subMenu = ioTest, "Bench test" + subMenu = injTest, "Injector test" subMenu = engineTypeDialog, "Popular vehicles" subMenu = std_separator @@ -3561,6 +3563,20 @@ cmd_set_engine_type_default = "@@TS_IO_TEST_COMMAND_char@@\x00\x31\x00\x00" panel = testFsio panel = testMisc + ; Injectors test + dialog = injTest_l, "Output test modes", yAxis + field = "Iterations", benchTestCount + field = "ON time", benchTestOffTime + field = "OFF time", benchTestOnTime + + dialog = injTest_r, "Reference gauges", yAxis + gauge = VBattGauge,North + gauge = testBenchIterGauge,South + + dialog = injTest, "", xAxis + panel = injTest_l + panel = injTest_r + dialog = widebandConfig, "rusEFI Wideband Config" field = "!Please connect exactly one wideband controller before pressing these buttons!" commandButton = "Update Firmware", cmd_wideband_firmare_update