From add49b0a5c5c564c26b31554c23a762f412fcdcb Mon Sep 17 00:00:00 2001 From: rusefi Date: Wed, 19 Aug 2020 00:46:57 -0400 Subject: [PATCH] bugfix - PPS second channel was not initialized --- firmware/controllers/engine_controller.cpp | 3 ++- firmware/hw_layer/adc/adc_inputs.cpp | 3 ++- firmware/integration/rusefi_config.txt | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/firmware/controllers/engine_controller.cpp b/firmware/controllers/engine_controller.cpp index b83692c749..ed1a629555 100644 --- a/firmware/controllers/engine_controller.cpp +++ b/firmware/controllers/engine_controller.cpp @@ -321,7 +321,8 @@ static void printAnalogInfo(void) { printAnalogChannelInfo("fuel gauge", engineConfiguration->fuelLevelSensor); printAnalogChannelInfo("TPS", engineConfiguration->tps1_1AdcChannel); printAnalogChannelInfo("TPS2", engineConfiguration->tps2_1AdcChannel); - printAnalogChannelInfo("pPS", engineConfiguration->throttlePedalPositionAdcChannel); + printAnalogChannelInfo("pPS1", engineConfiguration->throttlePedalPositionAdcChannel); + printAnalogChannelInfo("pPS2", engineConfiguration->throttlePedalPositionSecondAdcChannel); printAnalogChannelInfo("CLT", engineConfiguration->clt.adcChannel); printAnalogChannelInfo("IAT", engineConfiguration->iat.adcChannel); printAnalogChannelInfo("AuxT1", engineConfiguration->auxTempSensor1.adcChannel); diff --git a/firmware/hw_layer/adc/adc_inputs.cpp b/firmware/hw_layer/adc/adc_inputs.cpp index 2d91474df4..612f51efa9 100644 --- a/firmware/hw_layer/adc/adc_inputs.cpp +++ b/firmware/hw_layer/adc/adc_inputs.cpp @@ -488,7 +488,8 @@ static void configureInputs(void) { addChannel("TPS 2 Secondary", engineConfiguration->tps2_2AdcChannel, ADC_SLOW); addChannel("Fuel Level", engineConfiguration->fuelLevelSensor, ADC_SLOW); - addChannel("Acc Pedal", engineConfiguration->throttlePedalPositionAdcChannel, ADC_SLOW); + addChannel("Acc Pedal1", engineConfiguration->throttlePedalPositionAdcChannel, ADC_SLOW); + addChannel("Acc Pedal2", engineConfiguration->throttlePedalPositionSecondAdcChannel, ADC_SLOW); addChannel("VBatt", engineConfiguration->vbattAdcChannel, ADC_SLOW); // not currently used addChannel("Vref", engineConfiguration->vRefAdcChannel, ADC_SLOW); addChannel("CLT", engineConfiguration->clt.adcChannel, ADC_SLOW); diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index 5f9bdf5700..00e5ea4885 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -606,7 +606,7 @@ end_struct afr_sensor_s afr -adc_channel_e throttlePedalPositionAdcChannel;Electronic throttle pedal position input\nFirst channel\nSee also tps1_1AdcChannel\nset_analog_input_pin pps X +adc_channel_e throttlePedalPositionAdcChannel;Electronic throttle pedal position first channel\nSee throttlePedalPositionSecondAdcChannel for second channel\nSee also tps1_1AdcChannel\nset_analog_input_pin pps X brain_pin_e tle6240_cs; pin_output_mode_e tle6240_csPinMode;