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

26 lines
543 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(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
initMapDecoder(PASS_ENGINE_PARAMETER_SIGNATURE);
2020-09-28 16:17:17 -07:00
acDebounce.init(15, CONFIG(acSwitch), CONFIG(acSwitchMode));
2015-07-10 06:01:56 -07:00
}
bool getAcToggle(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
return acDebounce.readPinState();
2019-03-02 10:04:26 -08:00
}
bool hasAcToggle(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
return (isBrainPinValid(CONFIG(acSwitch)));
2015-07-10 06:01:56 -07:00
}