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