refactoring

This commit is contained in:
Andrey 2021-07-17 00:45:47 -04:00
parent 0bd565a96b
commit d76132c206
2 changed files with 10 additions and 1 deletions

View File

@ -212,6 +212,10 @@ void TriggerWaveform::addEvent720(angle_t angle, trigger_wheel_e const channelIn
addEvent(angle / 720, 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);
}
void TriggerWaveform::addEventAngle(angle_t angle, trigger_wheel_e const channelIndex, trigger_value_e const state) {
addEvent(angle / getCycleDuration(), channelIndex, state);
}
@ -547,7 +551,7 @@ void TriggerWaveform::initializeTriggerWaveform(operation_mode_e ambiguousOperat
case TT_NISSAN_VQ30:
case TT_NISSAN_VQ35:
initializeNissanVQcrank(this);
initializeNissanVQ35crank(this);
break;
case TT_KAWA_KX450F:

View File

@ -223,6 +223,11 @@ public:
*/
void addEvent720(angle_t angle, trigger_wheel_e const channelIndex, trigger_value_e const state);
/**
* this method helps us use real world 350 degrees shape for FOUR_STROKE_CAM_SENSOR and FOUR_STROKE_CRANK_SENSOR
*/
void addEvent360(angle_t angle, trigger_wheel_e const channelIndex, trigger_value_e const state);
/**
* This version of 'addEvent...' family considers the angle duration of operationMode in this trigger
* For example, (0..180] for FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR