triggerImage: todo: support symmetrical crank

This commit is contained in:
rusefillc 2022-10-16 12:10:58 -04:00
parent fa0223d26f
commit 19b0f7e66e
1 changed files with 6 additions and 4 deletions

View File

@ -9,12 +9,14 @@
#include "trigger_subaru.h" #include "trigger_subaru.h"
static void initialize_one_of_36_2_2_2(TriggerWaveform *s, int firstCount, int secondCount) { static void initialize_one_of_36_2_2_2(TriggerWaveform *s, int firstCount, int secondCount, bool knownOperationModeHack) {
s->initialize(FOUR_STROKE_CRANK_SENSOR, SyncEdge::RiseOnly); s->initialize(FOUR_STROKE_CRANK_SENSOR, SyncEdge::RiseOnly);
#if EFI_UNIT_TEST #if EFI_UNIT_TEST
// placed on 'cam' on '2-stroke' rotary // placed on 'cam' on '2-stroke' rotary
s->knownOperationMode = false; if (knownOperationModeHack) {
s->knownOperationMode = false;
}
#endif // EFI_UNIT_TEST #endif // EFI_UNIT_TEST
float wide = 30 * 2; float wide = 30 * 2;
@ -50,7 +52,7 @@ static void initialize_one_of_36_2_2_2(TriggerWaveform *s, int firstCount, int s
* https://rusefi.com/forum/viewtopic.php?f=2&t=1932 * https://rusefi.com/forum/viewtopic.php?f=2&t=1932
*/ */
void initialize36_2_2_2(TriggerWaveform *s) { void initialize36_2_2_2(TriggerWaveform *s) {
initialize_one_of_36_2_2_2(s, 12, 15); initialize_one_of_36_2_2_2(s, 12, 15, /*knownOperationModeHack*/true);
s->setTriggerSynchronizationGap(0.333f); s->setTriggerSynchronizationGap(0.333f);
s->setSecondTriggerSynchronizationGap(1.0f); s->setSecondTriggerSynchronizationGap(1.0f);
@ -58,7 +60,7 @@ void initialize36_2_2_2(TriggerWaveform *s) {
} }
void initializeSubaruEZ30(TriggerWaveform *s) { void initializeSubaruEZ30(TriggerWaveform *s) {
initialize_one_of_36_2_2_2(s, 18, 9); initialize_one_of_36_2_2_2(s, 18, 9, /*knownOperationModeHack*/false);
s->setTriggerSynchronizationGap3(/*gapIndex*/0, 0.25, 0.5); s->setTriggerSynchronizationGap3(/*gapIndex*/0, 0.25, 0.5);
s->setTriggerSynchronizationGap3(/*gapIndex*/1, 0.7, 1.5); s->setTriggerSynchronizationGap3(/*gapIndex*/1, 0.7, 1.5);