rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes
ShutdownController Class Reference

#include <shutdown_controller.h>

Collaboration diagram for ShutdownController:
Collaboration graph
[legend]

Public Member Functions

void stopEngine (StopRequestedReason reason)
 
bool isEngineStop (efitick_t nowNt) const
 

Private Attributes

Timer m_engineStopTimer
 

Detailed Description

Definition at line 25 of file shutdown_controller.h.

Member Function Documentation

◆ isEngineStop()

bool ShutdownController::isEngineStop ( efitick_t  nowNt) const
inline

Definition at line 29 of file shutdown_controller.h.

29 {
30 float timeSinceStopRequested = m_engineStopTimer.getElapsedSeconds(nowNt);
31
32 // If there was stop requested in the past 5 seconds, we're in stop mode
33 return timeSinceStopRequested < 5;
34 }

Referenced by configureRusefiLuaHooks(), and LimpManager::updateState().

Here is the caller graph for this function:

◆ stopEngine()

void ShutdownController::stopEngine ( StopRequestedReason  reason)

Definition at line 21 of file shutdown_controller.cpp.

21 {
22 m_engineStopTimer.reset();
23 engine->outputChannels.stopEngineCode = (uint8_t)reason;
24 }
TunerStudioOutputChannels outputChannels
Definition engine.h:106
static Engine *const engine
Definition engine.h:393

Referenced by doScheduleStopEngine().

Here is the caller graph for this function:

Field Documentation

◆ m_engineStopTimer

Timer ShutdownController::m_engineStopTimer
private

Definition at line 37 of file shutdown_controller.h.

Referenced by isEngineStop(), and stopEngine().


The documentation for this class was generated from the following files: