migrating to SensorType::Rpm API
This commit is contained in:
parent
5f3324cd6b
commit
e0258c4c8e
|
@ -345,7 +345,7 @@ void tdcMarkCallback(
|
|||
if (isTriggerSynchronizationPoint && engine->isEngineChartEnabled && engine->tdcMarkEnabled) {
|
||||
// two instances of scheduling_s are needed to properly handle event overlap
|
||||
int revIndex2 = getRevolutionCounter() % 2;
|
||||
int rpm = GET_RPM();
|
||||
int rpm = Sensor::getOrZero(SensorType::Rpm);
|
||||
// todo: use tooth event-based scheduling, not just time-based scheduling
|
||||
if (isValidRpm(rpm)) {
|
||||
angle_t tdcPosition = tdcPosition();
|
||||
|
|
|
@ -43,7 +43,7 @@ void tachSignalCallback() {
|
|||
}
|
||||
|
||||
// What is the angle per tach output period?
|
||||
float cycleTimeMs = 60000.0f / GET_RPM();
|
||||
float cycleTimeMs = 60000.0f / Sensor::getOrZero(SensorType::Rpm);
|
||||
float periodTimeMs = cycleTimeMs / periods;
|
||||
tachFreq = 1000.0f / periodTimeMs;
|
||||
|
||||
|
|
|
@ -581,7 +581,7 @@ void TriggerState::decodeTriggerEvent(
|
|||
#if EFI_PROD_CODE || EFI_SIMULATOR
|
||||
if (triggerConfiguration.VerboseTriggerSynchDetails || (someSortOfTriggerError && !silentTriggerError)) {
|
||||
|
||||
int rpm = GET_RPM();
|
||||
int rpm = Sensor::getOrZero(SensorType::Rpm);
|
||||
floatms_t engineCycleDuration = getEngineCycleDuration(rpm);
|
||||
if (!engineConfiguration->useOnlyRisingEdgeForTrigger) {
|
||||
int time = currentCycle.totalTimeNt[0];
|
||||
|
|
Loading…
Reference in New Issue