trigger refactoring: instance RPM #4740
This commit is contained in:
parent
a5136a0eae
commit
d75bf59cdc
|
@ -316,6 +316,8 @@ void rpmShaftPositionCallback(trigger_event_e ckpSignalType,
|
|||
|
||||
// Always update instant RPM even when not spinning up
|
||||
engine->triggerCentral.triggerState.instantRpm.updateInstantRpm(
|
||||
engine->triggerCentral.triggerState.currentCycle.current_index,
|
||||
|
||||
engine->triggerCentral.triggerShape, &engine->triggerCentral.triggerFormDetails,
|
||||
trgEventIndex, nowNt);
|
||||
|
||||
|
|
|
@ -306,6 +306,7 @@ void InstantRpmCalculator::setLastEventTimeForInstantRpm(efitick_t nowNt) {
|
|||
}
|
||||
|
||||
void InstantRpmCalculator::updateInstantRpm(
|
||||
uint32_t current_index,
|
||||
TriggerWaveform const & triggerShape, TriggerFormDetails *triggerFormDetails,
|
||||
uint32_t index, efitick_t nowNt) {
|
||||
|
||||
|
@ -315,7 +316,7 @@ void InstantRpmCalculator::updateInstantRpm(
|
|||
|
||||
#if EFI_SENSOR_CHART
|
||||
if (getEngineState()->sensorChartMode == SC_RPM_ACCEL || getEngineState()->sensorChartMode == SC_DETAILED_RPM) {
|
||||
angle_t currentAngle = triggerFormDetails->eventAngles[currentCycle.current_index];
|
||||
angle_t currentAngle = triggerFormDetails->eventAngles[current_index];
|
||||
if (engineConfiguration->sensorChartMode == SC_DETAILED_RPM) {
|
||||
scAddData(currentAngle, m_instantRpm);
|
||||
} else {
|
||||
|
|
|
@ -191,6 +191,7 @@ public:
|
|||
|
||||
#if EFI_ENGINE_CONTROL && EFI_SHAFT_POSITION_INPUT
|
||||
void updateInstantRpm(
|
||||
uint32_t current_index,
|
||||
TriggerWaveform const & triggerShape, TriggerFormDetails *triggerFormDetails,
|
||||
uint32_t index, efitick_t nowNt);
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue