fome-fw/firmware/controllers/sensors/allsensors.cpp

26 lines
449 B
C++
Raw Normal View History

2015-07-10 06:01:56 -07:00
/**
* @file allsensors.cpp
* @brief
*
*
* @date Nov 15, 2013
2020-01-13 18:57:43 -08:00
* @author Andrey Belomutskiy, (c) 2012-2020
2015-07-10 06:01:56 -07:00
*/
#include "pch.h"
2015-07-10 06:01:56 -07:00
ButtonDebounce acDebounce("ac_switch");
void initSensors() {
initMapDecoder();
acDebounce.init(15, engineConfiguration->acSwitch, engineConfiguration->acSwitchMode);
2015-07-10 06:01:56 -07:00
}
bool getAcToggle() {
return acDebounce.readPinState();
2019-03-02 10:04:26 -08:00
}
bool hasAcToggle() {
return (isBrainPinValid(engineConfiguration->acSwitch));
2015-07-10 06:01:56 -07:00
}