rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
controllers
sensors
allsensors.cpp
Go to the documentation of this file.
1
/**
2
* @file allsensors.cpp
3
* @brief
4
*
5
*
6
* @date Nov 15, 2013
7
* @author Andrey Belomutskiy, (c) 2012-2020
8
*/
9
10
#include "
pch.h
"
11
12
ButtonDebounce
acDebounce
(
"ac_switch"
);
13
14
void
initSensors
() {
15
initMapDecoder
();
16
acDebounce
.
init
(15,
engineConfiguration
->
acSwitch
,
engineConfiguration
->
acSwitchMode
);
17
}
18
19
bool
getAcToggle
() {
20
return
acDebounce
.
readPinState
();
21
}
22
23
bool
hasAcToggle
() {
24
return
isBrainPinValid
(
engineConfiguration
->
acSwitch
);
25
}
initSensors
void initSensors()
Definition
allsensors.cpp:14
getAcToggle
bool getAcToggle()
Definition
allsensors.cpp:19
acDebounce
ButtonDebounce acDebounce("ac_switch")
hasAcToggle
bool hasAcToggle()
Definition
allsensors.cpp:23
ButtonDebounce
Definition
debounce.h:16
ButtonDebounce::init
void init(efitimems_t threshold, brain_pin_e &pin, pin_input_mode_e &mode, bool inverted=false)
Definition
debounce.cpp:23
ButtonDebounce::readPinState
bool readPinState()
engineConfiguration
static constexpr engine_configuration_s * engineConfiguration
Definition
engine_configuration.h:80
initMapDecoder
void initMapDecoder()
Definition
map.cpp:66
pch.h
isBrainPinValid
bool isBrainPinValid(brain_pin_e brainPin)
Definition
pin_repository.cpp:25
engine_configuration_s::acSwitchMode
pin_input_mode_e acSwitchMode
Definition
engine_configuration_generated_structures_alphax-2chan.h:4424
engine_configuration_s::acSwitch
switch_input_pin_e acSwitch
Definition
engine_configuration_generated_structures_alphax-2chan.h:3072
Generated on Sat Sep 27 2025 00:10:06 for rusEFI by
1.9.8