rusEFI
The most advanced open source ECU
|
Data Structures | |
class | RpmCalculator |
Enumerations | |
enum | spinning_state_e { STOPPED , SPINNING_UP , CRANKING , RUNNING } |
Functions | |
void | rpmShaftPositionCallback (trigger_event_e ckpSignalType, uint32_t trgEventIndex, efitick_t edgeTimestamp) |
Shaft position callback used by RPM calculation logic. | |
void | tdcMarkCallback (uint32_t trgEventIndex, efitick_t edgeTimestamp) |
operation_mode_e | lookupOperationMode () |
efitick_t | scheduleByAngle (scheduling_s *timer, efitick_t nowNt, angle_t angle, action_s const &action) |
enum spinning_state_e |
Definition at line 19 of file rpm_calculator.h.
operation_mode_e lookupOperationMode | ( | ) |
Definition at line 53 of file rpm_calculator.cpp.
Referenced by TriggerCentral::applyShapesConfiguration(), and RpmCalculator::getOperationMode().
void rpmShaftPositionCallback | ( | trigger_event_e | ckpSignalType, |
uint32_t | trgEventIndex, | ||
efitick_t | nowNt | ||
) |
Shaft position callback used by RPM calculation logic.
This callback should always be the first of trigger callbacks because other callbacks depend of values updated here. This callback is invoked on interrupt thread.
Four stroke cycle is two crankshaft revolutions
We always do '* 2' because the event signal is already adjusted to 'per engine cycle' and each revolution of crankshaft consists of two engine cycles revolutions
Definition at line 253 of file rpm_calculator.cpp.
Referenced by TriggerCentral::handleShaftSignal().
efitick_t scheduleByAngle | ( | scheduling_s * | timer, |
efitick_t | nowNt, | ||
angle_t | angle, | ||
action_s const & | action | ||
) |
Schedules a callback 'angle' degree of crankshaft from now. The callback would be executed once after the duration of time which it takes the crankshaft to rotate to the specified angle.
Definition at line 381 of file rpm_calculator.cpp.
Referenced by fireSparkAndPrepareNextSchedule(), MapAveragingModule::onEnginePhase(), Engine::onSparkFireKnockSense(), InjectionEvent::onTriggerTooth(), HpfpController::pinTurnOn(), TriggerScheduler::scheduleEventsUntilNextTriggerTooth(), TriggerScheduler::scheduleOrQueue(), scheduleSparkEvent(), startAveraging(), tdcMarkCallback(), and turnSparkPinHighStartCharging().
void tdcMarkCallback | ( | uint32_t | trgEventIndex, |
efitick_t | nowNt | ||
) |
This trigger callback schedules the actual physical TDC callback in relation to trigger synchronization point.
Definition at line 349 of file rpm_calculator.cpp.
Referenced by TriggerCentral::handleShaftSignal().