v12 & dual-TPS

This commit is contained in:
rusEfi 2020-03-30 01:13:02 -04:00
parent 6ff928a798
commit 2a2b00f2d9
7 changed files with 33 additions and 16 deletions

View File

@ -1,4 +1,4 @@
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/rusefi_config.txt Sun Mar 29 10:29:07 EDT 2020
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/rusefi_config.txt Mon Mar 30 00:48:06 EDT 2020
// by class com.rusefi.output.CHeaderConsumer
// begin
#ifndef CONFIG_BOARDS_KINETIS_CONFIG_CONTROLLERS_ALGO_ENGINE_CONFIGURATION_GENERATED_STRUCTURES_H
@ -872,6 +872,7 @@ struct engine_configuration_s {
adc_channel_e fuelLevelSensor;
/**
* Second throttle body position sensor, single channel so far
* set_analog_input_pin tps2 X
* offset 515
*/
adc_channel_e tps2_1AdcChannel;
@ -933,6 +934,7 @@ struct engine_configuration_s {
* Electronic throttle pedal position input
* First channel
* See also tps1_1AdcChannel
* set_analog_input_pin pps X
* offset 580
*/
adc_channel_e throttlePedalPositionAdcChannel;
@ -3251,4 +3253,4 @@ typedef struct persistent_config_s persistent_config_s;
#endif
// end
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/rusefi_config.txt Sun Mar 29 10:29:07 EDT 2020
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/rusefi_config.txt Mon Mar 30 00:48:06 EDT 2020

View File

@ -252,7 +252,7 @@ GPIOA_6
*
* white#9 : orange : +5v
* white#17: green : PPS
* white#18: red
* white#18: red : TPS#2
* white#23: black : Sensor Ground
* white#24: red : TPS#1
*
@ -261,7 +261,7 @@ void setEngineBMW_M73_Proteus(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
m73engine(PASS_CONFIG_PARAMETER_SIGNATURE);
// 12 injectors defined in boards/proteus/board_configuration.cpp
// set_analog_input_pin pps pa4
engineConfiguration->throttlePedalPositionAdcChannel = EFI_ADC_4;
// set vbatt_divider 8.16
@ -270,7 +270,8 @@ void setEngineBMW_M73_Proteus(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
engineConfiguration->vbattDividerCoeff = 7.6;
// TPS#2 = Analog volt
// engineConfiguration->tps2_1AdcChannel = EFI_ADC_;
// set_analog_input_pin tps2 pa6
engineConfiguration->tps2_1AdcChannel = EFI_ADC_6;
}

View File

@ -12,7 +12,9 @@
void m73engine(DECLARE_CONFIG_PARAMETER_SIGNATURE);
void setEngineBMW_M73_Frankenso(DECLARE_CONFIG_PARAMETER_SIGNATURE);
// set engine_type 24
void setEngineBMW_M73_Manhattan(DECLARE_CONFIG_PARAMETER_SIGNATURE);
// set engine_type 63
void setEngineBMW_M73_Proteus(DECLARE_CONFIG_PARAMETER_SIGNATURE);
void setEngineBMW_M73_microRusEfi(DECLARE_CONFIG_PARAMETER_SIGNATURE);

View File

@ -379,6 +379,9 @@ static void printAnalogInfo(void) {
printAnalogChannelInfo("hip9011", engineConfiguration->hipOutputChannel);
printAnalogChannelInfo("fuel gauge", engineConfiguration->fuelLevelSensor);
printAnalogChannelInfo("TPS", engineConfiguration->tps1_1AdcChannel);
if (engineConfiguration->tps2_1AdcChannel != EFI_ADC_NONE) {
printAnalogChannelInfo("TPS2", engineConfiguration->tps2_1AdcChannel);
}
printAnalogChannelInfo("pPS", engineConfiguration->throttlePedalPositionAdcChannel);
if (engineConfiguration->clt.adcChannel != EFI_ADC_NONE) {
printAnalogChannelInfo("CLT", engineConfiguration->clt.adcChannel);
@ -757,6 +760,6 @@ int getRusEfiVersion(void) {
if (initBootloader() != 0)
return 123;
#endif /* EFI_BOOTLOADER_INCLUDE_CODE */
return 20200328;
return 20200330;
}
#endif /* EFI_UNIT_TEST */

View File

@ -1,4 +1,4 @@
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Sun Mar 29 10:28:43 EDT 2020
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Mon Mar 30 00:46:17 EDT 2020
// by class com.rusefi.output.CHeaderConsumer
// begin
#ifndef CONTROLLERS_GENERATED_ENGINE_CONFIGURATION_GENERATED_STRUCTURES_H
@ -872,6 +872,7 @@ struct engine_configuration_s {
adc_channel_e fuelLevelSensor;
/**
* Second throttle body position sensor, single channel so far
* set_analog_input_pin tps2 X
* offset 515
*/
adc_channel_e tps2_1AdcChannel;
@ -933,6 +934,7 @@ struct engine_configuration_s {
* Electronic throttle pedal position input
* First channel
* See also tps1_1AdcChannel
* set_analog_input_pin pps X
* offset 580
*/
adc_channel_e throttlePedalPositionAdcChannel;
@ -3251,4 +3253,4 @@ typedef struct persistent_config_s persistent_config_s;
#endif
// end
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Sun Mar 29 10:28:43 EDT 2020
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Mon Mar 30 00:46:17 EDT 2020

View File

@ -395,25 +395,32 @@ static void printThermistor(const char *msg, ThermistorConf *config, ThermistorM
scheduleMsg(&logger, "==============================");
}
void printTPSInfo(void) {
auto tps = Sensor::get(SensorType::Tps1);
auto raw = Sensor::getRaw(SensorType::Tps1);
static void printTpsSenser(const char *msg, SensorType sensor, int16_t min, int16_t max, adc_channel_e channel) {
auto tps = Sensor::get(sensor);
auto raw = Sensor::getRaw(sensor);
if (!tps.Valid) {
scheduleMsg(&logger, "TPS not valid");
}
static char pinNameBuffer[16];
scheduleMsg(&logger, "tps min (closed) %d/max (full) %d v=%.2f @%s", engineConfiguration->tpsMin, engineConfiguration->tpsMax,
raw, getPinNameByAdcChannel("tps", engineConfiguration->tps1_1AdcChannel, pinNameBuffer));
scheduleMsg(&logger, "tps min (closed) %d/max (full) %d v=%.2f @%s", min, max,
raw, getPinNameByAdcChannel(msg, channel, pinNameBuffer));
scheduleMsg(&logger, "current 10bit=%d value=%.2f rate=%.2f", convertVoltageTo10bitADC(raw), tps.Value, getTpsRateOfChange());
}
void printTPSInfo(void) {
if (hasPedalPositionSensor()) {
scheduleMsg(&logger, "pedal up %f / down %f",
engineConfiguration->throttlePedalUpVoltage,
engineConfiguration->throttlePedalWOTVoltage);
}
scheduleMsg(&logger, "current 10bit=%d value=%.2f rate=%.2f", convertVoltageTo10bitADC(raw), tps.Value, getTpsRateOfChange());
printTpsSenser("TPS", SensorType::Tps1, engineConfiguration->tpsMin, engineConfiguration->tpsMax, engineConfiguration->tps1_1AdcChannel);
printTpsSenser("TPS2", SensorType::Tps2, engineConfiguration->tps2Min, engineConfiguration->tps2Max, engineConfiguration->tps2_1AdcChannel);
}
static void printTemperatureInfo(void) {

View File

@ -456,7 +456,7 @@ log_format_e logFormat;
adc_channel_e tps1_1AdcChannel;First throttle body, first sensor. See also pedalPositionAdcChannel
adc_channel_e vbattAdcChannel;+This is the processor input pin that the battery voltage circuit is connected to, if you are unsure of what pin to use, check the schematic that corresponds to your PCB.
adc_channel_e fuelLevelSensor;+This is the processor pin that your fuel level sensor in connected to. This is a non standard input so will need to be user defined.
adc_channel_e tps2_1AdcChannel;Second throttle body position sensor, single channel so far
adc_channel_e tps2_1AdcChannel;Second throttle body position sensor, single channel so far\nset_analog_input_pin tps2 X
int overrideCrankingIgnition;
int sensorChartFrequency;;"index", 1, 0, 0, 300, 0 ; size 4
@ -505,7 +505,7 @@ end_struct
afr_sensor_s afr
adc_channel_e throttlePedalPositionAdcChannel;Electronic throttle pedal position input\nFirst channel\nSee also tps1_1AdcChannel
adc_channel_e throttlePedalPositionAdcChannel;Electronic throttle pedal position input\nFirst channel\nSee also tps1_1AdcChannel\nset_analog_input_pin pps X
brain_pin_e tle6240_cs;
pin_output_mode_e tle6240_csPinMode;