simulator usability

This commit is contained in:
rusefi 2017-03-03 23:24:32 -05:00
parent 7a4d7e79d6
commit 70c36252b8
1 changed files with 6 additions and 0 deletions

View File

@ -64,10 +64,16 @@ percent_t getTpsValue(int adc DECLARE_ENGINE_PARAMETER_S) {
}
float result = interpolate(TPS_TS_CONVERSION * engineConfiguration->tpsMax, 100, TPS_TS_CONVERSION * engineConfiguration->tpsMin, 0, adc);
if (result < engineConfiguration->tpsErrorDetectionTooLow) {
#if EFI_PROD_CODE || defined(__DOXYGEN__)
// too much noise with simulator
warning(OBD_Throttle_Position_Sensor_Circuit_Malfunction, "TPS too low: %f", result);
#endif /* EFI_PROD_CODE */
}
if (result > engineConfiguration->tpsErrorDetectionTooHigh) {
#if EFI_PROD_CODE || defined(__DOXYGEN__)
// too much noise with simulator
warning(OBD_Throttle_Position_Sensor_Range_Performance_Problem, "TPS too high: %f", result);
#endif /* EFI_PROD_CODE */
}
// this would put the value into the 0-100 range