From fb53d2e9212ccafbf32a25f38df55458650a7e94 Mon Sep 17 00:00:00 2001 From: rusEfi Date: Fri, 29 Nov 2019 01:35:45 -0500 Subject: [PATCH] v12 --- firmware/config/engines/bmw_m73.cpp | 18 +++++++++++++++--- firmware/controllers/settings.cpp | 5 ++++- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/firmware/config/engines/bmw_m73.cpp b/firmware/config/engines/bmw_m73.cpp index 27f38264cc..bba946bbca 100644 --- a/firmware/config/engines/bmw_m73.cpp +++ b/firmware/config/engines/bmw_m73.cpp @@ -140,8 +140,8 @@ E_4: running Good GPIO: GPIOC_9 ETB#1 GPIOC_8 ETB#1 -GPIOB_8 -GPIOB_9 +GPIOB_8 ETB#2 +GPIOB_9 ETB#2 GPIOC_5 GPIOA_7 GPIOA_6 @@ -156,7 +156,9 @@ GPIOA_6 /** * Yellow op-amp board * - * AN6 tested pull-down 1M + * AN5 tested pull-down 1M PA3 TPS1 + * AN6 tested pull-down 1M PA4 TPS2 + * AN7 tested pull-down 1M PPS * AN8 tested no pull-down / no pull-up */ @@ -166,6 +168,11 @@ GPIOA_6 // ETB motor NEG pin # - white wire - OUT 1 engineConfiguration->throttlePedalPositionAdcChannel = EFI_ADC_7; + // set_analog_input_pin tps PA3 + engineConfiguration->tps1_1AdcChannel = EFI_ADC_3; // PA3 + // set_analog_input_pin tps2 PA3 + engineConfiguration->tps2_1AdcChannel = EFI_ADC_4; // PA4 + // PWM pin boardConfiguration->etb1.controlPin1 = GPIO_UNASSIGNED; // DIR pin @@ -173,6 +180,11 @@ GPIOA_6 boardConfiguration->etb1.directionPin2 = GPIOC_8; CONFIG(etb1_use_two_wires) = true; + // PWM pin + engineConfiguration->etb2.controlPin1 = GPIO_UNASSIGNED; + // DIR pin + engineConfiguration->etb2.directionPin1 = GPIOB_8; + engineConfiguration->etb2.directionPin2 = GPIOB_9; CONFIG(etb2_use_two_wires) = true; diff --git a/firmware/controllers/settings.cpp b/firmware/controllers/settings.cpp index 053fa14f3b..189c970090 100644 --- a/firmware/controllers/settings.cpp +++ b/firmware/controllers/settings.cpp @@ -818,7 +818,10 @@ static void setAnalogInputPin(const char *sensorStr, const char *pinName) { scheduleMsg(&logger, "setting IAT to %s/%d", pinName, channel); } else if (strEqual("tps", sensorStr)) { engineConfiguration->tps1_1AdcChannel = channel; - scheduleMsg(&logger, "setting TPS to %s/%d", pinName, channel); + scheduleMsg(&logger, "setting TPS1 to %s/%d", pinName, channel); + } else if (strEqual("tps2", sensorStr)) { + engineConfiguration->tps2_1AdcChannel = channel; + scheduleMsg(&logger, "setting TPS2 to %s/%d", pinName, channel); } incrementGlobalConfigurationVersion(PASS_ENGINE_PARAMETER_SIGNATURE); }