Override trigger gaps feature #2734
This commit is contained in:
parent
1ea5caa905
commit
cd5653ff84
|
@ -146,6 +146,17 @@ void Engine::initializeTriggerWaveform(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->ambiguousOperationMode,
|
||||
engineConfiguration->useOnlyRisingEdgeForTrigger, &engineConfiguration->trigger));
|
||||
|
||||
/**
|
||||
* this is only useful while troubleshooting a new trigger shape in the field
|
||||
* in very VERY rare circumstances
|
||||
*/
|
||||
if (CONFIG(overrideTriggerGaps)) {
|
||||
for (int gapIndex = 0;gapIndex<GAP_TRACKING_LENGTH;gapIndex++) {
|
||||
float gapOverride = CONFIG(triggerGapOverride[gapIndex]);
|
||||
TRIGGER_WAVEFORM(setTriggerSynchronizationGap3(/*gapIndex*/gapIndex, gapOverride * TRIGGER_GAP_DEVIATION_LOW, gapOverride * TRIGGER_GAP_DEVIATION_HIGH));
|
||||
}
|
||||
}
|
||||
|
||||
if (!TRIGGER_WAVEFORM(shapeDefinitionError)) {
|
||||
/**
|
||||
* 'initState' instance of TriggerState is used only to initialize 'this' TriggerWaveform instance
|
||||
|
@ -159,8 +170,9 @@ void Engine::initializeTriggerWaveform(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
}
|
||||
|
||||
|
||||
initVvtShape(0, initState PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
initVvtShape(1, initState PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
for (int camIndex = 0;camIndex < CAMS_PER_BANK;camIndex++) {
|
||||
initVvtShape(camIndex, initState PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
}
|
||||
|
||||
|
||||
if (!TRIGGER_WAVEFORM(shapeDefinitionError)) {
|
||||
|
|
|
@ -174,7 +174,7 @@ void configureMazdaProtegeLx(TriggerWaveform *s) {
|
|||
void initializeMazdaMiataVVtCamShape(TriggerWaveform *s) {
|
||||
s->initialize(FOUR_STROKE_CAM_SENSOR);
|
||||
|
||||
s->setTriggerSynchronizationGap2(8.50 * 0.75, 14.0);
|
||||
s->setTriggerSynchronizationGap2(8.50 * TRIGGER_GAP_DEVIATION_LOW, 14.0);
|
||||
|
||||
|
||||
s->addEvent720(325, T_PRIMARY, TV_FALL);
|
||||
|
|
|
@ -689,6 +689,10 @@ void onConfigurationChangeTriggerCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
changed |= isConfigurationChanged(camInputs[i]);
|
||||
}
|
||||
|
||||
for (int i = 0; i < GAP_TRACKING_LENGTH; i++) {
|
||||
changed |= isConfigurationChanged(triggerGapOverride[i]);
|
||||
}
|
||||
|
||||
changed |=
|
||||
isConfigurationChanged(trigger.type) ||
|
||||
isConfigurationChanged(ambiguousOperationMode) ||
|
||||
|
|
|
@ -1376,6 +1376,7 @@ menuDialog = main
|
|||
subMenu = limitsAndFallback, "Limits and fallbacks"
|
||||
subMenu = triggerConfiguration, "Trigger"
|
||||
subMenu = triggerConfiguration_IO, "Advanced Trigger"
|
||||
subMenu = triggerConfiguration_gap, "Trigger Gap Override"
|
||||
subMenu = std_separator
|
||||
subMenu = energySystems, "Battery and alternator"
|
||||
subMenu = std_separator
|
||||
|
@ -1835,6 +1836,15 @@ cmd_set_engine_type_default = "@@TS_IO_TEST_COMMAND_char@@\x00\x31\x00\x00"
|
|||
field = "Trigger Angle Advance", globalTriggerAngleOffset
|
||||
field = "Display logic signals", displayLogicLevelsInEngineSniffer
|
||||
|
||||
dialog = triggerConfiguration_gap, "Trigger Gap Override"
|
||||
field = "!This is a pretty advanced feature for when you are debugging trigger syncronizaion"
|
||||
field = "Override well known trigger gaps", overrideTriggerGaps
|
||||
field = gapTrackingLengthOverride, gapTrackingLengthOverride
|
||||
field = "First gap", triggerGapOverride1
|
||||
field = "Second gap", triggerGapOverride2
|
||||
field = "Third gap", triggerGapOverride3
|
||||
|
||||
|
||||
dialog = triggerConfiguration_IO, "Advanced Trigger"
|
||||
field = "!https://rusefi.com/s/vvt"
|
||||
; todo: code generator to hard-code all triggers not requiring VVT?
|
||||
|
|
Loading…
Reference in New Issue