rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Data Structures | Functions
start_stop.h File Reference

Data Structures

struct  StartStopState
 

Functions

void doStartCranking ()
 
void startStopButtonToggle ()
 
void initStartStopButton ()
 

Function Documentation

◆ doStartCranking()

void doStartCranking ( )

Definition at line 19 of file start_stop.cpp.

19 {
20 bool wasStarterEngaged = enginePins.starterControl.getAndSet(1);
21 if (!wasStarterEngaged) {
23 efiPrintf("Let's crank this engine for up to %d seconds via %s!",
26 }
27}
StartStopState startStopState
Definition engine.h:106
RegisteredOutputPin starterControl
Definition efi_gpio.h:82
bool getAndSet(int logicValue)
Definition efi_gpio.cpp:575
EnginePins enginePins
Definition efi_gpio.cpp:24
static EngineAccessor engine
Definition engine.h:413
static constexpr engine_configuration_s * engineConfiguration
const char * hwPortname(brain_pin_e brainPin)
Timer startStopStateLastPush
Definition start_stop.h:8

Referenced by configureRusefiLuaHooks(), and startStopButtonToggle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initStartStopButton()

void initStartStopButton ( )

See test_start_stop.cpp

Definition at line 11 of file start_stop.cpp.

11 {
12 /* startCrankingDuration is efitimesec_t, so we need to multiply it by 1000 to get milliseconds*/
17}
void init(efitimems_t threshold, brain_pin_e &pin, pin_input_mode_e &mode, bool inverted=false)
Definition debounce.cpp:23
ButtonDebounce startStopButtonDebounce
Definition start_stop.h:6

◆ startStopButtonToggle()

void startStopButtonToggle ( )

Definition at line 29 of file start_stop.cpp.

29 {
31
34 } else if (engine->rpmCalculator.isRunning()) {
36 }
37}
EngineState engineState
Definition engine.h:344
RpmCalculator rpmCalculator
Definition engine.h:306
bool isStopped() const override
bool isRunning() const
void doScheduleStopEngine(StopRequestedReason reason)
void doStartCranking()

Referenced by handleCommandX14(), and slowStartStopButtonCallback().

Here is the call graph for this function:
Here is the caller graph for this function:

Go to the source code of this file.