auto-sync

This commit is contained in:
rusEfi 2016-06-13 00:02:04 -04:00
parent fa8a96905a
commit d52c2411e7
11 changed files with 25 additions and 25 deletions

View File

@ -177,8 +177,8 @@ void setCitroenBerlingoTU3JPConfiguration(DECLARE_ENGINE_PARAMETER_F) {
* TPS <MAGNETI MARELLI>
*/
engineConfiguration->tpsAdcChannel = EFI_ADC_3;
engineConfiguration->tpsMin = 108; // convert 12to10 bit (ADC/4)
engineConfiguration->tpsMax = 812; // convert 12to10 bit (ADC/4)
engineConfiguration->tpsMax = 108; // convert 12to10 bit (ADC/4)
engineConfiguration->tpsMin = 812; // convert 12to10 bit (ADC/4)
/**
* IAT <OEM ECU>
*/

View File

@ -382,8 +382,8 @@ void setDodgeNeonNGCEngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
* TPS
*/
engineConfiguration->tpsAdcChannel = EFI_ADC_2;
engineConfiguration->tpsMin = 125; // convert 12to10 bit (ADC/4)
engineConfiguration->tpsMax = 625; // convert 12to10 bit (ADC/4)
engineConfiguration->tpsMax = 125; // convert 12to10 bit (ADC/4)
engineConfiguration->tpsMin = 625; // convert 12to10 bit (ADC/4)
/**
* IAT D15/W7

View File

@ -216,8 +216,8 @@ void setFordEscortGt(DECLARE_ENGINE_PARAMETER_F) {
// we have a 1999 Auto Miata TB mounted on this car
engineConfiguration->hasTpsSensor = true;
engineConfiguration->tpsMin = 115; // convert 12to10 bit (ADC/4)
engineConfiguration->tpsMax = 630; // convert 12to10 bit (ADC/4)
engineConfiguration->tpsMin = 630; // convert 12to10 bit (ADC/4)
engineConfiguration->tpsMax = 115; // convert 12to10 bit (ADC/4)
engineConfiguration->tpsAdcChannel = EFI_ADC_3;
// engineConfiguration->map.sensor.hwChannel = EFI_ADC_4;

View File

@ -352,8 +352,8 @@ void setMiata1994_s(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->fanOffTemperature = 90;
engineConfiguration->fanOnTemperature = 95;
engineConfiguration->tpsMin = 86;
engineConfiguration->tpsMax = 596;
engineConfiguration->tpsMax = 86;
engineConfiguration->tpsMin = 596;
boardConfiguration->malfunctionIndicatorPin = GPIOE_5;
boardConfiguration->malfunctionIndicatorPinMode = OM_DEFAULT;

View File

@ -1,4 +1,4 @@
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Jun 12 22:41:42 EDT 2016
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Jun 12 23:06:44 EDT 2016
// begin
#ifndef ENGINE_CONFIGURATION_GENERATED_H_
#define ENGINE_CONFIGURATION_GENERATED_H_
@ -865,13 +865,13 @@ typedef struct {
offset 80 bit 28 */
bool issue_294_29 : 1;
/**
* todo: extract these two fields into a structure
* Closed throttle. todo: extract these two fields into a structure
* todo: we need two sets of TPS parameters - modern ETBs have two sensors
* offset 84
*/
int16_t tpsMin;
/**
* tpsMax value as 10 bit ADC value. Not Voltage!
* Full throtle. tpsMax value as 10 bit ADC value. Not Voltage!
* offset 86
*/
int16_t tpsMax;
@ -1798,4 +1798,4 @@ typedef struct {
#endif
// end
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Jun 12 22:41:42 EDT 2016
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Jun 12 23:06:44 EDT 2016

View File

@ -62,7 +62,7 @@ percent_t getTpsValue(int adc DECLARE_ENGINE_PARAMETER_S) {
warning(OBD_PCM_Processor_Fault, "Invalid TPS configuration: same value %d", engineConfiguration->tpsMin);
return NAN;
}
float result = interpolate(TPS_TS_CONVERSION * engineConfiguration->tpsMin, 0, TPS_TS_CONVERSION * engineConfiguration->tpsMax, 100, adc);
float result = interpolate(TPS_TS_CONVERSION * engineConfiguration->tpsMax, 0, TPS_TS_CONVERSION * engineConfiguration->tpsMin, 100, adc);
// this would put the value into the 0-100 range
return maxF(0, minF(100, result));
}

View File

@ -413,7 +413,7 @@ static void printTPSInfo(void) {
ioportid_t port = getAdcChannelPort(engineConfiguration->tpsAdcChannel);
int pin = getAdcChannelPin(engineConfiguration->tpsAdcChannel);
scheduleMsg(&logger, "tps min %d/max %d v=%f @%s%d", engineConfiguration->tpsMin, engineConfiguration->tpsMax,
scheduleMsg(&logger, "tps min (closed) %d/max (full) %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", getTPS12bitAdc() / TPS_TS_CONVERSION, getTPS(PASS_ENGINE_PARAMETER_F),

View File

@ -196,8 +196,8 @@ bit issue_294_28;
bit issue_294_29;
int16_t tpsMin;todo: extract these two fields into a structure\ntodo: we need two sets of TPS parameters - modern ETBs have two sensors;"ADC", 1, 0, 0, 1023, 0
int16_t tpsMax;tpsMax value as 10 bit ADC value. Not Voltage!;"ADC", 1, 0, 0, 1023, 0
int16_t tpsMin;Closed throttle. todo: extract these two fields into a structure\ntodo: we need two sets of TPS parameters - modern ETBs have two sensors;"ADC", 1, 0, 0, 1023, 0
int16_t tpsMax;Full throtle. tpsMax value as 10 bit ADC value. Not Voltage!;"ADC", 1, 0, 0, 1023, 0
int16_t tpsErrorDetectionTooLow;TPS error detection, what TPS % value is unrealistically low;"%", 1, 0, -40, 200, 0
int16_t tpsErrorDetectionTooHigh;;"%", 1, 0, -40, 200, 0

View File

@ -28,13 +28,13 @@ void testIdleController(void) {
efitimems_t time = 0;
assertEquals(60, is.getIdle(900, time PASS_ENGINE_PARAMETER));
assertEqualsM("#1", 60.0, is.getIdle(900, time PASS_ENGINE_PARAMETER));
time += 2000;
assertEquals(60.5, is.getIdle(900, time PASS_ENGINE_PARAMETER));
assertEqualsM("2", 60.0, is.getIdle(900, time PASS_ENGINE_PARAMETER));
time += 2000;
assertEquals(60.6, is.getIdle(1050, time PASS_ENGINE_PARAMETER));
assertEquals(60.0, is.getIdle(1050, time PASS_ENGINE_PARAMETER));
}
void testPidController(void) {

View File

@ -32,14 +32,14 @@ void testTps(void) {
EngineTestHelper eth(DODGE_RAM);
EXPAND_EngineTestHelper;
engineConfiguration->tpsMin = 43;
engineConfiguration->tpsMax = 193;
engineConfiguration->tpsMax = 43;
engineConfiguration->tpsMin = 193;
assertEquals(49.3333, getTpsValue(4 * 117 PASS_ENGINE_PARAMETER));
engineConfiguration->tpsMin = 193;
engineConfiguration->tpsMax = 43;
engineConfiguration->tpsMax = 193;
engineConfiguration->tpsMin = 43;
assertEqualsM("test#2", 50.6667, getTpsValue(4 * 117 PASS_ENGINE_PARAMETER));
}

View File

@ -250,8 +250,8 @@ static void testStartupFuelPumping(void) {
engine->rpmCalculator.mockRpm = 0;
engine->engineConfiguration->tpsMin = 0;
engine->engineConfiguration->tpsMax = 10;
engine->engineConfiguration->tpsMin = 10;
engine->engineConfiguration->tpsMax = 0;
mockTps = TPS_TS_CONVERSION * 6;
sf.update(PASS_ENGINE_PARAMETER_F);