trigger refactoring & docs
This commit is contained in:
parent
a7ba539e70
commit
0813266ee1
|
@ -205,12 +205,16 @@ void TriggerWaveform::calculateExpectedEventCounts(bool useOnlyRisingEdgeForTrig
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* Deprecated! many usages should be replaced by addEvent360
|
||||
*/
|
||||
void TriggerWaveform::addEvent720(angle_t angle, trigger_wheel_e const channelIndex, trigger_value_e const state) {
|
||||
addEvent(angle / 720, channelIndex, state);
|
||||
addEvent(angle / FOUR_STROKE_CYCLE_DURATION, channelIndex, state);
|
||||
}
|
||||
|
||||
void TriggerWaveform::addEvent360(angle_t angle, trigger_wheel_e const channelIndex, trigger_value_e const state) {
|
||||
addEvent(CRANK_MODE_MULTIPLIER * angle / 720, channelIndex, state);
|
||||
efiAssertVoid(CUSTOM_OMODE_UNDEF, operationMode == FOUR_STROKE_CAM_SENSOR || operationMode == FOUR_STROKE_CRANK_SENSOR, "Not a mode for 360");
|
||||
addEvent(CRANK_MODE_MULTIPLIER * angle / FOUR_STROKE_CYCLE_DURATION, channelIndex, state);
|
||||
}
|
||||
|
||||
void TriggerWaveform::addEventAngle(angle_t angle, trigger_wheel_e const channelIndex, trigger_value_e const state) {
|
||||
|
|
|
@ -214,7 +214,7 @@ public:
|
|||
/* (0..1] angle range */
|
||||
void addEvent(angle_t angle, trigger_wheel_e const channelIndex, trigger_value_e const state);
|
||||
/* (0..720] angle range
|
||||
* Deprecated!
|
||||
* Deprecated! many usages should be replaced by addEvent360
|
||||
*/
|
||||
void addEvent720(angle_t angle, trigger_wheel_e const channelIndex, trigger_value_e const state);
|
||||
|
||||
|
|
|
@ -56,11 +56,11 @@ void initializeSkippedToothTriggerWaveformExt(TriggerWaveform *s, int totalTeeth
|
|||
void configureOnePlusOne(TriggerWaveform *s) {
|
||||
s->initialize(FOUR_STROKE_CAM_SENSOR);
|
||||
|
||||
s->addEvent720(180, T_PRIMARY, TV_RISE);
|
||||
s->addEvent720(360, T_PRIMARY, TV_FALL);
|
||||
s->addEvent360( 90, T_PRIMARY, TV_RISE);
|
||||
s->addEvent360(180, T_PRIMARY, TV_FALL);
|
||||
|
||||
s->addEvent720(540, T_SECONDARY, TV_RISE);
|
||||
s->addEvent720(720, T_SECONDARY, TV_FALL);
|
||||
s->addEvent360(270, T_SECONDARY, TV_RISE);
|
||||
s->addEvent360(360, T_SECONDARY, TV_FALL);
|
||||
|
||||
s->isSynchronizationNeeded = false;
|
||||
s->useOnlyPrimaryForSync = true;
|
||||
|
|
Loading…
Reference in New Issue