36-4 trigger wheel
Posted: Sun Dec 27, 2015 7:13 pm
I'm trying to implement support for a Rover K series 36-4 trigger pattern. This is 13-1-2-1-14-1-3-1 where the 1's are missing teeth. There's no camshaft sensor so this needs to sync on the crank alone. Code as it stands is below. It works without the two commented lines but isn't sync'd so TDC can be anywhere. If I uncomment then I get the orange LED flashing and "line:52:msg,FATAL error: totalRevolutionCounter2 expected 3" repeated in the console. Am I going to be able to sort this without adding a camshaft sensor?
Code: Select all
void configureKMpiTriggerShape(TriggerShape *s DECLARE_ENGINE_PARAMETER_S)
{
s->initialize(FOUR_STROKE_CRANK_SENSOR, false);
float tooth = 20;
// s->setTriggerSynchronizationGap(2.0);
// s->isSynchronizationNeeded = true;
float base = 0;
for (int i = 0; i < 2; i++)
{
s->addEvent(base + tooth / 2, T_PRIMARY, TV_RISE);
s->addEvent(base + tooth, T_PRIMARY, TV_FALL);
base += tooth;
}
base += tooth;
for (int i = 0; i < 2; i++) {
s->addEvent(base + tooth / 2, T_PRIMARY, TV_RISE);
s->addEvent(base + tooth, T_PRIMARY, TV_FALL);
base += tooth;
}
base += tooth;
for (int i = 0; i < 14; i++) {
s->addEvent(base + tooth / 2, T_PRIMARY, TV_RISE);
s->addEvent(base + tooth, T_PRIMARY, TV_FALL);
base += tooth;
}
base += tooth;
for (int i = 0; i < 3; i++) {
s->addEvent(base + tooth / 2, T_PRIMARY, TV_RISE);
s->addEvent(base + tooth, T_PRIMARY, TV_FALL);
base += tooth;
}
base += tooth;
for (int i = 0; i < 11; i++) {
s->addEvent(base + tooth / 2, T_PRIMARY, TV_RISE);
s->addEvent(base + tooth, T_PRIMARY, TV_FALL);
base += tooth;
}
}