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
|
|
|
*/
|
2021-07-25 22:05:17 -07: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
|
2019-09-01 13:11:35 -07:00
|
|
|
printTPSInfo();
|
2020-04-05 16:33:33 -07:00
|
|
|
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
|
2019-09-01 13:11:35 -07:00
|
|
|
printTPSInfo();
|
2020-04-05 16:33:33 -07:00
|
|
|
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
|
2020-04-05 16:33:33 -07:00
|
|
|
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
|
2020-04-05 16:33:33 -07:00
|
|
|
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 */
|
|
|
|
}
|