static void printTPSInfo(void) { #if EFI_PROD_CODE GPIO_TypeDef* port = getAdcChannelPort(engineConfiguration->tpsAdcChannel); int pin = getAdcChannelPin(engineConfiguration->tpsAdcChannel); scheduleMsg(&logger, "tps min %d/max %d v=%f @%s%d", engineConfiguration->tpsMin, engineConfiguration->tpsMax, getTPSVoltage(), portname(port), pin); #endif scheduleMsg(&logger, "current 10bit=%d value=%f rate=%f", getTPS10bitAdc(), getTPS(), getTpsRateOfChange()); }
static void printTPSInfo(void) { #if (EFI_PROD_CODE && HAL_USE_ADC) || defined(__DOXYGEN__) if (!engineConfiguration->hasTpsSensor) { scheduleMsg(&logger, "NO TPS SENSOR"); return; } GPIO_TypeDef* port = getAdcChannelPort(engineConfiguration->tpsAdcChannel); int pin = getAdcChannelPin(engineConfiguration->tpsAdcChannel); scheduleMsg(&logger, "tps min %d/max %d v=%f @%s%d", engineConfiguration->tpsMin, engineConfiguration->tpsMax, getTPSVoltage(PASS_ENGINE_PARAMETER_F), portname(port), pin); #endif scheduleMsg(&logger, "current 10bit=%d value=%f rate=%f", getTPS10bitAdc(), getTPS(PASS_ENGINE_PARAMETER_F), getTpsRateOfChange()); }
void grabTPSIsWideOpen() { #if EFI_PROD_CODE engineConfiguration->tpsMax = getTPS10bitAdc(); printTPSInfo(); #endif /* EFI_PROD_CODE */ }
/** * @brief Position on physical primary TPS */ static float getPrimatyRawTPS(void) { // blue, 1st board /* PA7 - blue TP */ float tpsValue = getTpsValue(getTPS10bitAdc()); return tpsValue; }
void grabTPSIsClosed() { #if EFI_PROD_CODE engineConfiguration->tpsMin = getTPS10bitAdc(); printTPSInfo(); #endif /* EFI_PROD_CODE */ }