Test bench: implement injector test for dead time calculation (#3960)
* Add output channel for TestBench iter counter * Update testBenchIter from runBench * rusefi.input: testBenchIter gauge * rusefi.input: initial Injector test dialog
This commit is contained in:
parent
3e0f099662
commit
f2b0d0692f
|
@ -287,7 +287,8 @@ uint16_t rpmAcceleration;dRPM;"RPM/s",1, 0, 0, 0, 0
|
||||||
|
|
||||||
int luaInvocationCounter;;"count",1, 0, 0, 0, 0
|
int luaInvocationCounter;;"count",1, 0, 0, 0, 0
|
||||||
int luaLastCycleDuration;;"nt",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 launchSpeedCondition
|
||||||
bit launchRpmCondition
|
bit launchRpmCondition
|
||||||
|
|
|
@ -99,6 +99,7 @@ static void runBench(brain_pin_e brainPin, OutputPin *output, float startDelayMs
|
||||||
isRunningBench = true;
|
isRunningBench = true;
|
||||||
|
|
||||||
for (int i = 0; i < count; i++) {
|
for (int i = 0; i < count; i++) {
|
||||||
|
engine->outputChannels.testBenchIter = i;
|
||||||
efitick_t nowNt = getTimeNowNt();
|
efitick_t nowNt = getTimeNowNt();
|
||||||
// start in a short time so the scheduler can precisely schedule the start event
|
// start in a short time so the scheduler can precisely schedule the start event
|
||||||
efitick_t startTime = nowNt + US2NT(50);
|
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
|
// Wait one full cycle time for the event + delay to happen
|
||||||
chThdSleepMicroseconds(onTimeUs + offTimeUs);
|
chThdSleepMicroseconds(onTimeUs + offTimeUs);
|
||||||
}
|
}
|
||||||
|
/* last */
|
||||||
|
engine->outputChannels.testBenchIter++;
|
||||||
|
|
||||||
efiPrintf("Done!");
|
efiPrintf("Done!");
|
||||||
isRunningBench = false;
|
isRunningBench = false;
|
||||||
|
|
|
@ -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
|
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
|
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
|
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
|
gaugeCategory = PIDs
|
||||||
alternatorStatus_iTermGauge = alternatorStatus_iTerm,"alternatorStatus_ iTerm", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 3,3
|
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 = ecuStimulator, "ECU stimulator"
|
||||||
subMenu = datalogSettings, "Datalogging"
|
subMenu = datalogSettings, "Datalogging"
|
||||||
subMenu = ioTest, "Bench test"
|
subMenu = ioTest, "Bench test"
|
||||||
|
subMenu = injTest, "Injector test"
|
||||||
subMenu = engineTypeDialog, "Popular vehicles"
|
subMenu = engineTypeDialog, "Popular vehicles"
|
||||||
subMenu = std_separator
|
subMenu = std_separator
|
||||||
|
|
||||||
|
@ -3561,6 +3563,20 @@ cmd_set_engine_type_default = "@@TS_IO_TEST_COMMAND_char@@\x00\x31\x00\x00"
|
||||||
panel = testFsio
|
panel = testFsio
|
||||||
panel = testMisc
|
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"
|
dialog = widebandConfig, "rusEFI Wideband Config"
|
||||||
field = "!Please connect exactly one wideband controller before pressing these buttons!"
|
field = "!Please connect exactly one wideband controller before pressing these buttons!"
|
||||||
commandButton = "Update Firmware", cmd_wideband_firmare_update
|
commandButton = "Update Firmware", cmd_wideband_firmare_update
|
||||||
|
|
Loading…
Reference in New Issue