WOW major scheduling drama on NB2 running with Proteus #2533
totally same numbers for NB1 just simpler code
This commit is contained in:
parent
3c6c4595c2
commit
2b8ec15071
|
@ -21,6 +21,8 @@
|
|||
#include "trigger_mazda.h"
|
||||
#include "error_handling.h"
|
||||
|
||||
#define NB_CRANK_MAGIC 70
|
||||
|
||||
void initializeMazdaMiataNaShape(TriggerWaveform *s) {
|
||||
s->initialize(FOUR_STROKE_CAM_SENSOR);
|
||||
s->setTriggerSynchronizationGap2(1.4930 * 0.6f, 1.4930 * 1.3f);
|
||||
|
@ -68,6 +70,11 @@ void initializeMazdaMiataNb2Crank(TriggerWaveform *s) {
|
|||
s->addEventAngle(180.0f, T_PRIMARY, TV_RISE);
|
||||
}
|
||||
|
||||
static void addNBCrankTooth(TriggerWaveform *s, angle_t angle, trigger_wheel_e const channelIndex) {
|
||||
s->addEvent720(angle, channelIndex, TV_RISE);
|
||||
s->addEvent720(angle + 4, channelIndex, TV_FALL);
|
||||
}
|
||||
|
||||
static void initializeMazdaMiataNb1ShapeWithOffset(TriggerWaveform *s, float offset) {
|
||||
s->initialize(FOUR_STROKE_CAM_SENSOR);
|
||||
s->setTriggerSynchronizationGap3(0, 0.065, 0.17f);
|
||||
|
@ -83,14 +90,10 @@ static void initializeMazdaMiataNb1ShapeWithOffset(TriggerWaveform *s, float off
|
|||
*/
|
||||
s->addEvent720(20.0f, T_PRIMARY, TV_FALL);
|
||||
|
||||
s->addEvent720(offset + 66.0f, T_SECONDARY, TV_RISE);
|
||||
s->addEvent720(offset + 70.0f, T_SECONDARY, TV_FALL);
|
||||
s->addEvent720(offset + 136.0f, T_SECONDARY, TV_RISE);
|
||||
s->addEvent720(offset + 140.0f, T_SECONDARY, TV_FALL);
|
||||
s->addEvent720(offset + 246.0f, T_SECONDARY, TV_RISE);
|
||||
s->addEvent720(offset + 250.0f, T_SECONDARY, TV_FALL);
|
||||
s->addEvent720(offset + 316.0f, T_SECONDARY, TV_RISE);
|
||||
s->addEvent720(offset + 320.0f, T_SECONDARY, TV_FALL);
|
||||
addNBCrankTooth(s, offset + 66.0f, T_SECONDARY);
|
||||
addNBCrankTooth(s, offset + 66.0f + NB_CRANK_MAGIC, T_SECONDARY);
|
||||
addNBCrankTooth(s, offset + 66.0f + 180, T_SECONDARY);
|
||||
addNBCrankTooth(s, offset + 66.0f + 180 + NB_CRANK_MAGIC, T_SECONDARY);
|
||||
|
||||
s->addEvent720(340.0f, T_PRIMARY, TV_RISE);
|
||||
s->addEvent720(360.0f, T_PRIMARY, TV_FALL);
|
||||
|
@ -98,14 +101,10 @@ static void initializeMazdaMiataNb1ShapeWithOffset(TriggerWaveform *s, float off
|
|||
s->addEvent720(380.0f, T_PRIMARY, TV_RISE);
|
||||
s->addEvent720(400.0f, T_PRIMARY, TV_FALL);
|
||||
|
||||
s->addEvent720(offset + 426.0f, T_SECONDARY, TV_RISE);
|
||||
s->addEvent720(offset + 430.0f, T_SECONDARY, TV_FALL);
|
||||
s->addEvent720(offset + 496.0f, T_SECONDARY, TV_RISE);
|
||||
s->addEvent720(offset + 500.0f, T_SECONDARY, TV_FALL);
|
||||
s->addEvent720(offset + 606.0f, T_SECONDARY, TV_RISE);
|
||||
s->addEvent720(offset + 610.0f, T_SECONDARY, TV_FALL);
|
||||
s->addEvent720(offset + 676.0f, T_SECONDARY, TV_RISE);
|
||||
s->addEvent720(offset + 680.0f, T_SECONDARY, TV_FALL);
|
||||
addNBCrankTooth(s, offset + 426.0f, T_SECONDARY);
|
||||
addNBCrankTooth(s, offset + 496.0f, T_SECONDARY);
|
||||
addNBCrankTooth(s, offset + 66.0f + 540, T_SECONDARY);
|
||||
addNBCrankTooth(s, offset + 66.0f + 540 + NB_CRANK_MAGIC, T_SECONDARY);
|
||||
|
||||
s->addEvent720(720.0f, T_PRIMARY, TV_RISE);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue