diff --git a/firmware/config/boards/proteus/connectors/white35.yaml b/firmware/config/boards/proteus/connectors/white35.yaml index 51aeddcf9d..a17222d9f7 100644 --- a/firmware/config/boards/proteus/connectors/white35.yaml +++ b/firmware/config/boards/proteus/connectors/white35.yaml @@ -72,7 +72,7 @@ pins: id: [A2, EFI_ADC_2] class: [switch_inputs, analog_inputs] ts_name: Analog Volt 7 - function: "Analog Voltage Input #7" + function: "Analog Voltage Input #7 (PPS2)" type: av - pin: 17 diff --git a/firmware/config/boards/proteus_meta.h b/firmware/config/boards/proteus_meta.h index b7f54d081d..acd18c72ed 100644 --- a/firmware/config/boards/proteus_meta.h +++ b/firmware/config/boards/proteus_meta.h @@ -94,25 +94,29 @@ // PC2 #define PROTEUS_IN_ANALOG_VOLT_3 EFI_ADC_12 +#define PROTEUS_IN_TPS1_2 PROTEUS_IN_ANALOG_VOLT_3 // PC3 #define PROTEUS_IN_ANALOG_VOLT_4 EFI_ADC_13 +#define PROTEUS_IN_TPS2_1 PROTEUS_IN_ANALOG_VOLT_4 // PA0 #define PROTEUS_IN_ANALOG_VOLT_5 EFI_ADC_0 // PA1 #define PROTEUS_IN_ANALOG_VOLT_6 EFI_ADC_1 +#define PROTEUS_IN_PPS PROTEUS_IN_ANALOG_VOLT_6 // PA2 #define PROTEUS_IN_ANALOG_VOLT_7 EFI_ADC_2 +#define PROTEUS_IN_PPS2 PROTEUS_IN_ANALOG_VOLT_7 // PA3 #define PROTEUS_IN_ANALOG_VOLT_8 EFI_ADC_3 // PA4 #define PROTEUS_IN_ANALOG_VOLT_9 EFI_ADC_4 -#define PROTEUS_IN_PPS PROTEUS_IN_ANALOG_VOLT_9 + // PA5 #define PROTEUS_IN_ANALOG_VOLT_10 EFI_ADC_5 diff --git a/firmware/config/engines/bmw_m73.cpp b/firmware/config/engines/bmw_m73.cpp index ac3089512d..691af1146a 100644 --- a/firmware/config/engines/bmw_m73.cpp +++ b/firmware/config/engines/bmw_m73.cpp @@ -251,8 +251,7 @@ void setEngineBMW_M73_Proteus() { m73engine(); // 12 injectors defined in boards/proteus/board_configuration.cpp - // set_analog_input_pin pps pa4 - engineConfiguration->throttlePedalPositionAdcChannel = PROTEUS_IN_PPS; + strcpy(engineConfiguration->vehicleName, "Using Proteus"); @@ -278,6 +277,7 @@ void setEngineBMW_M73_Proteus() { engineConfiguration->startStopButtonPin = Gpio::E12; engineConfiguration->startStopButtonMode = PI_PULLUP; + // tps and pps setProteusHitachiEtbDefaults(); engineConfiguration->useETBforIdleControl = true; diff --git a/firmware/controllers/actuators/electronic_throttle.cpp b/firmware/controllers/actuators/electronic_throttle.cpp index 289567b0d0..75369b1755 100644 --- a/firmware/controllers/actuators/electronic_throttle.cpp +++ b/firmware/controllers/actuators/electronic_throttle.cpp @@ -1073,16 +1073,16 @@ void setProteusHitachiEtbDefaults() { setHitachiEtbCalibration(); // EFI_ADC_12: "Analog Volt 3" - engineConfiguration->tps1_2AdcChannel = EFI_ADC_12; + engineConfiguration->tps1_2AdcChannel = PROTEUS_IN_TPS1_2; // EFI_ADC_13: "Analog Volt 4" - engineConfiguration->tps2_1AdcChannel = EFI_ADC_13; + engineConfiguration->tps2_1AdcChannel = PROTEUS_IN_TPS2_1; // EFI_ADC_0: "Analog Volt 5" engineConfiguration->tps2_2AdcChannel = EFI_ADC_0; // EFI_ADC_1: "Analog Volt 6" - engineConfiguration->throttlePedalPositionAdcChannel = EFI_ADC_1; + engineConfiguration->throttlePedalPositionAdcChannel = PROTEUS_IN_PPS; // EFI_ADC_2: "Analog Volt 7" - engineConfiguration->throttlePedalPositionSecondAdcChannel = EFI_ADC_2; + engineConfiguration->throttlePedalPositionSecondAdcChannel = PROTEUS_IN_PPS2; } #endif /* EFI_ELECTRONIC_THROTTLE_BODY */