Skip to content

Commit

Permalink
cam-only Honda CBR600 trigger wheel #5909
Browse files Browse the repository at this point in the history
The "CBR600" trigger appears to be based on a modified CBR600f4i crank trigger with two teeth removed
  • Loading branch information
rusefillc committed Feb 3, 2024
1 parent 2c73427 commit 761d431
Showing 1 changed file with 2 additions and 23 deletions.
25 changes: 2 additions & 23 deletions firmware/controllers/trigger/decoders/trigger_honda.cpp
Expand Up @@ -12,38 +12,17 @@

void configureHondaCbr600(TriggerWaveform *s) {
s->initialize(FOUR_STROKE_CAM_SENSOR, SyncEdge::RiseOnly);
s->useOnlyPrimaryForSync = true;
s->setTriggerSynchronizationGap(6);

s->tdcPosition = 470; // todo: hard-code TDC position once we know it
s->setTriggerSynchronizationGap2(/*from*/5, /*to*/9);

int totalTeethCount = 24;
int skippedCount = 0;

addSkippedToothTriggerEvents(TriggerWheel::T_SECONDARY, s, totalTeethCount, skippedCount, 0.5, 0, 720,
0, 349);
s->tdcPosition = 0; // todo: hard-code TDC position once we know it
s->setTriggerSynchronizationGap2(/*from*/3.9, /*to*/8);

s->addEvent720(350.0f, TriggerValue::FALL, TriggerWheel::T_PRIMARY);
s->addEvent720(360.0f, TriggerValue::RISE, TriggerWheel::T_PRIMARY);

s->addEvent720(360 + 0.2, TriggerValue::FALL, TriggerWheel::T_SECONDARY);

addSkippedToothTriggerEvents(TriggerWheel::T_SECONDARY, s, totalTeethCount, skippedCount, 0.5, 0, 720,
361, 649);

s->addEvent720(650.0f, TriggerValue::FALL, TriggerWheel::T_PRIMARY);
s->addEvent720(660.0f, TriggerValue::RISE, TriggerWheel::T_PRIMARY);

s->addEvent720(660 + 0.2, TriggerValue::FALL, TriggerWheel::T_SECONDARY);

addSkippedToothTriggerEvents(TriggerWheel::T_SECONDARY, s, totalTeethCount, skippedCount, 0.5, 0, 720,
661, 709);

s->addEvent720(710.0f, TriggerValue::FALL, TriggerWheel::T_PRIMARY);

s->addEvent720(720.0f - 1, TriggerValue::FALL, TriggerWheel::T_SECONDARY);

s->addEvent720(720.0f, TriggerValue::RISE, TriggerWheel::T_PRIMARY);
}

Expand Down

0 comments on commit 761d431

Please sign in to comment.