Skip to content

Commit

Permalink
proteus meta
Browse files Browse the repository at this point in the history
  • Loading branch information
mck1117 authored and rusefillc committed May 4, 2022
1 parent b35e1ac commit 1bbc947
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion firmware/config/boards/proteus/connectors/white35.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion firmware/config/boards/proteus_meta.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions firmware/config/engines/bmw_m73.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand All @@ -278,6 +277,7 @@ void setEngineBMW_M73_Proteus() {
engineConfiguration->startStopButtonPin = Gpio::E12;
engineConfiguration->startStopButtonMode = PI_PULLUP;

// tps and pps
setProteusHitachiEtbDefaults();

engineConfiguration->useETBforIdleControl = true;
Expand Down
8 changes: 4 additions & 4 deletions firmware/controllers/actuators/electronic_throttle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

0 comments on commit 1bbc947

Please sign in to comment.