TPS commands & compacting

This commit is contained in:
rusEfi 2019-03-02 13:21:12 -05:00
parent 27bf22f704
commit c01734b8a4
7 changed files with 42 additions and 43 deletions

View File

@ -262,6 +262,13 @@ void setFrankensoBoardTestConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
void setEtbTestConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
setCustomEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE);
// VAG test ETB
// set tps_min 54
engineConfiguration->tpsMin = 54;
// by the way this ETB has default position of ADC=74 which is about 4%
// set tps_max 540
engineConfiguration->tpsMax = 540;
boardConfiguration->ignitionPins[0] = GPIO_UNASSIGNED;
boardConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;

View File

@ -1,4 +1,4 @@
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Fri Feb 22 22:08:30 EST 2019
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sat Mar 02 13:19:29 EST 2019
// begin
#ifndef ENGINE_CONFIGURATION_GENERATED_H_
#define ENGINE_CONFIGURATION_GENERATED_H_
@ -912,8 +912,8 @@ typedef struct {
/**
* offset 372
*/
int unusedspi[23];
/** total size 464*/
int unusedAtBoardConfigurationEnd[123];
/** total size 864*/
} board_configuration_s;
// start of engine_configuration_s
@ -1027,12 +1027,14 @@ typedef struct {
* Closed throttle. todo: extract these two fields into a structure
* todo: we need two sets of TPS parameters - modern ETBs have two sensors
* See also tpsAdcChannel
* set tps_min X
* offset 80
*/
int16_t tpsMin;
/**
* Full throtle. tpsMax value as 10 bit ADC value. Not Voltage!
* See also tpsAdcChannel
* set tps_max X
* offset 82
*/
int16_t tpsMax;
@ -1328,10 +1330,6 @@ typedef struct {
* offset 600
*/
board_configuration_s bc;
/**
* offset 1064
*/
int unusedspi2[100];
/**
offset 1464 bit 0 */
bool vvtDisplayInverted : 1;
@ -1599,7 +1597,7 @@ typedef struct {
/**
* offset 1540
*/
uint8_t alFIn[12];
int alFIn[3];
/**
* offset 1552
*/
@ -2199,11 +2197,7 @@ typedef struct {
/**
* offset 3129
*/
uint8_t unusedSteDiM;
/**
* offset 3130
*/
uint8_t unusedTest55[2];
uint8_t unusedTest55[3];
/**
* Optional timing advance table for Cranking (see useSeparateAdvanceForCranking)
* offset 3132
@ -2307,7 +2301,7 @@ typedef struct {
/**
* offset 3980
*/
int unusedEnd[625];
int mainUnusedEnd[625];
/** total size 6480*/
} engine_configuration_s;
@ -2554,4 +2548,4 @@ typedef struct {
#endif
// end
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Fri Feb 22 22:08:30 EST 2019
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sat Mar 02 13:19:29 EST 2019

View File

@ -892,10 +892,8 @@
#define frequencyReportingMapInputPin_offset_hex 3ca
#define clutchUpPinMode_offset 971
#define clutchUpPinMode_offset_hex 3cb
#define unusedspi_offset 972
#define unusedspi_offset_hex 3cc
#define unusedspi2_offset 1064
#define unusedspi2_offset_hex 428
#define unusedspi2_offset 972
#define unusedspi2_offset_hex 3cc
#define vvtDisplayInverted_offset 1464
#define vvtDisplayInverted_offset_hex 5b8
#define fuelClosedLoopCorrectionEnabled_offset 1464

View File

@ -1092,6 +1092,12 @@ static void getValue(const char *paramStr) {
} else if (strEqualCaseInsensitive(paramStr, "bor")) {
showBor();
#endif /* EFI_PROD_CODE */
} else if (strEqualCaseInsensitive(paramStr, "tps_min")) {
scheduleMsg(&logger, "tps_min=%d", engineConfiguration->tpsMin);
} else if (strEqualCaseInsensitive(paramStr, "tps_max")) {
scheduleMsg(&logger, "tps_max=%d", engineConfiguration->tpsMax);
} else if (strEqualCaseInsensitive(paramStr, "nb_vvt_index")) {
scheduleMsg(&logger, "nb_vvt_index=%d", engineConfiguration->nbVvtIndex);
} else if (strEqualCaseInsensitive(paramStr, "nb_vvt_index")) {
scheduleMsg(&logger, "nb_vvt_index=%d", engineConfiguration->nbVvtIndex);
} else if (strEqualCaseInsensitive(paramStr, "global_trigger_offset_angle")) {
@ -1293,6 +1299,10 @@ static void setValue(const char *paramStr, const char *valueStr) {
engineConfiguration->engineSnifferRpmThreshold = valueI;
} else if (strEqualCaseInsensitive(paramStr, "step1rpm")) {
engineConfiguration->step1rpm = valueI;
} else if (strEqualCaseInsensitive(paramStr, "tps_max")) {
engineConfiguration->tpsMax = valueI;
} else if (strEqualCaseInsensitive(paramStr, "tps_min")) {
engineConfiguration->tpsMin = valueI;
} else if (strEqualCaseInsensitive(paramStr, "vvt_offset")) {
engineConfiguration->vvtOffset = valueF;
} else if (strEqualCaseInsensitive(paramStr, "vvt_mode")) {

View File

@ -287,8 +287,8 @@ bit issue_294_28;
bit issue_294_29;
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\nSee also tpsAdcChannel;"ADC", 1, 0, 0, 1023, 0
int16_t tpsMax;Full throtle. tpsMax value as 10 bit ADC value. Not Voltage!\nSee also tpsAdcChannel;"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\nSee also tpsAdcChannel\nset tps_min X;"ADC", 1, 0, 0, 1023, 0
int16_t tpsMax;Full throtle. tpsMax value as 10 bit ADC value. Not Voltage!\nSee also tpsAdcChannel\nset tps_max X;"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;+TPS error detection, what TPS % value is unrealistically high;"%", 1, 0, -40, 200, 0
@ -653,14 +653,11 @@ maf_sensor_type_e mafSensorType;
brain_pin_e clutchUpPin;Some vehicles have a switch to indicate that clutch pedal is all the way up
brain_input_pin_e frequencyReportingMapInputPin;
pin_input_mode_e clutchUpPinMode;
int[23] unusedspi;
int[123] unusedAtBoardConfigurationEnd;
end_struct
custom le_formula_t 200 string, ASCII, @OFFSET@, 200
board_configuration_s bc;
int[100] unusedspi2;
bit vvtDisplayInverted
bit fuelClosedLoopCorrectionEnabled
bit isVerboseIAC;+Print details into rusEfi console
@ -751,7 +748,7 @@ float idleStepperReactionTime;;"ms", 1, 0, 1, 300, 0
float knockVThreshold;;"V", 1, 0, 1, 5, 2
pin_input_mode_e[FSIO_COMMAND_COUNT iterate] fsioInputModes;
uint8_t[12] alFIn;
int[3] alFIn;
int idleStepperTotalSteps;;"count", 1, 0, 5, 3000, 0
@ -943,8 +940,7 @@ float[MAP_ACCEL_TAPER] mapAccelTaperMult;;"mult", 1, 0, 0.0, 300,
pin_output_mode_e stepperDirectionPinMode;
adc_channel_e externalKnockSenseAdc;
brain_pin_e stepperEnablePin;
uint8_t[1] unusedSteDiM;
uint8_t[2] unusedTest55;
uint8_t[3] unusedTest55;
float[CRANKING_ADVANCE_CURVE_SIZE] crankingAdvanceBins;Optional timing advance table for Cranking (see useSeparateAdvanceForCranking);"RPM", 1, 0, 0.0, 18000, 2
float[CRANKING_ADVANCE_CURVE_SIZE] crankingAdvance ;Optional timing advance table for Cranking (see useSeparateAdvanceForCranking);"deg", 1, 0, -20, 90, 2
@ -980,7 +976,7 @@ tChargeMode_e tChargeMode;
float[ETB_BIAS_CURVE_LENGTH] etbBiasValues;PWM bias, 0 to 100%;"ETB duty cycle bias", 1, 0.0, -100, 100.0, 2
float hip9011Gain;
int[625] unusedEnd;
int[625] mainUnusedEnd;
end_struct

View File

@ -63,7 +63,7 @@ enable2ndByteCanID = false
; see PAGE_0_SIZE in C source code
; CONFIG_DEFINITION_START
; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Tue Feb 26 22:30:37 EST 2019
; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sat Mar 02 13:19:29 EST 2019
pageSize = 20000
page = 1
@ -462,8 +462,7 @@ page = 1
clutchUpPin = bits, U08, 969, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
frequencyReportingMapInputPin = bits, U08, 970, [0:6], "NONE", "INVALID", "INVALID", "PA1", "PA2", "PA3", "INVALID", "PA5", "PA6", "PA7", "PA8", "PA9", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PA15", "INVALID", "INVALID", "INVALID", "PB3", "PB4", "PB5", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PC6", "PC7", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PE5", "PE6", "INVALID", "INVALID", "PE9", "INVALID", "PE11", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
clutchUpPinMode = scalar, U08, 971, "todo", 1, 0, 0, 20, 1
;no TS info - skipping unusedspi offset 972
;no TS info - skipping unusedspi2 offset 1064
;no TS info - skipping unusedAtBoardConfigurationEnd offset 972
vvtDisplayInverted = bits, U32, 1464, [0:0], "false", "true"
fuelClosedLoopCorrectionEnabled= bits, U32, 1464, [1:1], "false", "true"
isVerboseIAC = bits, U32, 1464, [2:2], "false", "true"
@ -792,8 +791,7 @@ page = 1
stepperDirectionPinMode = bits, U08, 3126, [0:1], "default", "default inverted", "open collector", "open collector inverted"
externalKnockSenseAdc = bits, U08, 3127, [0:4] "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PB0", "PB1", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "Disabled", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
stepperEnablePin = bits, U08, 3128, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
;no TS info - skipping unusedSteDiM offset 3129
;no TS info - skipping unusedTest55 offset 3130
;no TS info - skipping unusedTest55 offset 3129
crankingAdvanceBins = array, F32, 3132, [4], "RPM", 1, 0, 0.0, 18000, 2
crankingAdvance = array, F32, 3148, [4], "deg", 1, 0, -20, 90, 2
servoOutputPins1 = bits, U08, 3164, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
@ -823,7 +821,7 @@ page = 1
etbBiasBins = array, F32, 3912, [8], "target TPS position", 1, 0.0, 0, 100.0, 0
etbBiasValues = array, F32, 3944, [8], "ETB duty cycle bias", 1, 0.0, -100, 100.0, 2
;no TS info - skipping hip9011Gain offset 3976
;no TS info - skipping unusedEnd offset 3980
;no TS info - skipping mainUnusedEnd offset 3980
cltCrankingCorrBins = array, F32, 6480, [8], "C", 1, 0, -100.0, 250.0, 2
cltCrankingCorr = array, F32, 6512, [8], "%", 1, 0, 0.0, 500.0, 2
idleAdvanceBins = array, F32, 6544, [8], "RPM", 1, 0, 0.0, 18000, 2

View File

@ -1,6 +1,6 @@
package com.rusefi.config;
// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Tue Feb 26 22:30:37 EST 2019
// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sat Mar 02 13:19:29 EST 2019
public class Fields {
public static final int LE_COMMAND_LENGTH = 200;
public static final int BLOCKING_FACTOR = 400;
@ -607,9 +607,7 @@ public class Fields {
public static final int clutchUpPin_offset = 969;
public static final int frequencyReportingMapInputPin_offset = 970;
public static final int clutchUpPinMode_offset = 971;
public static final int unusedspi_offset = 972;
public static final int unusedspi2_offset = 1064;
public static final int unusedspi2_offset_hex = 428;
public static final int unusedAtBoardConfigurationEnd_offset = 972;
public static final int vvtDisplayInverted_offset = 1464;
public static final int fuelClosedLoopCorrectionEnabled_offset = 1464;
public static final int isVerboseIAC_offset = 1464;
@ -1009,8 +1007,7 @@ public class Fields {
public static final int stepperDirectionPinMode_offset = 3126;
public static final int externalKnockSenseAdc_offset = 3127;
public static final int stepperEnablePin_offset = 3128;
public static final int unusedSteDiM_offset = 3129;
public static final int unusedTest55_offset = 3130;
public static final int unusedTest55_offset = 3129;
public static final int crankingAdvanceBins_offset = 3132;
public static final int crankingAdvance_offset = 3148;
public static final int servoOutputPins1_offset = 3164;
@ -1040,7 +1037,7 @@ public class Fields {
public static final int etbBiasBins_offset = 3912;
public static final int etbBiasValues_offset = 3944;
public static final int hip9011Gain_offset = 3976;
public static final int unusedEnd_offset = 3980;
public static final int mainUnusedEnd_offset = 3980;
public static final int cltCrankingCorrBins_offset = 6480;
public static final int cltCrankingCorrBins_offset_hex = 1950;
public static final int cltCrankingCorr_offset = 6512;
@ -1865,7 +1862,6 @@ public class Fields {
public static final Field STEPPERDIRECTIONPINMODE = Field.create("STEPPERDIRECTIONPINMODE", 3126, FieldType.INT, pin_output_mode_e);
public static final Field EXTERNALKNOCKSENSEADC = Field.create("EXTERNALKNOCKSENSEADC", 3127, FieldType.INT, adc_channel_e);
public static final Field STEPPERENABLEPIN = Field.create("STEPPERENABLEPIN", 3128, FieldType.INT, brain_pin_e);
public static final Field UNUSEDSTEDIM = Field.create("UNUSEDSTEDIM", 3129, FieldType.INT);
public static final Field SERVOOUTPUTPINS1 = Field.create("SERVOOUTPUTPINS1", 3164, FieldType.INT, brain_pin_e);
public static final Field SERVOOUTPUTPINS2 = Field.create("SERVOOUTPUTPINS2", 3165, FieldType.INT, brain_pin_e);
public static final Field SERVOOUTPUTPINS3 = Field.create("SERVOOUTPUTPINS3", 3166, FieldType.INT, brain_pin_e);