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

35 lines
837 B
C++
Raw Normal View History

2015-12-31 13:02:30 -08:00
/**
2020-01-07 21:02:40 -08:00
* @author Andrey Belomutskiy, (c) 2012-2020
2015-12-31 13:02:30 -08:00
*/
#include "pch.h"
2015-07-10 06:01:56 -07:00
2019-04-29 22:21:09 -07:00
void grabTPSIsClosed() {
#if EFI_PROD_CODE
printTPSInfo();
engineConfiguration->tpsMin = convertVoltageTo10bitADC(Sensor::getRaw(SensorType::Tps1));
2019-04-29 22:21:09 -07:00
printTPSInfo();
#endif /* EFI_PROD_CODE */
}
void grabTPSIsWideOpen() {
#if EFI_PROD_CODE
printTPSInfo();
engineConfiguration->tpsMax = convertVoltageTo10bitADC(Sensor::getRaw(SensorType::Tps1));
2019-04-29 22:21:09 -07:00
printTPSInfo();
#endif /* EFI_PROD_CODE */
}
2019-04-30 15:46:39 -07:00
void grabPedalIsUp() {
#if EFI_PROD_CODE
engineConfiguration->throttlePedalUpVoltage = Sensor::getRaw(SensorType::AcceleratorPedal);
2019-09-02 19:58:36 -07:00
printTPSInfo();
2019-04-30 15:46:39 -07:00
#endif /* EFI_PROD_CODE */
}
void grabPedalIsWideOpen() {
#if EFI_PROD_CODE
engineConfiguration->throttlePedalWOTVoltage = Sensor::getRaw(SensorType::AcceleratorPedal);
2019-09-02 19:58:36 -07:00
printTPSInfo();
2019-04-30 15:46:39 -07:00
#endif /* EFI_PROD_CODE */
}