Merge branch 'master' of https://github.com/rusefi/rusefi into test_trigger_input_adc_more2
This commit is contained in:
commit
a63e339d2a
|
@ -156,32 +156,37 @@ jobs:
|
|||
- build-target: harley81
|
||||
folder: config/boards/hellen/harley81
|
||||
ini-file: rusefi_harley81.ini
|
||||
skip-rate: 90
|
||||
skip-rate: 99
|
||||
|
||||
- build-target: small-can-board
|
||||
folder: config/boards/hellen/small-can-board
|
||||
ini-file: rusefi_small-can-board.ini
|
||||
skip-rate: 99
|
||||
|
||||
- build-target: hellen88bmw
|
||||
folder: config/boards/hellen/hellen88bmw
|
||||
ini-file: rusefi_hellen88bmw.ini
|
||||
skip-rate: 90
|
||||
skip-rate: 99
|
||||
|
||||
- build-target: hellen88bmw_avr
|
||||
folder: config/boards/hellen/hellen88bmw
|
||||
ini-file: rusefi_hellen88bmw.ini
|
||||
skip-rate: 90
|
||||
skip-rate: 99
|
||||
|
||||
- build-target: hellen-nb1
|
||||
folder: config/boards/hellen/hellen-nb1
|
||||
ini-file: rusefi_hellen-nb1.ini
|
||||
skip-rate: 90
|
||||
skip-rate: 99
|
||||
|
||||
- build-target: hellen-gm-e67
|
||||
folder: config/boards/hellen/hellen-gm-e67
|
||||
ini-file: rusefi_hellen-gm-e67.ini
|
||||
skip-rate: 90
|
||||
skip-rate: 99
|
||||
|
||||
- build-target: hellenNA8_96
|
||||
folder: config/boards/hellen/hellenNA8_96
|
||||
ini-file: rusefi_hellenNA8_96.ini
|
||||
skip-rate: 90
|
||||
skip-rate: 99
|
||||
|
||||
- build-target: hellenNA6
|
||||
folder: config/boards/hellen/hellen64_miataNA6_94
|
||||
|
@ -196,7 +201,7 @@ jobs:
|
|||
- build-target: hellen121vag
|
||||
folder: config/boards/hellen/hellen121vag
|
||||
ini-file: rusefi_hellen121vag.ini
|
||||
skip-rate: 90
|
||||
skip-rate: 99
|
||||
|
||||
- build-target: hellen121nissan
|
||||
folder: config/boards/hellen/hellen121nissan
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 09b56537b65864e6bee8a5c31ffef8dbd814ff47
|
||||
Subproject commit e175c3781b506c1130aedd0c1e1aebe53764d862
|
|
@ -57,16 +57,15 @@ static void setStepperConfig() {
|
|||
engineConfiguration->stepperEnablePin = Gpio::A8;
|
||||
}
|
||||
|
||||
Gpio getRunningLedPin() {
|
||||
return Gpio::C10;
|
||||
}
|
||||
|
||||
void setBoardConfigOverrides() {
|
||||
setupVbatt();
|
||||
//setEtbConfig();
|
||||
setStepperConfig();
|
||||
|
||||
// PE3 is error LED, configured in board.mk
|
||||
engineConfiguration->communicationLedPin = Gpio::Unassigned;
|
||||
engineConfiguration->runningLedPin = Gpio::C10;
|
||||
engineConfiguration->warningLedPin = Gpio::Unassigned;
|
||||
|
||||
engineConfiguration->clt.config.bias_resistor = 2490;
|
||||
engineConfiguration->iat.config.bias_resistor = 2490;
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
|
||||
#define ts_show_gps false
|
||||
#define ts_show_software_knock true
|
||||
|
||||
#define show_test_presets true
|
||||
|
|
|
@ -121,22 +121,11 @@ static void setupDefaultSensorInputs() {
|
|||
engineConfiguration->lps25BaroSensorSda = Gpio::Unassigned;
|
||||
}
|
||||
|
||||
|
||||
static void setLedPins() {
|
||||
// PE3 is error LED, configured in board.mk
|
||||
engineConfiguration->communicationLedPin = Gpio::Unassigned;
|
||||
engineConfiguration->runningLedPin = Gpio::Unassigned;
|
||||
engineConfiguration->warningLedPin = Gpio::Unassigned;
|
||||
}
|
||||
|
||||
void setBoardDefaultConfiguration(void) {
|
||||
|
||||
setInjectorPins();
|
||||
setIgnitionPins();
|
||||
setupVbatt();
|
||||
setLedPins();
|
||||
|
||||
|
||||
//engineConfiguration->sdCardPeriodMs = 50;
|
||||
engineConfiguration->isSdCardEnabled = true;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
#define ts_show_gps false
|
||||
|
||||
#define ts_show_software_knock true
|
||||
|
||||
#define show_test_presets true
|
||||
|
|
|
@ -121,22 +121,11 @@ static void setupDefaultSensorInputs() {
|
|||
engineConfiguration->lps25BaroSensorSda = Gpio::Unassigned;
|
||||
}
|
||||
|
||||
|
||||
static void setLedPins() {
|
||||
// PE3 is error LED, configured in board.mk
|
||||
engineConfiguration->communicationLedPin = Gpio::Unassigned;
|
||||
engineConfiguration->runningLedPin = Gpio::Unassigned;
|
||||
engineConfiguration->warningLedPin = Gpio::Unassigned;
|
||||
}
|
||||
|
||||
void setBoardDefaultConfiguration(void) {
|
||||
|
||||
setInjectorPins();
|
||||
setIgnitionPins();
|
||||
setupVbatt();
|
||||
setLedPins();
|
||||
|
||||
|
||||
//engineConfiguration->sdCardPeriodMs = 50;
|
||||
engineConfiguration->isSdCardEnabled = true;
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
|
||||
#define ts_show_gps false
|
||||
#define ts_show_software_knock true
|
||||
|
||||
#define show_test_presets true
|
||||
|
|
|
@ -84,16 +84,24 @@ static void setStepperConfig() {
|
|||
engineConfiguration->stepperEnablePin = Gpio::F9;
|
||||
}
|
||||
|
||||
// PE3 is error LED, configured in board.mk
|
||||
Gpio getCommsLedPin() {
|
||||
return Gpio::G12;
|
||||
}
|
||||
|
||||
Gpio getRunningLedPin() {
|
||||
return Gpio::G9;
|
||||
}
|
||||
|
||||
Gpio getWarningLedPin() {
|
||||
return Gpio::G10;
|
||||
}
|
||||
|
||||
void setBoardConfigOverrides() {
|
||||
setupVbatt();
|
||||
setEtbConfig();
|
||||
setStepperConfig();
|
||||
|
||||
// PE3 is error LED, configured in board.mk
|
||||
engineConfiguration->communicationLedPin = Gpio::G12;
|
||||
engineConfiguration->runningLedPin = Gpio::G9;
|
||||
engineConfiguration->warningLedPin = Gpio::G10;
|
||||
|
||||
engineConfiguration->clt.config.bias_resistor = 2490;
|
||||
engineConfiguration->iat.config.bias_resistor = 2490;
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
|
||||
#define ts_show_gps false
|
||||
#define ts_show_software_knock true
|
||||
|
||||
#define show_test_presets true
|
||||
|
|
|
@ -121,20 +121,23 @@ static void setupDefaultSensorInputs() {
|
|||
engineConfiguration->lps25BaroSensorSda = Gpio::Unassigned;
|
||||
}
|
||||
|
||||
// PE3 is error LED, configured in board.mk
|
||||
Gpio getCommsLedPin() {
|
||||
return Gpio::B8;
|
||||
}
|
||||
|
||||
static void setLedPins() {
|
||||
// PE3 is error LED, configured in board.mk
|
||||
engineConfiguration->communicationLedPin = Gpio::B8;
|
||||
engineConfiguration->runningLedPin = Gpio::B7;
|
||||
engineConfiguration->warningLedPin = Gpio::B6;
|
||||
Gpio getRunningLedPin() {
|
||||
return Gpio::B7;
|
||||
}
|
||||
|
||||
Gpio getWarningLedPin() {
|
||||
return Gpio::B6;
|
||||
}
|
||||
|
||||
void setBoardDefaultConfiguration(void) {
|
||||
|
||||
setInjectorPins();
|
||||
setIgnitionPins();
|
||||
setupVbatt();
|
||||
setLedPins();
|
||||
|
||||
|
||||
//engineConfiguration->sdCardPeriodMs = 50;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
#define ts_show_gps false
|
||||
|
||||
#define ts_show_software_knock true
|
||||
|
||||
#define show_test_presets true
|
||||
|
|
|
@ -49,11 +49,6 @@ void setBoardDefaultConfiguration() {
|
|||
engineConfiguration->clt.config.resistance_2 = 5.0f;
|
||||
engineConfiguration->clt.config.tempC_2 = 120.0f,
|
||||
engineConfiguration->clt.config.bias_resistor = 3300;
|
||||
|
||||
//engineConfiguration->canNbcType = CAN_BUS_NBC_BMW;
|
||||
engineConfiguration->canNbcType = CAN_BUS_MAZDA_RX8;
|
||||
engineConfiguration->canReadEnabled = true;
|
||||
engineConfiguration->canWriteEnabled = false;
|
||||
|
||||
engineConfiguration->tpsMin = convertVoltageTo10bitADC(0.250);
|
||||
engineConfiguration->tpsMax = convertVoltageTo10bitADC(4.538);
|
||||
|
@ -62,11 +57,6 @@ void setBoardDefaultConfiguration() {
|
|||
|
||||
engineConfiguration->mapMinBufferLength = 4;
|
||||
|
||||
engineConfiguration->communicationLedPin = Gpio::Unassigned;//GPIOJ_0;
|
||||
engineConfiguration->runningLedPin = Gpio::Unassigned;
|
||||
engineConfiguration->warningLedPin = Gpio::Unassigned;
|
||||
engineConfiguration->triggerErrorPin = Gpio::Unassigned;
|
||||
|
||||
engineConfiguration->map.sensor.hwChannel = EFI_ADC_13;
|
||||
engineConfiguration->clt.adcChannel = EFI_ADC_26;
|
||||
engineConfiguration->iat.adcChannel = EFI_ADC_27;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -115,8 +115,9 @@
|
|||
#define CAN_ECU_HW_META 0xAB1234
|
||||
#define CAN_ECU_SERIAL_RX_ID 0x100
|
||||
#define CAN_ECU_SERIAL_TX_ID 0x102
|
||||
#define can_nbc_e_auto_enum 0="CAN_BUS_NBC_NONE",12="CAN_AIM_DASH",6="CAN_BUS_BMW_E90",10="CAN_BUS_GENESIS_COUPE",11="CAN_BUS_HONDA_K",7="CAN_BUS_Haltech",3="CAN_BUS_MAZDA_RX8",8="CAN_BUS_MQB",13="CAN_BUS_MS_SIMPLE_BROADCAST",4="CAN_BUS_NBC_BMW",1="CAN_BUS_NBC_FIAT",2="CAN_BUS_NBC_VAG",9="CAN_BUS_NISSAN_VQ",5="CAN_BUS_W202_C180"
|
||||
#define can_nbc_e_auto_enum 0="CAN_BUS_NBC_NONE",12="CAN_AIM_DASH",4="CAN_BUS_BMW_E46",6="CAN_BUS_BMW_E90",10="CAN_BUS_GENESIS_COUPE",11="CAN_BUS_HONDA_K",7="CAN_BUS_Haltech",3="CAN_BUS_MAZDA_RX8",8="CAN_BUS_MQB",13="CAN_BUS_MS_SIMPLE_BROADCAST",1="CAN_BUS_NBC_FIAT",2="CAN_BUS_NBC_VAG",9="CAN_BUS_NISSAN_VQ",5="CAN_BUS_W202_C180"
|
||||
#define can_nbc_e_CAN_AIM_DASH 12
|
||||
#define can_nbc_e_CAN_BUS_BMW_E46 4
|
||||
#define can_nbc_e_CAN_BUS_BMW_E90 6
|
||||
#define can_nbc_e_CAN_BUS_GENESIS_COUPE 10
|
||||
#define can_nbc_e_CAN_BUS_Haltech 7
|
||||
|
@ -124,7 +125,6 @@
|
|||
#define can_nbc_e_CAN_BUS_MAZDA_RX8 3
|
||||
#define can_nbc_e_CAN_BUS_MQB 8
|
||||
#define can_nbc_e_CAN_BUS_MS_SIMPLE_BROADCAST 13
|
||||
#define can_nbc_e_CAN_BUS_NBC_BMW 4
|
||||
#define can_nbc_e_CAN_BUS_NBC_FIAT 1
|
||||
#define can_nbc_e_CAN_BUS_NBC_NONE 0
|
||||
#define can_nbc_e_CAN_BUS_NBC_VAG 2
|
||||
|
@ -272,7 +272,7 @@
|
|||
#define ego_sensor_e_ES_NarrowBand 3
|
||||
#define ego_sensor_e_ES_PLX 4
|
||||
#define EGT_CHANNEL_COUNT 8
|
||||
#define engine_configuration_s_size 3972
|
||||
#define engine_configuration_s_size 3964
|
||||
#define engine_load_mode_e_auto_enum 0="LM_SPEED_DENSITY",2="LM_ALPHA_N",3="LM_LUA",100="LM_MOCK",1="LM_REAL_MAF"
|
||||
#define engine_load_mode_e_enum "Speed Density", "MAF Air Charge", "Alpha-N", "Lua"
|
||||
#define engine_load_mode_e_LM_ALPHA_N 2
|
||||
|
@ -990,7 +990,7 @@
|
|||
#define PACK_PERCENT_BYTE_MULT 100.0
|
||||
#define PEDAL_TO_TPS_SIZE 8
|
||||
#define PERCENT_TRIM_BYTE_PACKING_DIV 0.02
|
||||
#define persistent_config_s_size 23176
|
||||
#define persistent_config_s_size 23168
|
||||
#define pid_s_size 20
|
||||
#define PidAutoTune_AutoTunerState_AUTOTUNER_OFF 0
|
||||
#define PidAutoTune_AutoTunerState_CONVERGED 16
|
||||
|
@ -1079,7 +1079,7 @@
|
|||
#define SentEtbType_NONE 0
|
||||
#define show_Frankenso_presets true
|
||||
#define show_test_presets true
|
||||
#define SIGNATURE_HASH 756779283
|
||||
#define SIGNATURE_HASH 1444300984
|
||||
#define spi_device_e_auto_enum 0="SPI_NONE",1="SPI_DEVICE_1",2="SPI_DEVICE_2",3="SPI_DEVICE_3",4="SPI_DEVICE_4"
|
||||
#define spi_device_e_SPI_DEVICE_1 1
|
||||
#define spi_device_e_SPI_DEVICE_2 2
|
||||
|
@ -1124,7 +1124,7 @@
|
|||
#define TOOTH_PACKET_SIZE 2
|
||||
#define TOP_DEAD_CENTER_MESSAGE "r"
|
||||
#define TORQUE_CURVE_SIZE 6
|
||||
#define TOTAL_CONFIG_SIZE 23176
|
||||
#define TOTAL_CONFIG_SIZE 23168
|
||||
#define TPS_2_BYTE_PACKING_MULT 100
|
||||
#define TPS_TPS_ACCEL_CLT_CORR_TABLE 4
|
||||
#define TPS_TPS_ACCEL_TABLE 8
|
||||
|
@ -1349,7 +1349,6 @@
|
|||
#define ts_show_etb true
|
||||
#define ts_show_etb_pins true
|
||||
#define ts_show_full_pinout true
|
||||
#define ts_show_gps true
|
||||
#define ts_show_hardware_simulator true
|
||||
#define ts_show_hip9011 false
|
||||
#define ts_show_ignitionPinMode true
|
||||
|
@ -1369,7 +1368,7 @@
|
|||
#define ts_show_vbatt true
|
||||
#define ts_show_vr_threshold_2 true
|
||||
#define ts_show_vr_threshold_all true
|
||||
#define TS_SIGNATURE "rusEFI master.2023.06.02.cypress.756779283"
|
||||
#define TS_SIGNATURE "rusEFI master.2023.06.06.cypress.1444300984"
|
||||
#define TS_SINGLE_WRITE_COMMAND 'W'
|
||||
#define TS_SINGLE_WRITE_COMMAND_char W
|
||||
#define TS_TEST_COMMAND 't'
|
||||
|
|
|
@ -26,6 +26,18 @@ static void setCanFrankensoDefaults() {
|
|||
engineConfiguration->canRxPin = Gpio::B12;
|
||||
}
|
||||
|
||||
Gpio getWarningLedPin() {
|
||||
return Gpio::D13; // orange LED on discovery
|
||||
}
|
||||
|
||||
Gpio getCommunicationLedPin() {
|
||||
return Gpio::D15; // blue LED on discovery
|
||||
}
|
||||
|
||||
Gpio getRunningLedPin() {
|
||||
return Gpio::D12; // green LED on discovery
|
||||
}
|
||||
|
||||
static void setHip9011FrankensoPinout() {
|
||||
/**
|
||||
* SPI on PB13/14/15
|
||||
|
@ -95,9 +107,6 @@ void setBoardDefaultConfiguration() {
|
|||
|
||||
engineConfiguration->accelerometerSpiDevice = SPI_DEVICE_1;
|
||||
|
||||
// engineConfiguration->gps_rx_pin = Gpio::B7;
|
||||
// engineConfiguration->gps_tx_pin = Gpio::B6;
|
||||
|
||||
engineConfiguration->triggerSimulatorPins[0] = Gpio::D1;
|
||||
engineConfiguration->triggerSimulatorPins[1] = Gpio::D2;
|
||||
|
||||
|
|
|
@ -9,12 +9,13 @@ void boardInit(void)
|
|||
/* NOP */
|
||||
}
|
||||
|
||||
Gpio getRunningLedPin() {
|
||||
return Gpio::G13; /* LD3 - green */
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Board-specific configuration defaults.
|
||||
* @todo Add your board-specific code, if any.
|
||||
*/
|
||||
void setBoardDefaultConfiguration() {
|
||||
engineConfiguration->communicationLedPin = Gpio::Unassigned;
|
||||
engineConfiguration->runningLedPin = Gpio::G13; /* LD3 - green */
|
||||
engineConfiguration->warningLedPin = Gpio::Unassigned;
|
||||
}
|
||||
|
|
|
@ -9,12 +9,7 @@ void boardInit(void)
|
|||
/* NOP */
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Board-specific configuration defaults.
|
||||
* @todo Add your board-specific code, if any.
|
||||
*/
|
||||
void setBoardDefaultConfiguration() {
|
||||
engineConfiguration->communicationLedPin = Gpio::Unassigned;
|
||||
engineConfiguration->runningLedPin = Gpio::G13; /* LD3 - green */
|
||||
engineConfiguration->warningLedPin = Gpio::Unassigned;
|
||||
Gpio getRunningLedPin() {
|
||||
// LD3 - green
|
||||
return Gpio::G13;
|
||||
}
|
||||
|
|
|
@ -97,8 +97,9 @@ void boardOnConfigurationChange(engine_configuration_s * /*previousConfiguration
|
|||
alphaCamPullDown.setValue(engineConfiguration->boardUseCamPullDown);
|
||||
}
|
||||
|
||||
#include "hellen_leds_144.cpp"
|
||||
|
||||
void setBoardConfigOverrides() {
|
||||
setHellen144LedPins();
|
||||
// todo: do we need this conditional on boardId or not really?
|
||||
setHellenMegaEnPin();
|
||||
setupVbatt();
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
|
||||
|
||||
#define ts_show_vbatt false
|
||||
#define ts_show_clt_iat_pullup false
|
||||
#define ts_show_egt false
|
||||
#define ts_show_gps false
|
||||
|
||||
#define ts_show_etb_pins false
|
||||
#define ts_show_analog_divider false
|
||||
#define ts_show_spi true
|
||||
#define ts_show_sd_card false
|
||||
#define ts_show_spi false
|
||||
#define ts_show_can_pins false
|
||||
#define ts_show_tunerstudio_port true
|
||||
#define ts_show_can2 false
|
||||
|
|
|
@ -140,8 +140,9 @@ void boardOnConfigurationChange(engine_configuration_s * /*previousConfiguration
|
|||
alphaD5PullDown.setValue(engineConfiguration->boardUseD5PullDown);
|
||||
}
|
||||
|
||||
#include "hellen_leds_144.cpp"
|
||||
|
||||
void setBoardConfigOverrides() {
|
||||
setHellen144LedPins();
|
||||
setupVbatt();
|
||||
// todo: do we need this conditional on boardId or not really?
|
||||
setHellenMegaEnPin();
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
|
||||
|
||||
#define ts_show_vbatt false
|
||||
#define ts_show_clt_iat_pullup false
|
||||
#define ts_show_egt false
|
||||
#define ts_show_gps false
|
||||
#define ts_show_etb_pins false
|
||||
#define ts_show_analog_divider false
|
||||
#define ts_show_spi true
|
||||
#define ts_show_spi false
|
||||
#define ts_show_can_pins false
|
||||
#define ts_show_tunerstudio_port true
|
||||
#define ts_show_can2 false
|
||||
|
|
|
@ -145,8 +145,9 @@ void boardOnConfigurationChange(engine_configuration_s * /*previousConfiguration
|
|||
//alphaD5PullDown.setValue(engineConfiguration->boardUseD5PullDown);
|
||||
}
|
||||
|
||||
#include "hellen_leds_144.cpp"
|
||||
|
||||
void setBoardConfigOverrides() {
|
||||
setHellen144LedPins();
|
||||
setupVbatt();
|
||||
|
||||
setHellenSdCardSpi2();
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
|
||||
|
||||
#define ts_show_vbatt false
|
||||
#define ts_show_clt_iat_pullup false
|
||||
#define ts_show_egt false
|
||||
#define ts_show_gps false
|
||||
#define ts_show_etb_pins false
|
||||
#define ts_show_analog_divider false
|
||||
#define ts_show_spi true
|
||||
#define ts_show_spi false
|
||||
#define ts_show_can_pins false
|
||||
#define ts_show_tunerstudio_port true
|
||||
#define ts_show_can2 false
|
||||
|
|
|
@ -105,8 +105,9 @@ void boardInitHardware() {
|
|||
void boardOnConfigurationChange(engine_configuration_s * /*previousConfiguration*/) {
|
||||
}
|
||||
|
||||
#include "hellen_leds_144.cpp"
|
||||
|
||||
void setBoardConfigOverrides() {
|
||||
setHellen144LedPins();
|
||||
setupVbatt();
|
||||
|
||||
setHellenSdCardSpi2();
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
|
||||
#define ts_show_egt false
|
||||
#define ts_show_gps false
|
||||
|
||||
#define ts_show_etb_pins false
|
||||
#define ts_show_analog_divider false
|
||||
#define ts_show_spi true
|
||||
|
|
|
@ -4,10 +4,9 @@
|
|||
BOARDCPPSRC += $(BOARDS_DIR)/hellen/hellen_common.cpp \
|
||||
$(BOARDS_DIR)/hellen/hellen_board_id.cpp
|
||||
|
||||
DDEFS += -DLED_ERROR_BRAIN_PIN_MODE=INVERTED_OUTPUT
|
||||
DDEFS += -DLED_RUNING_BRAIN_PIN_MODE=INVERTED_OUTPUT
|
||||
DDEFS += -DLED_WARNING_BRAIN_PIN_MODE=INVERTED_OUTPUT
|
||||
DDEFS += -DLED_COMMUNICATION_BRAIN_PIN_MODE=INVERTED_OUTPUT
|
||||
BOARDINC += $(BOARDS_DIR)/hellen
|
||||
|
||||
DDEFS += -DLED_PIN_MODE=OM_INVERTED
|
||||
|
||||
# We are running on Hellen-One hardware!
|
||||
DDEFS += -DHW_HELLEN=1
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
|
||||
#define ts_show_egt false
|
||||
#define ts_show_gps false
|
||||
|
||||
#define ts_show_etb_pins false
|
||||
#define ts_show_analog_divider false
|
||||
#define ts_show_spi true
|
||||
|
|
|
@ -78,8 +78,9 @@ static void setupDefaultSensorInputs() {
|
|||
engineConfiguration->iat.adcChannel = H144_IN_IAT;
|
||||
}
|
||||
|
||||
#include "hellen_leds_144.cpp"
|
||||
|
||||
void setBoardConfigOverrides() {
|
||||
setHellen144LedPins();
|
||||
setupVbatt();
|
||||
|
||||
setHellenSdCardSpi2();
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
|
||||
#define ts_show_egt false
|
||||
#define ts_show_gps false
|
||||
|
||||
#define ts_show_etb_pins false
|
||||
#define ts_show_analog_divider false
|
||||
#define ts_show_spi true
|
||||
|
|
|
@ -62,8 +62,9 @@ void onBoardStandBy() {
|
|||
hellenBoardStandBy();
|
||||
}
|
||||
|
||||
#include "hellen_leds_144.cpp"
|
||||
|
||||
void setBoardConfigOverrides() {
|
||||
setHellen144LedPins();
|
||||
setHellenMegaEnPin();
|
||||
setupVbatt();
|
||||
|
||||
|
|
|
@ -4,11 +4,12 @@
|
|||
#define ts_show_can_terminator true
|
||||
|
||||
#define ts_show_vbatt false
|
||||
#define ts_show_clt_iat_pullup false
|
||||
#define ts_show_egt false
|
||||
#define ts_show_gps false
|
||||
|
||||
#define ts_show_etb_pins false
|
||||
#define ts_show_analog_divider false
|
||||
#define ts_show_spi true
|
||||
#define ts_show_spi false
|
||||
#define ts_show_sd_card true
|
||||
#define ts_show_can_pins false
|
||||
#define ts_show_tunerstudio_port false
|
||||
|
|
|
@ -68,8 +68,9 @@ static void setupDefaultSensorInputs() {
|
|||
engineConfiguration->iat.adcChannel = H144_IN_IAT;
|
||||
}
|
||||
|
||||
#include "hellen_leds_144.cpp"
|
||||
|
||||
void setBoardConfigOverrides() {
|
||||
setHellen144LedPins();
|
||||
setupVbatt();
|
||||
|
||||
setHellenSdCardSpi2();
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
|
||||
#define ts_show_egt false
|
||||
#define ts_show_gps false
|
||||
|
||||
#define ts_show_etb_pins false
|
||||
#define ts_show_analog_divider false
|
||||
#define ts_show_spi true
|
||||
|
|
|
@ -74,8 +74,9 @@ static void setupDefaultSensorInputs() {
|
|||
engineConfiguration->iat.adcChannel = H144_IN_IAT;
|
||||
}
|
||||
|
||||
#include "hellen_leds_144.cpp"
|
||||
|
||||
void setBoardConfigOverrides() {
|
||||
setHellen144LedPins();
|
||||
setupVbatt();
|
||||
setHellenSdCardSpi3();
|
||||
|
||||
|
|
|
@ -3,12 +3,13 @@
|
|||
|
||||
|
||||
|
||||
|
||||
#define ts_show_vbatt false
|
||||
#define ts_show_clt_iat_pullup false
|
||||
#define ts_show_egt false
|
||||
#define ts_show_gps false
|
||||
|
||||
#define ts_show_etb_pins false
|
||||
#define ts_show_analog_divider false
|
||||
#define ts_show_spi true
|
||||
#define ts_show_spi false
|
||||
#define ts_show_sd_card true
|
||||
#define ts_show_can_pins false
|
||||
#define ts_show_tunerstudio_port false
|
||||
|
|
|
@ -73,8 +73,9 @@ static void setupDefaultSensorInputs() {
|
|||
engineConfiguration->iat.adcChannel = H144_IN_IAT;
|
||||
}
|
||||
|
||||
#include "hellen_leds_176.cpp"
|
||||
|
||||
void setBoardConfigOverrides() {
|
||||
setHellen176LedPins();
|
||||
setupVbatt();
|
||||
|
||||
setHellenSdCardSpi3();
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
|
||||
#define ts_show_egt false
|
||||
#define ts_show_gps false
|
||||
|
||||
#define ts_show_etb_pins false
|
||||
#define ts_show_analog_divider false
|
||||
#define ts_show_spi true
|
||||
|
|
|
@ -129,8 +129,9 @@ static void setHellen128ETBConfig() {
|
|||
}
|
||||
}
|
||||
|
||||
#include "hellen_leds_176.cpp"
|
||||
|
||||
void setBoardConfigOverrides() {
|
||||
setHellen176LedPins();
|
||||
setupVbatt();
|
||||
|
||||
setHellenSdCardSpi2();
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
|
||||
#define ts_show_egt false
|
||||
#define ts_show_gps false
|
||||
|
||||
#define ts_show_etb_pins false
|
||||
#define ts_show_analog_divider false
|
||||
#define ts_show_spi true
|
||||
|
|
|
@ -67,10 +67,11 @@ static void setupDefaultSensorInputs() {
|
|||
engineConfiguration->iat.adcChannel = H144_IN_IAT;
|
||||
}
|
||||
|
||||
#include "hellen_leds_144.cpp"
|
||||
|
||||
static bool isFirstInvocation = true;
|
||||
|
||||
void setBoardConfigOverrides() {
|
||||
setHellen144LedPins();
|
||||
setupVbatt();
|
||||
|
||||
setHellenSdCardSpi2();
|
||||
|
|
|
@ -4,11 +4,12 @@
|
|||
|
||||
|
||||
#define ts_show_vbatt false
|
||||
#define ts_show_clt_iat_pullup false
|
||||
#define ts_show_egt false
|
||||
#define ts_show_gps false
|
||||
|
||||
#define ts_show_etb_pins false
|
||||
#define ts_show_analog_divider false
|
||||
#define ts_show_spi true
|
||||
#define ts_show_spi false
|
||||
#define ts_show_sd_card true
|
||||
#define ts_show_can_pins false
|
||||
#define ts_show_tunerstudio_port false
|
||||
|
|
|
@ -68,8 +68,9 @@ static void setupDefaultSensorInputs() {
|
|||
engineConfiguration->iat.adcChannel = H144_IN_IAT;
|
||||
}
|
||||
|
||||
#include "hellen_leds_176.cpp"
|
||||
|
||||
void setBoardConfigOverrides() {
|
||||
setHellen176LedPins();
|
||||
setupVbatt();
|
||||
|
||||
setHellenSdCardSpi2();
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
|
||||
#define ts_show_egt false
|
||||
#define ts_show_gps false
|
||||
|
||||
#define ts_show_etb_pins false
|
||||
#define ts_show_analog_divider false
|
||||
#define ts_show_spi true
|
||||
|
|
|
@ -64,8 +64,9 @@ static void setupDefaultSensorInputs() {
|
|||
engineConfiguration->iat.adcChannel = H144_IN_IAT;
|
||||
}
|
||||
|
||||
#include "hellen_leds_176.cpp"
|
||||
|
||||
void setBoardConfigOverrides() {
|
||||
setHellen176LedPins();
|
||||
setupVbatt();
|
||||
|
||||
if (engine->engineState.hellenBoardId == -1) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
|
||||
#define ts_show_egt false
|
||||
#define ts_show_gps false
|
||||
|
||||
#define ts_show_etb_pins false
|
||||
#define ts_show_analog_divider false
|
||||
#define ts_show_spi true
|
||||
|
|
|
@ -31,18 +31,12 @@ static void setIgnitionPins() {
|
|||
engineConfiguration->ignitionPinMode = OM_DEFAULT;
|
||||
}
|
||||
|
||||
static void setLedPins() {
|
||||
#ifdef EFI_COMMUNICATION_PIN
|
||||
engineConfiguration->communicationLedPin = EFI_COMMUNICATION_PIN;
|
||||
#else
|
||||
engineConfiguration->communicationLedPin = Gpio::H10;
|
||||
#endif /* EFI_COMMUNICATION_PIN */
|
||||
Gpio getCommsLedPin() {
|
||||
return Gpio::H10;
|
||||
}
|
||||
|
||||
//!!!!!!!!!!!
|
||||
engineConfiguration->runningLedPin = Gpio::Unassigned;
|
||||
//engineConfiguration->runningLedPin = Gpio::H9; // green
|
||||
|
||||
engineConfiguration->warningLedPin = Gpio::H11; // yellow
|
||||
Gpio getWarningLedPin() {
|
||||
return Gpio::H11;
|
||||
}
|
||||
|
||||
static void setupVbatt() {
|
||||
|
@ -79,7 +73,6 @@ static void setupDefaultSensorInputs() {
|
|||
}
|
||||
|
||||
void setBoardConfigOverrides() {
|
||||
setLedPins();
|
||||
setupVbatt();
|
||||
|
||||
// Hellen81a uses SPI2 for SD-card
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
|
||||
#define ts_show_egt false
|
||||
#define ts_show_gps false
|
||||
|
||||
#define ts_show_etb_pins false
|
||||
#define ts_show_analog_divider false
|
||||
#define ts_show_spi true
|
||||
|
|
|
@ -69,8 +69,9 @@ static void setupDefaultSensorInputs() {
|
|||
engineConfiguration->iat.adcChannel = H144_IN_IAT;
|
||||
}
|
||||
|
||||
#include "hellen_leds_144.cpp"
|
||||
|
||||
void setBoardConfigOverrides() {
|
||||
setHellen144LedPins();
|
||||
setupVbatt();
|
||||
|
||||
// hellen88bmw uses L6205PD
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
|
||||
#define ts_show_egt false
|
||||
#define ts_show_gps false
|
||||
|
||||
#define ts_show_etb_pins false
|
||||
#define ts_show_analog_divider false
|
||||
#define ts_show_spi true
|
||||
|
|
|
@ -68,8 +68,9 @@ static void setupDefaultSensorInputs() {
|
|||
engineConfiguration->iat.adcChannel = H144_IN_IAT;
|
||||
}
|
||||
|
||||
#include "hellen_leds_144.cpp"
|
||||
|
||||
void setBoardConfigOverrides() {
|
||||
setHellen144LedPins();
|
||||
setupVbatt();
|
||||
|
||||
setHellenSdCardSpi2();
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
|
||||
#define ts_show_egt false
|
||||
#define ts_show_gps false
|
||||
|
||||
#define ts_show_etb_pins false
|
||||
#define ts_show_analog_divider false
|
||||
#define ts_show_spi true
|
||||
|
|
|
@ -5,31 +5,11 @@ void hellenWbo() {
|
|||
engineConfiguration->enableAemXSeries = true;
|
||||
}
|
||||
|
||||
void setHellen144LedPins() {
|
||||
#ifdef EFI_COMMUNICATION_PIN
|
||||
engineConfiguration->communicationLedPin = EFI_COMMUNICATION_PIN;
|
||||
#else
|
||||
engineConfiguration->communicationLedPin = H144_LED3;
|
||||
#endif /* EFI_COMMUNICATION_PIN */
|
||||
engineConfiguration->runningLedPin = H144_LED2;
|
||||
engineConfiguration->warningLedPin = H144_LED4;
|
||||
}
|
||||
|
||||
void setHellenCan() {
|
||||
engineConfiguration->canTxPin = Gpio::D1;
|
||||
engineConfiguration->canRxPin = Gpio::D0;
|
||||
}
|
||||
|
||||
void setHellen176LedPins() {
|
||||
#ifdef EFI_COMMUNICATION_PIN
|
||||
engineConfiguration->communicationLedPin = EFI_COMMUNICATION_PIN;
|
||||
#else
|
||||
engineConfiguration->communicationLedPin = Gpio::H10;
|
||||
#endif /* EFI_COMMUNICATION_PIN */
|
||||
engineConfiguration->runningLedPin = Gpio::H9; // green
|
||||
engineConfiguration->warningLedPin = Gpio::H11; // yellow
|
||||
}
|
||||
|
||||
void setHellenMegaEnPin() {
|
||||
static bool initialized = false;
|
||||
static OutputPin megaEn;
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
Gpio getCommunicationLedPin() {
|
||||
return H144_LED3; // blue
|
||||
}
|
||||
|
||||
Gpio getRunningLedPin() {
|
||||
return H144_LED2; // green
|
||||
}
|
||||
|
||||
Gpio getWarningLedPin() {
|
||||
return H144_LED4; // yellow
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
Gpio getCommunicationLedPin() {
|
||||
return Gpio::H10; // blue
|
||||
}
|
||||
|
||||
Gpio getRunningLedPin() {
|
||||
return Gpio::H9; // green
|
||||
}
|
||||
|
||||
Gpio getWarningLedPin() {
|
||||
return Gpio::H11; // yellow
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
Gpio getCommunicationLedPin() {
|
||||
return H64_BLUE_LED; // blue
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
|
||||
DDEFS += -DFIRMWARE_ID=\"small-can-board\"
|
||||
DDEFS += -DSHORT_BOARD_NAME=small-can
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd ..
|
||||
bash ../common_make.sh hellen/small-can-board ARCH_STM32F4
|
|
@ -0,0 +1,18 @@
|
|||
//DO NOT EDIT MANUALLY, let automation work hard.
|
||||
|
||||
// auto-generated by PinoutLogic.java based on config/boards/hellen/small-can-board/connectors/small.yaml
|
||||
#include "pch.h"
|
||||
|
||||
// see comments at declaration in pin_repository.h
|
||||
const char * getBoardSpecificPinName(brain_pin_e brainPin) {
|
||||
switch(brainPin) {
|
||||
case Gpio::C8: return "C1 - Low Side";
|
||||
case Gpio::E12: return "C3 - Digital Input 2";
|
||||
case Gpio::E14: return "C2 - Digital Input 1";
|
||||
case Gpio::F11: return "C4 - Digital Input 3";
|
||||
case Gpio::G7: return "A8 - Low Side";
|
||||
case Gpio::G8: return "B8 - Low Side";
|
||||
default: return nullptr;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
#define MAIN_HELP_URL "https://rusefi.com/"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define ts_show_egt false
|
||||
|
||||
#define ts_show_etb_pins false
|
||||
#define ts_show_analog_divider false
|
||||
|
|
@ -23,8 +23,6 @@
|
|||
|
||||
void hellenWbo();
|
||||
|
||||
void setHellen144LedPins();
|
||||
void setHellen176LedPins();
|
||||
void setHellenMegaEnPin();
|
||||
void hellenBoardStandBy();
|
||||
void configureHellenMegaAccCS2Pin();
|
||||
|
|
|
@ -48,11 +48,6 @@ void setBoardOverrides() {
|
|||
engineConfiguration->clt.config.resistance_2 = 5.0f;
|
||||
engineConfiguration->clt.config.tempC_2 = 120.0f,
|
||||
engineConfiguration->clt.config.bias_resistor = 3300;
|
||||
|
||||
//engineConfiguration->canNbcType = CAN_BUS_NBC_BMW;
|
||||
engineConfiguration->canNbcType = CAN_BUS_MAZDA_RX8;
|
||||
engineConfiguration->canReadEnabled = true;
|
||||
engineConfiguration->canWriteEnabled = false;
|
||||
|
||||
engineConfiguration->tpsMin = convertVoltageTo10bitADC(0.250);
|
||||
engineConfiguration->tpsMax = convertVoltageTo10bitADC(4.538);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -115,8 +115,9 @@
|
|||
#define CAN_ECU_HW_META 0xAB1234
|
||||
#define CAN_ECU_SERIAL_RX_ID 0x100
|
||||
#define CAN_ECU_SERIAL_TX_ID 0x102
|
||||
#define can_nbc_e_auto_enum 0="CAN_BUS_NBC_NONE",12="CAN_AIM_DASH",6="CAN_BUS_BMW_E90",10="CAN_BUS_GENESIS_COUPE",11="CAN_BUS_HONDA_K",7="CAN_BUS_Haltech",3="CAN_BUS_MAZDA_RX8",8="CAN_BUS_MQB",13="CAN_BUS_MS_SIMPLE_BROADCAST",4="CAN_BUS_NBC_BMW",1="CAN_BUS_NBC_FIAT",2="CAN_BUS_NBC_VAG",9="CAN_BUS_NISSAN_VQ",5="CAN_BUS_W202_C180"
|
||||
#define can_nbc_e_auto_enum 0="CAN_BUS_NBC_NONE",12="CAN_AIM_DASH",4="CAN_BUS_BMW_E46",6="CAN_BUS_BMW_E90",10="CAN_BUS_GENESIS_COUPE",11="CAN_BUS_HONDA_K",7="CAN_BUS_Haltech",3="CAN_BUS_MAZDA_RX8",8="CAN_BUS_MQB",13="CAN_BUS_MS_SIMPLE_BROADCAST",1="CAN_BUS_NBC_FIAT",2="CAN_BUS_NBC_VAG",9="CAN_BUS_NISSAN_VQ",5="CAN_BUS_W202_C180"
|
||||
#define can_nbc_e_CAN_AIM_DASH 12
|
||||
#define can_nbc_e_CAN_BUS_BMW_E46 4
|
||||
#define can_nbc_e_CAN_BUS_BMW_E90 6
|
||||
#define can_nbc_e_CAN_BUS_GENESIS_COUPE 10
|
||||
#define can_nbc_e_CAN_BUS_Haltech 7
|
||||
|
@ -124,7 +125,6 @@
|
|||
#define can_nbc_e_CAN_BUS_MAZDA_RX8 3
|
||||
#define can_nbc_e_CAN_BUS_MQB 8
|
||||
#define can_nbc_e_CAN_BUS_MS_SIMPLE_BROADCAST 13
|
||||
#define can_nbc_e_CAN_BUS_NBC_BMW 4
|
||||
#define can_nbc_e_CAN_BUS_NBC_FIAT 1
|
||||
#define can_nbc_e_CAN_BUS_NBC_NONE 0
|
||||
#define can_nbc_e_CAN_BUS_NBC_VAG 2
|
||||
|
@ -272,7 +272,7 @@
|
|||
#define ego_sensor_e_ES_NarrowBand 3
|
||||
#define ego_sensor_e_ES_PLX 4
|
||||
#define EGT_CHANNEL_COUNT 8
|
||||
#define engine_configuration_s_size 3972
|
||||
#define engine_configuration_s_size 3964
|
||||
#define engine_load_mode_e_auto_enum 0="LM_SPEED_DENSITY",2="LM_ALPHA_N",3="LM_LUA",100="LM_MOCK",1="LM_REAL_MAF"
|
||||
#define engine_load_mode_e_enum "Speed Density", "MAF Air Charge", "Alpha-N", "Lua"
|
||||
#define engine_load_mode_e_LM_ALPHA_N 2
|
||||
|
@ -990,7 +990,7 @@
|
|||
#define PACK_PERCENT_BYTE_MULT 100.0
|
||||
#define PEDAL_TO_TPS_SIZE 8
|
||||
#define PERCENT_TRIM_BYTE_PACKING_DIV 0.02
|
||||
#define persistent_config_s_size 23176
|
||||
#define persistent_config_s_size 23168
|
||||
#define pid_s_size 20
|
||||
#define PidAutoTune_AutoTunerState_AUTOTUNER_OFF 0
|
||||
#define PidAutoTune_AutoTunerState_CONVERGED 16
|
||||
|
@ -1079,7 +1079,7 @@
|
|||
#define SentEtbType_NONE 0
|
||||
#define show_Frankenso_presets true
|
||||
#define show_test_presets true
|
||||
#define SIGNATURE_HASH 1171008479
|
||||
#define SIGNATURE_HASH 1052895860
|
||||
#define spi_device_e_auto_enum 0="SPI_NONE",1="SPI_DEVICE_1",2="SPI_DEVICE_2",3="SPI_DEVICE_3",4="SPI_DEVICE_4"
|
||||
#define spi_device_e_SPI_DEVICE_1 1
|
||||
#define spi_device_e_SPI_DEVICE_2 2
|
||||
|
@ -1124,7 +1124,7 @@
|
|||
#define TOOTH_PACKET_SIZE 2
|
||||
#define TOP_DEAD_CENTER_MESSAGE "r"
|
||||
#define TORQUE_CURVE_SIZE 6
|
||||
#define TOTAL_CONFIG_SIZE 23176
|
||||
#define TOTAL_CONFIG_SIZE 23168
|
||||
#define TPS_2_BYTE_PACKING_MULT 100
|
||||
#define TPS_TPS_ACCEL_CLT_CORR_TABLE 4
|
||||
#define TPS_TPS_ACCEL_TABLE 8
|
||||
|
@ -1349,7 +1349,6 @@
|
|||
#define ts_show_etb true
|
||||
#define ts_show_etb_pins true
|
||||
#define ts_show_full_pinout true
|
||||
#define ts_show_gps true
|
||||
#define ts_show_hardware_simulator true
|
||||
#define ts_show_hip9011 false
|
||||
#define ts_show_ignitionPinMode true
|
||||
|
@ -1369,7 +1368,7 @@
|
|||
#define ts_show_vbatt true
|
||||
#define ts_show_vr_threshold_2 true
|
||||
#define ts_show_vr_threshold_all true
|
||||
#define TS_SIGNATURE "rusEFI master.2023.06.02.kin.1171008479"
|
||||
#define TS_SIGNATURE "rusEFI master.2023.06.06.kin.1052895860"
|
||||
#define TS_SINGLE_WRITE_COMMAND 'W'
|
||||
#define TS_SINGLE_WRITE_COMMAND_char W
|
||||
#define TS_TEST_COMMAND 't'
|
||||
|
|
|
@ -3,15 +3,13 @@
|
|||
#include "smart_gpio.h"
|
||||
#include "drivers/gpio/l9779.h"
|
||||
|
||||
void setBoardConfigOverrides() {
|
||||
// PB14 is error LED, configured in board.mk
|
||||
// blue, LD2
|
||||
engineConfiguration->communicationLedPin = Gpio::B7;
|
||||
// green, LD1
|
||||
engineConfiguration->runningLedPin = Gpio::B0;
|
||||
// PB14 is error LED, configured in board.mk
|
||||
Gpio getCommsLedPin() {
|
||||
return Gpio::B7;
|
||||
}
|
||||
|
||||
// Board only has 3 LEDs
|
||||
engineConfiguration->warningLedPin = Gpio::Unassigned;
|
||||
Gpio getRunningLedPin() {
|
||||
return Gpio::B0;
|
||||
}
|
||||
|
||||
void preHalInit() {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#define ts_show_lcd false
|
||||
#define ts_show_joystick false
|
||||
#define ts_show_egt false
|
||||
#define ts_show_gps false
|
||||
|
||||
#define ts_show_etb_pins false
|
||||
#define ts_show_analog_divider false
|
||||
#define ts_show_spi true
|
||||
|
|
|
@ -39,14 +39,18 @@ static void setIgnitionPins() {
|
|||
engineConfiguration->ignitionPinMode = OM_DEFAULT;
|
||||
}
|
||||
|
||||
static void setLedPins() {
|
||||
#ifdef EFI_COMMUNICATION_PIN
|
||||
engineConfiguration->communicationLedPin = EFI_COMMUNICATION_PIN;
|
||||
#else
|
||||
engineConfiguration->communicationLedPin = Gpio::E2; // d23 = blue
|
||||
#endif /* EFI_COMMUNICATION_PIN */
|
||||
engineConfiguration->runningLedPin = Gpio::E4; // d22 = green
|
||||
engineConfiguration->warningLedPin = Gpio::E1; // d27 = orange or yellow
|
||||
Gpio getCommsLedPin() {
|
||||
return Gpio::E2; // d23 = blue
|
||||
}
|
||||
|
||||
Gpio getRunningLedPin() {
|
||||
// D22 = green
|
||||
return Gpio::E4;
|
||||
}
|
||||
|
||||
Gpio getWarningLedPin() {
|
||||
// D27 = orange or yellow
|
||||
return Gpio::E1;
|
||||
}
|
||||
|
||||
static void setupVbatt() {
|
||||
|
@ -137,7 +141,6 @@ static void setupDefaultSensorInputs() {
|
|||
}
|
||||
|
||||
void setBoardConfigOverrides() {
|
||||
setLedPins();
|
||||
setupVbatt();
|
||||
setupTle8888();
|
||||
setupEtb();
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
! https://rusefi.com/forum/viewtopic.php?p=43270#p43270
|
||||
#define ts_show_egt true
|
||||
|
||||
#define ts_show_gps false
|
||||
|
||||
#define ts_show_etb_pins false
|
||||
#define ts_show_analog_divider false
|
||||
#define ts_show_spi true
|
||||
|
|
|
@ -67,10 +67,10 @@
|
|||
#define MRE_IN_ANALOG_VOLT_10 EFI_ADC_4
|
||||
|
||||
// 33
|
||||
#define MRE_GPOUT_3 Gpio::TLE8888_PIN_22
|
||||
#define MRE_GPOUT_3 Gpio::TLE8888_PIN_23
|
||||
|
||||
// 34
|
||||
#define MRE_GPOUT_2 Gpio::TLE8888_PIN_21
|
||||
#define MRE_GPOUT_2 Gpio::TLE8888_PIN_22
|
||||
|
||||
// 35
|
||||
#define MRE_GPOUT_1 Gpio::TLE8888_PIN_21
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
#include "pch.h"
|
||||
|
||||
void setBoardConfigOverrides() {
|
||||
// PB14 is error LED, configured in board.mk
|
||||
engineConfiguration->communicationLedPin = Gpio::B7;
|
||||
engineConfiguration->runningLedPin = Gpio::B0;
|
||||
// PB14 is error LED, configured in board.mk
|
||||
// Board only has 3 LEDs, so no warning LED
|
||||
|
||||
// Board only has 3 LEDs
|
||||
engineConfiguration->warningLedPin = Gpio::Unassigned;
|
||||
Gpio getCommsLedPin() {
|
||||
return Gpio::B7;
|
||||
}
|
||||
|
||||
Gpio getRunningLedPin() {
|
||||
return Gpio::B0;
|
||||
}
|
||||
|
||||
void preHalInit() {
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
#include "pch.h"
|
||||
|
||||
void setBoardConfigOverrides() {
|
||||
// PB14 is error LED, configured in board.mk
|
||||
engineConfiguration->communicationLedPin = Gpio::E1;
|
||||
engineConfiguration->runningLedPin = Gpio::B0;
|
||||
// PB14 is error LED, configured in board.mk
|
||||
// Board only has 3 LEDs, so no warning LED
|
||||
Gpio getCommsLedPin() {
|
||||
return Gpio::E1;
|
||||
}
|
||||
|
||||
// Board only has 3 LEDs
|
||||
engineConfiguration->warningLedPin = Gpio::Unassigned;
|
||||
Gpio getRunningLedPin() {
|
||||
return Gpio::B0;
|
||||
}
|
||||
|
||||
void preHalInit() {
|
||||
|
|
|
@ -142,10 +142,6 @@ void setBoardDefaultConfiguration() {
|
|||
engineConfiguration->stepperEnablePin = Gpio::Unassigned;
|
||||
engineConfiguration->stepperEnablePinMode = OM_DEFAULT;
|
||||
|
||||
engineConfiguration->communicationLedPin = Gpio::Unassigned;// Gpio::A13; // yellow LED
|
||||
engineConfiguration->runningLedPin = Gpio::A13; //Gpio::A13; // yellow LED
|
||||
engineConfiguration->warningLedPin = Gpio::Unassigned;
|
||||
|
||||
engineConfiguration->triggerInputPins[0] = Gpio::A5;
|
||||
engineConfiguration->triggerInputPins[1] = Gpio::Unassigned;
|
||||
engineConfiguration->camInputs[0] = is469 ? Gpio::E9 : Gpio::A6;
|
||||
|
@ -206,3 +202,7 @@ void setBoardDefaultConfiguration() {
|
|||
engineConfiguration->isSdCardEnabled = true;
|
||||
}
|
||||
|
||||
|
||||
Gpio getRunningLedPin() {
|
||||
return Gpio::A13; //Gpio::A13; // yellow LED
|
||||
}
|
||||
|
|
|
@ -70,8 +70,6 @@
|
|||
|
||||
#undef LED_CRITICAL_ERROR_BRAIN_PIN
|
||||
#define LED_CRITICAL_ERROR_BRAIN_PIN Gpio::A13
|
||||
#undef LED_ERROR_BRAIN_PIN_MODE
|
||||
#define LED_ERROR_BRAIN_PIN_MODE DEFAULT_OUTPUT
|
||||
|
||||
#undef CONSOLE_MODE_SWITCH_PORT
|
||||
#undef CONFIG_RESET_SWITCH_PORT
|
||||
|
|
|
@ -49,11 +49,17 @@ static void setIgnitionPins() {
|
|||
engineConfiguration->ignitionPinMode = OM_DEFAULT;
|
||||
}
|
||||
|
||||
static void setLedPins() {
|
||||
// PE3 is error LED, configured in board.mk
|
||||
engineConfiguration->communicationLedPin = Gpio::E4;
|
||||
engineConfiguration->runningLedPin = Gpio::E5;
|
||||
engineConfiguration->warningLedPin = Gpio::E6;
|
||||
// PE3 is error LED, configured in board.mk
|
||||
Gpio getCommsLedPin() {
|
||||
return Gpio::E4;
|
||||
}
|
||||
|
||||
Gpio getRunningLedPin() {
|
||||
return Gpio::E5;
|
||||
}
|
||||
|
||||
Gpio getWarningLedPin() {
|
||||
return Gpio::E6;
|
||||
}
|
||||
|
||||
static void setupVbatt() {
|
||||
|
@ -136,7 +142,6 @@ static void setupSdCard() {
|
|||
|
||||
void setBoardConfigOverrides() {
|
||||
setupSdCard();
|
||||
setLedPins();
|
||||
setupVbatt();
|
||||
|
||||
engineConfiguration->clt.config.bias_resistor = PROTEUS_DEFAULT_AT_PULLUP;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#define ts_show_full_pinout false
|
||||
#define ts_show_egt false
|
||||
#define ts_show_gps false
|
||||
|
||||
#define ts_show_analog_divider false
|
||||
#define ts_show_spi false
|
||||
#define ts_show_sd_card true
|
||||
|
|
|
@ -34,10 +34,7 @@ void setBoardDefaultConfiguration() {
|
|||
strcpy(engineConfiguration->engineMake, "UAZ");
|
||||
strcpy(engineConfiguration->engineCode, "451");
|
||||
|
||||
// No LEDs on this board so let's toggle. PC14 of LSI did not work for blinking, any better alternatives?
|
||||
engineConfiguration->communicationLedPin = Gpio::Unassigned;
|
||||
engineConfiguration->runningLedPin = Gpio::Unassigned;
|
||||
engineConfiguration->warningLedPin = Gpio::Unassigned;
|
||||
// No LEDs on this board, do we need some unused pin tp toggle? PC14 of LSI did not work for blinking, any better alternatives?
|
||||
|
||||
engineConfiguration->malfunctionIndicatorPin = Gpio::E14;
|
||||
engineConfiguration->malfunctionIndicatorPinMode = OM_OPENDRAIN;
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#define ts_show_lcd false
|
||||
#define ts_show_joystick false
|
||||
#define ts_show_egt false
|
||||
#define ts_show_gps false
|
||||
#define ts_show_etb_pins false
|
||||
#define ts_show_analog_divider false
|
||||
#define ts_show_spi true
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
# Combine the related files for a specific platform and MCU.
|
||||
|
||||
# Target ECU board design
|
||||
BOARDCPPSRC = $(BOARD_DIR)/board_configuration.cpp
|
||||
|
||||
BOARDINC = $(BOARD_DIR)
|
||||
|
||||
DDEFS += -DDEFAULT_ENGINE_TYPE=DEFAULT_FRANKENSO
|
||||
# Add them all together
|
||||
DDEFS += -DLED_CRITICAL_ERROR_BRAIN_PIN=Gpio::E3 -DFIRMWARE_ID=\"skeleton\"
|
|
@ -1,202 +0,0 @@
|
|||
/**
|
||||
* @file boards/skeleton/board_configuration.cpp
|
||||
*
|
||||
*
|
||||
* @brief Example configuration defaults for a rusEFI board
|
||||
*
|
||||
* @author Donald Becker November 2019
|
||||
* @author Hugo Becker November 2019
|
||||
*
|
||||
* This file is an example of board-specific firmware for rusEFI.
|
||||
* It contains the unique code need for the setup of a specific board.
|
||||
*
|
||||
* This file must contain the configuration for the hard-wired aspects
|
||||
* of the board, for instance the pins used for a specific MCU functional
|
||||
* unit such as SPI.
|
||||
*
|
||||
* It may also contain preferences for the assignment of external connector
|
||||
* such as which analog input is used to measure coolant temperature, or
|
||||
* of if an analog input is connected to a throttle pedal.
|
||||
*
|
||||
* These initialization functions are called from
|
||||
* firmware/controllers/algo/engine_configuration.cpp
|
||||
* void setBoardDefaultConfiguration();
|
||||
* void setPinConfigurationOverrides();
|
||||
*
|
||||
* Future: Clean up the distinction between these functions.
|
||||
*/
|
||||
|
||||
#include "pch.h"
|
||||
|
||||
// An example of how to configure complex features on the board.
|
||||
// Generally these should be local (static) functions, one function per chip.
|
||||
|
||||
// This shows a SPI connected TLE8888.
|
||||
static void setupTle8888() {
|
||||
// Enable the SPI channel and set up the SPI pins
|
||||
engineConfiguration->is_enabled_spi_3 = true;
|
||||
engineConfiguration->spi3mosiPin = Gpio::B5;
|
||||
engineConfiguration->spi3misoPin = Gpio::B4;
|
||||
engineConfiguration->spi3sckPin = Gpio::B3;
|
||||
|
||||
// SPI chip select is often independent of the SPI pin limitations
|
||||
engineConfiguration->tle8888_cs = Gpio::D5;
|
||||
|
||||
// Set SPI device
|
||||
engineConfiguration->tle8888spiDevice = SPI_DEVICE_3;
|
||||
}
|
||||
|
||||
// A configuration for a Electronic Throttle Body (ETB) driver.
|
||||
// This example uses the TLE9201 H-Bridge.
|
||||
// The TLE9201 has three control pins:
|
||||
// DIR - sets direction of the motor
|
||||
// PWM - control (enable high, coast low), PWM capable
|
||||
// DIS - disables motor (enable low)
|
||||
// Future: An example showing how to probe for an optionally connected
|
||||
// diagnostic interface on SPI
|
||||
static void setupTle9201Etb() {
|
||||
// This chip has PWM/DIR, not dira/dirb
|
||||
engineConfiguration->etb_use_two_wires = false;
|
||||
// PWM and DIR pins
|
||||
engineConfiguration->etbIo[0].controlPin = Gpio::C7;
|
||||
engineConfiguration->etbIo[0].directionPin1 = Gpio::A8;
|
||||
engineConfiguration->etbIo[0].directionPin2 = Gpio::Unassigned;
|
||||
}
|
||||
|
||||
// Configure key sensors inputs.
|
||||
//
|
||||
// ToDo: Review count assumption with initialization of unused triggers/cams
|
||||
// ToDo: Resolve angst over default input assignments.
|
||||
static void setupDefaultSensorInputs() {
|
||||
// Engine rotation position sensors
|
||||
// Trigger is our primary timing signal, and usually comes from the crank.
|
||||
// trigger inputs up TRIGGER_SUPPORTED_CHANNELS (2)
|
||||
engineConfiguration->triggerInputPins[0] = Gpio::C6;
|
||||
engineConfiguration->triggerInputPins[1] = Gpio::Unassigned;
|
||||
// A secondary Cam signal up to CAM_INPUTS_COUNT (4)
|
||||
engineConfiguration->camInputs[0] = Gpio::A5;
|
||||
|
||||
// Throttle Body Position Sensors, second channel is a check/fail-safe
|
||||
// tps = "20 - AN volt 5"
|
||||
engineConfiguration->tps1_1AdcChannel = EFI_ADC_13;
|
||||
|
||||
// Throttle pedal inputs
|
||||
// Idle/Up/Closed (no pressure on pedal) pin
|
||||
engineConfiguration->throttlePedalUpPin = Gpio::Unassigned;
|
||||
// If the ETB has analog feedback we can use it for closed loop control.
|
||||
engineConfiguration->throttlePedalPositionAdcChannel = EFI_ADC_2;
|
||||
|
||||
// Manifold Air Pressure sensor input
|
||||
// EFI_ADC_10: "27 - AN volt 1"
|
||||
engineConfiguration->map.sensor.hwChannel = EFI_ADC_10;
|
||||
|
||||
// Air Fuel Ratio (exhaust gas oxygen) sensor input
|
||||
// EFI_ADC_14: "32 - AN volt 6"
|
||||
engineConfiguration->afr.hwChannel = EFI_ADC_14;
|
||||
|
||||
// Coolant Temp
|
||||
// clt = "18 - AN temp 1"
|
||||
engineConfiguration->clt.adcChannel = EFI_ADC_0;
|
||||
engineConfiguration->clt.config.bias_resistor = 2700;
|
||||
|
||||
// Intake Air Temperature, IAT
|
||||
// iat = "23 - AN temp 2"
|
||||
engineConfiguration->iat.adcChannel = EFI_ADC_1;
|
||||
engineConfiguration->iat.config.bias_resistor = 2700;
|
||||
}
|
||||
|
||||
// Future: configure USART3 for LIN bus and UART4 for console
|
||||
/**
|
||||
* @brief Board-specific configuration overrides.
|
||||
*
|
||||
* See also setDefaultEngineConfiguration
|
||||
*
|
||||
* @todo Add any board-specific code
|
||||
*/
|
||||
void setBoardDefaultConfiguration() {
|
||||
|
||||
// Set indicator LED pins.
|
||||
// This is often redundant with efifeatures.h or the run-time config
|
||||
engineConfiguration->triggerErrorPin = Gpio::E1;
|
||||
engineConfiguration->communicationLedPin = Gpio::E2;
|
||||
engineConfiguration->runningLedPin = Gpio::E4;
|
||||
engineConfiguration->warningLedPin = Gpio::E5;
|
||||
engineConfiguration->errorLedPin = Gpio::E7;
|
||||
|
||||
// Set injector pins and the pin output mode
|
||||
engineConfiguration->injectionPinMode = OM_DEFAULT;
|
||||
engineConfiguration->injectionPins[0] = Gpio::E14;
|
||||
engineConfiguration->injectionPins[1] = Gpio::E13;
|
||||
engineConfiguration->injectionPins[2] = Gpio::E12;
|
||||
engineConfiguration->injectionPins[3] = Gpio::E11;
|
||||
// Disable the remainder only when they may never be assigned
|
||||
for (int i = 4; i < MAX_CYLINDER_COUNT;i++) {
|
||||
engineConfiguration->injectionPins[i] = Gpio::Unassigned;
|
||||
}
|
||||
|
||||
// Do the same for ignition outputs
|
||||
engineConfiguration->ignitionPinMode = OM_DEFAULT;
|
||||
engineConfiguration->ignitionPins[0] = Gpio::D4;
|
||||
engineConfiguration->ignitionPins[1] = Gpio::D3;
|
||||
engineConfiguration->ignitionPins[2] = Gpio::D2;
|
||||
engineConfiguration->ignitionPins[3] = Gpio::D1;
|
||||
|
||||
// Board-specific scaling values to convert ADC fraction to Volts.
|
||||
// It is good practice to make the math explicit, but still simple.
|
||||
// The results should be compile time constants
|
||||
|
||||
// The ADC reference voltage
|
||||
engineConfiguration->adcVcc = 3.30f;
|
||||
|
||||
// This is a board with 6.8 Kohm and 10 Kohm resistor dividers
|
||||
engineConfiguration->analogInputDividerCoefficient = (10.0+6.8) / 10.0f;
|
||||
|
||||
// Vbatt is the voltage of the 12V battery.
|
||||
// Here the hardware has a 39 Kohm high side/10 Kohm low side divider,
|
||||
// with the second divider also applied.
|
||||
engineConfiguration->vbattDividerCoeff =
|
||||
(49.0f / 10.0f) * engineConfiguration->analogInputDividerCoefficient;
|
||||
engineConfiguration->vbattAdcChannel = EFI_ADC_11;
|
||||
|
||||
// Configure any special on-board chips
|
||||
setupTle8888();
|
||||
setupEtb();
|
||||
|
||||
// The MRE uses the TLE8888 fixed-function main relay control pin.
|
||||
// This firmware is not involved with main relay control, although
|
||||
// the pin inputs can be over-ridden through the TLE8888 Cmd0 register.
|
||||
// ToDo: consider EFI_MAIN_RELAY_CONTROL to FALSE for MRE configuration
|
||||
|
||||
// Configure the TLE8888 half bridges (pushpull, lowside, or high-low)
|
||||
// TLE8888_IN11 -> TLE8888_OUT21
|
||||
// Gpio::TLE8888_PIN_21: "35 - GP Out 1"
|
||||
engineConfiguration->fuelPumpPin = Gpio::TLE8888_PIN_21;
|
||||
|
||||
|
||||
// TLE8888 high current low side: VVT2 IN9 / OUT5
|
||||
// Gpio::TLE8888_PIN_4: "3 - Lowside 2"
|
||||
engineConfiguration->idle.solenoidPin = Gpio::TLE8888_PIN_5;
|
||||
|
||||
|
||||
// Gpio::TLE8888_PIN_22: "34 - GP Out 2"
|
||||
engineConfiguration->fanPin = Gpio::TLE8888_PIN_22;
|
||||
|
||||
// The "required" hardware is done - set some reasonable input defaults
|
||||
setupDefaultSensorInputs();
|
||||
|
||||
engineConfiguration->cylindersCount = 4;
|
||||
engineConfiguration->firingOrder = FO_1_3_4_2;
|
||||
|
||||
// Ign is IM_ONE_COIL, IM_TWO_COILS, IM_INDIVIDUAL_COILS, IM_WASTED_SPARK
|
||||
engineConfiguration->ignitionMode = IM_INDIVIDUAL_COILS;
|
||||
// Inj mode: IM_SIMULTANEOUS, IM_SEQUENTIAL, IM_BATCH, IM_SINGLE_POINT
|
||||
engineConfiguration->crankingInjectionMode = IM_SIMULTANEOUS;
|
||||
engineConfiguration->injectionMode = IM_SIMULTANEOUS;
|
||||
}
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* c-basic-indent: 4
|
||||
* tab-width: 4
|
||||
* End:
|
||||
*/
|
|
@ -1,273 +0,0 @@
|
|||
#
|
||||
# microRusEfi board
|
||||
# https://github.com/rusefi/rusefi/wiki/Hardware_microRusEfi_wiring
|
||||
#
|
||||
|
||||
pins:
|
||||
- pin: 1
|
||||
id: EFI_ADC_11
|
||||
class: analog_inputs
|
||||
color: white right
|
||||
function: 12V Supply from main relay output, see also pin #29
|
||||
ts_name: Battery Sense
|
||||
type: 12V
|
||||
|
||||
# default Idle Air Control TLE8888 high current low side: VVT2 TLE8888_OUT5
|
||||
- pin: 3
|
||||
id: TLE8888_PIN_5
|
||||
class: outputs
|
||||
color: white
|
||||
function: Idle solenoid
|
||||
ts_name: 3 - Lowside 2
|
||||
type: ls
|
||||
|
||||
# default VVT TLE8888 high current low side: VVT1 TLE8888_OUT6
|
||||
- pin: 7
|
||||
id: TLE8888_PIN_6
|
||||
class: outputs
|
||||
color: black
|
||||
function: VVT
|
||||
ts_name: 7 - Lowside 1
|
||||
type: ls
|
||||
|
||||
# TC4427 ignition outputs (5v)
|
||||
- pin: 9
|
||||
id: D4
|
||||
class: outputs
|
||||
color: dark blue
|
||||
function: Ignition 1
|
||||
ts_name: 9 - Ignition 1
|
||||
type: ign
|
||||
|
||||
- pin: 10
|
||||
id: D3
|
||||
class: outputs
|
||||
color: dark blue
|
||||
function: Ignition 2
|
||||
ts_name: 10 - Ignition 2
|
||||
type: ign
|
||||
|
||||
- pin: 11
|
||||
id: D2
|
||||
class: outputs
|
||||
color: dark blue
|
||||
function: Ignition 3
|
||||
ts_name: 11 - Ignition 3
|
||||
type: ign
|
||||
|
||||
- pin: 12
|
||||
id: D1
|
||||
class: outputs
|
||||
color: dark blue
|
||||
function: Ignition 4
|
||||
ts_name: 12 - Ignition 4
|
||||
type: ign
|
||||
|
||||
- pin: 13
|
||||
id: D6
|
||||
class: outputs
|
||||
color: yellow
|
||||
function: Alternator (see JP2 jumper note)
|
||||
ts_name: 13 - GP Out 6
|
||||
type: gp_high
|
||||
|
||||
# TC4427 general purpose output (selectable 5v/12v)
|
||||
- pin: 14
|
||||
id: D7
|
||||
class: outputs
|
||||
color: yellow
|
||||
function: (see JP2 jumper note)
|
||||
ts_name: 14 - GP Out 5
|
||||
type: gp_high
|
||||
|
||||
- pin: 18
|
||||
id: [A0, EFI_ADC_0]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
color: red
|
||||
function: CLT sensor
|
||||
ts_name: 18 - AN temp 1
|
||||
type: at
|
||||
|
||||
- pin: 19
|
||||
id: [C2, EFI_ADC_12]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
color: red
|
||||
function: Starting from version 0.5.0 this pin can be used as 5V input for USB connection through main connector (No need to open case to access micro-USB connector)
|
||||
ts_name: 19 - AN volt 4
|
||||
type: av
|
||||
|
||||
- pin: 20
|
||||
id: [C3, EFI_ADC_13]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
color: red left
|
||||
function: Throttle position sensor (TPS)
|
||||
ts_name: 20 - AN volt 5
|
||||
type: av
|
||||
|
||||
- pin: 22
|
||||
id: [A3, EFI_ADC_3]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
color: dark green
|
||||
ts_name: 22 - AN temp 4
|
||||
type: at
|
||||
|
||||
- pin: 23
|
||||
id: [A1, EFI_ADC_1]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
color: dark green
|
||||
function: IAT sensor
|
||||
ts_name: 23 - AN temp 2
|
||||
type: at
|
||||
|
||||
- pin: 24
|
||||
id: [A2, EFI_ADC_2]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
color: dark green
|
||||
ts_name: 24 - AN temp 3
|
||||
type: at
|
||||
|
||||
# RC filter input for hall
|
||||
- pin: 25
|
||||
id: [A5, A5]
|
||||
class: [event_inputs, switch_inputs]
|
||||
color: light blue right
|
||||
ts_name: 25 - Hall Cam
|
||||
type: hall
|
||||
|
||||
- pin: 26
|
||||
id: [A6, EFI_ADC_6]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
color: light blue
|
||||
ts_name: 26 - AN volt 2
|
||||
type: av
|
||||
|
||||
- pin: 27
|
||||
id: [C0, EFI_ADC_10]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
color: light blue
|
||||
function: MAP sensor
|
||||
ts_name: 27 - AN volt 1
|
||||
type: av
|
||||
|
||||
- pin: 28
|
||||
id: [A4, EFI_ADC_4]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
color: light blue left
|
||||
ts_name: 28 - AN volt 10
|
||||
type: av
|
||||
|
||||
- pin: 30
|
||||
id: [C5, EFI_ADC_15]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
color: pink
|
||||
ts_name: 30 - AN volt 7
|
||||
type: av
|
||||
|
||||
- pin: 31
|
||||
id: [A7, EFI_ADC_7]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
color: pink
|
||||
function: Throttle Pedal Position Sensor (PPS)
|
||||
ts_name: 31 - AN volt 3
|
||||
type: av
|
||||
|
||||
- pin: 32
|
||||
id: [C4, EFI_ADC_14]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
color: pink
|
||||
function: External wideband O2 sensor
|
||||
ts_name: 32 - AN volt 6
|
||||
type: av
|
||||
|
||||
# TLE8888 half bridges (pushpull, lowside, or high-low) TLE8888_OUT23
|
||||
- pin: 33
|
||||
id: TLE8888_PIN_23
|
||||
class: outputs
|
||||
color: orange right
|
||||
function: (IDLE stepper coil 2+)
|
||||
ts_name: 33 - GP Out 3
|
||||
type: [gp_low, gp_pp]
|
||||
|
||||
# TLE8888 half bridges (pushpull, lowside, or high-low) TLE8888_OUT22#89
|
||||
- pin: 34
|
||||
id: TLE8888_PIN_22
|
||||
class: outputs
|
||||
color: orange
|
||||
function: Fan relay (IDLE stepper coil 1-)
|
||||
ts_name: 34 - GP Out 2
|
||||
type: [gp_low, gp_pp]
|
||||
|
||||
# TLE8888 half bridges (pushpull, lowside, or high-low) TLE8888_OUT21#91
|
||||
- pin: 35
|
||||
id: TLE8888_PIN_21
|
||||
class: outputs
|
||||
color: orange
|
||||
function: Fuel pump relay (IDLE stepper coil 1+)
|
||||
ts_name: 35 - GP Out 1
|
||||
type: [gp_low, gp_pp]
|
||||
|
||||
- pin: 36
|
||||
id: [B0, EFI_ADC_8]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
color: orange left
|
||||
ts_name: 36 - AN volt 8
|
||||
type: av
|
||||
|
||||
- pin: 37
|
||||
id: TLE8888_PIN_1
|
||||
class: outputs
|
||||
color: grey right
|
||||
function: Injector 1
|
||||
ts_name: 37 - Injector 1
|
||||
type: inj
|
||||
|
||||
- pin: 38
|
||||
id: TLE8888_PIN_2
|
||||
class: outputs
|
||||
color: grey
|
||||
function: Injector 2
|
||||
ts_name: 38 - Injector 2
|
||||
type: inj
|
||||
|
||||
- pin: 40
|
||||
id: [B1, EFI_ADC_9]
|
||||
class: [switch_inputs, analog_inputs]
|
||||
color: grey
|
||||
ts_name: 40 - AN volt 9
|
||||
type: av
|
||||
|
||||
- pin: 41
|
||||
id: TLE8888_PIN_3
|
||||
class: outputs
|
||||
color: brown right
|
||||
function: Injector 3
|
||||
ts_name: 41 - Injector 3
|
||||
type: inj
|
||||
|
||||
- pin: 42
|
||||
id: TLE8888_PIN_4
|
||||
class: outputs
|
||||
color: brown
|
||||
function: Injector 4
|
||||
ts_name: 42 - Injector 4
|
||||
type: inj
|
||||
|
||||
# TLE8888 half bridges (pushpull, lowside, or high-low) TLE8888_OUT24
|
||||
- pin: 43
|
||||
id: TLE8888_PIN_24
|
||||
class: outputs
|
||||
color: brown
|
||||
function: (IDLE stepper coil 2+)
|
||||
ts_name: 43 - GP Out 4
|
||||
type: [gp_low, gp_pp]
|
||||
|
||||
- pin: 45
|
||||
id: C6
|
||||
class: event_inputs
|
||||
color: light green right
|
||||
function: Crank VR+/hall
|
||||
ts_name: 45 - VR/Hall Crank
|
||||
type: vr hall
|
||||
|
||||
info:
|
||||
directory: skeleton
|
|
@ -1,343 +0,0 @@
|
|||
/**
|
||||
* @file efifeatures.h
|
||||
*
|
||||
* @brief Configure which firmware modules are used.
|
||||
* @author Donald Becker October 2019
|
||||
* @author Hugo Becker November 2019
|
||||
*
|
||||
* This configuration is a "skeleton" example for RusEFI boards.
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
// General software features
|
||||
|
||||
// Use the GPIO port setup code -- almost always set.
|
||||
#define EFI_GPIO_HARDWARE TRUE
|
||||
// Internal ADC -- almost always set.
|
||||
#define EFI_INTERNAL_ADC TRUE
|
||||
#define EFI_ANALOG_SENSORS TRUE
|
||||
|
||||
// Log crank/cam sensor events, a frequently needed diag for new installations
|
||||
#define EFI_TOOTH_LOGGER TRUE
|
||||
|
||||
// Log other events, see also EFI_PRINT_MESSAGES_TO_TERMINAL
|
||||
#define EFI_TEXT_LOGGING TRUE
|
||||
|
||||
// Monitor changes to Default settings that create failures -- note spelling
|
||||
#define EFI_DEFAILED_LOGGING FALSE
|
||||
|
||||
// Build the logic analyzer support.
|
||||
// A logic analyzer viewer is included in the java console.
|
||||
#define EFI_LOGIC_ANALYZER TRUE
|
||||
|
||||
// A development feature to test output jitter and consistency
|
||||
#define EFI_PWM_TESTER FALSE
|
||||
|
||||
#define EFI_ENABLE_CRITICAL_ENGINE_STOP TRUE
|
||||
#define EFI_ENABLE_ENGINE_WARNING TRUE
|
||||
|
||||
#define EFI_CAN_SUPPORT TRUE
|
||||
|
||||
// Internal MCU features
|
||||
|
||||
// Hardware feature and chip support
|
||||
// Some require a non-zero count to include support, others are TRUE/FALSE
|
||||
// Other inconsistencies, such as naming, abound.
|
||||
|
||||
// Capacitive Discharge Module ion sense for detontation/knock detection
|
||||
#define EFI_CDM_INTEGRATION FALSE
|
||||
|
||||
// MCP42010 digital potentiometer
|
||||
#define EFI_POTENTIOMETER FALSE
|
||||
// MC33816 Programmable Gate Driver over SPI
|
||||
#define EFI_MC33816 FALSE
|
||||
|
||||
#define EFI_HPFP FALSE
|
||||
// MAX31855 Thermocouple interface over SPI
|
||||
#define EFI_MAX_31855 FALSE
|
||||
// MCP3208 ADC over SPI
|
||||
#define EFI_MCP_3208 FALSE
|
||||
// HIP9011 Knock / Detonation Detector SPI config
|
||||
#define EFI_HIP_9011 FALSE
|
||||
// Bosch CJ125 Wideband Exhaust Gas Oxygen Sensor interface
|
||||
#define EFI_CJ125 FALSE
|
||||
// LIS302DL MEMS Accelerometer over SPI, as on F4 Discovery board.
|
||||
#define EFI_MEMS FALSE
|
||||
|
||||
// HD44780 Character LCD, the only client of EFI_LCD
|
||||
#define EFI_HD44780_LCD FALSE
|
||||
#define EFI_LCD FALSE
|
||||
// and the closely related joystick input for the LCD menu system.
|
||||
#define EFI_JOYSTICK FALSE
|
||||
|
||||
|
||||
#define BOARD_TLE6240_COUNT 0
|
||||
#define BOARD_MC33972_COUNT 0
|
||||
#define BOARD_TLE8888_COUNT 0
|
||||
#define BOARD_MC33810_COUNT 0
|
||||
|
||||
/**
|
||||
* if you have a 60-2 trigger, or if you just want better performance, you
|
||||
* probably want EFI_ENABLE_ASSERTS to be FALSE. Also you would probably want to FALSE
|
||||
* CH_DBG_ENABLE_CHECKS
|
||||
* CH_DBG_ENABLE_ASSERTS
|
||||
* in chconf.h
|
||||
*
|
||||
*/
|
||||
#if !defined(EFI_ENABLE_ASSERTS)
|
||||
#define EFI_ENABLE_ASSERTS TRUE
|
||||
#endif /* EFI_ENABLE_ASSERTS */
|
||||
|
||||
#ifndef HAL_TRIGGER_USE_PAL
|
||||
#define HAL_TRIGGER_USE_PAL TRUE
|
||||
#endif /* HAL_TRIGGER_USE_PAL */
|
||||
|
||||
#ifndef HAL_TRIGGER_USE_ADC
|
||||
#define HAL_TRIGGER_USE_ADC FALSE
|
||||
#endif /* HAL_TRIGGER_USE_ADC */
|
||||
|
||||
// TunerStudio support.
|
||||
#define EFI_TUNER_STUDIO TRUE
|
||||
#define EFI_TUNER_STUDIO_VERBOSE TRUE // Debugging output
|
||||
|
||||
// HC-06 Bluetooth module UART setup (output an initial configuration string)
|
||||
#define EFI_BLUETOOTH_SETUP FALSE
|
||||
// Serial port NMEA GPS reporting
|
||||
#define EFI_UART_GPS FALSE
|
||||
|
||||
|
||||
/**
|
||||
* Dev console support.
|
||||
*/
|
||||
#define EFI_CLI_SUPPORT TRUE
|
||||
|
||||
#define EFI_RTC TRUE
|
||||
|
||||
#define EFI_ALTERNATOR_CONTROL TRUE
|
||||
|
||||
#define EFI_VVT_PID TRUE
|
||||
|
||||
#define EFI_SIGNAL_EXECUTOR_SLEEP FALSE
|
||||
#define EFI_SIGNAL_EXECUTOR_ONE_TIMER TRUE
|
||||
#define EFI_SIGNAL_EXECUTOR_HW_TIMER FALSE
|
||||
|
||||
#define FUEL_MATH_EXTREME_LOGGING FALSE
|
||||
|
||||
#define SPARK_EXTREME_LOGGING FALSE
|
||||
|
||||
#define TRIGGER_EXTREME_LOGGING FALSE
|
||||
|
||||
#ifndef EFI_INTERNAL_FLASH
|
||||
#define EFI_INTERNAL_FLASH TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Usually you need shaft position input, but maybe you do not need it?
|
||||
*/
|
||||
#ifndef EFI_SHAFT_POSITION_INPUT
|
||||
#define EFI_SHAFT_POSITION_INPUT TRUE
|
||||
#endif
|
||||
|
||||
#define EFI_ENGINE_CONTROL TRUE
|
||||
|
||||
#define EFI_ANALOG_SENSORS TRUE
|
||||
|
||||
|
||||
#define EFI_NARROW_EGO_AVERAGING TRUE
|
||||
|
||||
#ifndef EFI_IDLE_CONTROL
|
||||
#define EFI_IDLE_CONTROL TRUE
|
||||
#endif
|
||||
|
||||
#define EFI_IDLE_PID_CIC TRUE
|
||||
|
||||
/**
|
||||
* Control the main power relay based on measured ignition voltage (Vbatt)
|
||||
*/
|
||||
#ifndef EFI_MAIN_RELAY_CONTROL
|
||||
#define EFI_MAIN_RELAY_CONTROL FALSE
|
||||
#endif
|
||||
|
||||
#ifndef EFI_PWM
|
||||
#define EFI_PWM TRUE
|
||||
#endif
|
||||
|
||||
#ifndef EFI_VEHICLE_SPEED
|
||||
#define EFI_VEHICLE_SPEED TRUE
|
||||
#endif
|
||||
|
||||
#ifndef EFI_TCU
|
||||
#define EFI_TCU TRUE
|
||||
#endif
|
||||
|
||||
#ifndef EFI_ENGINE_EMULATOR
|
||||
#define EFI_ENGINE_EMULATOR TRUE
|
||||
#endif
|
||||
|
||||
#ifndef EFI_EMULATE_POSITION_SENSORS
|
||||
#define EFI_EMULATE_POSITION_SENSORS TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Do we need file logging (like SD card) logic?
|
||||
*/
|
||||
#ifndef EFI_FILE_LOGGING
|
||||
#define EFI_FILE_LOGGING TRUE
|
||||
#endif
|
||||
|
||||
#define EFI_USB_SERIAL TRUE
|
||||
|
||||
#ifndef EFI_ENGINE_SNIFFER
|
||||
#define EFI_ENGINE_SNIFFER TRUE
|
||||
#endif
|
||||
|
||||
#define EFI_HISTOGRAMS FALSE
|
||||
#define EFI_SENSOR_CHART TRUE
|
||||
|
||||
#if defined __GNUC__
|
||||
#define EFI_PERF_METRICS FALSE
|
||||
#define DL_OUTPUT_BUFFER 6500
|
||||
#else
|
||||
#define EFI_PERF_METRICS FALSE
|
||||
#define DL_OUTPUT_BUFFER 8000
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Do we need GPS logic?
|
||||
*/
|
||||
//#define EFI_UART_GPS FALSE
|
||||
|
||||
#define EFI_ELECTRONIC_THROTTLE_BODY TRUE
|
||||
|
||||
|
||||
// MIL Malfunction Indicator Lamp logic
|
||||
|
||||
#define EFI_MALFUNCTION_INDICATOR TRUE
|
||||
|
||||
#define CONSOLE_MAX_ACTIONS 180
|
||||
|
||||
#define EFI_MAP_AVERAGING TRUE
|
||||
|
||||
// todo: most of this should become configurable
|
||||
|
||||
// todo: switch to continuous ADC conversion for fast ADC?
|
||||
#define EFI_INTERNAL_FAST_ADC_GPT &GPTD6
|
||||
|
||||
#define EFI_SPI1_AF 5
|
||||
|
||||
#define EFI_SPI2_AF 5
|
||||
|
||||
/**
|
||||
* This section is for right-side center SPI
|
||||
*/
|
||||
|
||||
#define EFI_SPI3_AF 6
|
||||
|
||||
/**
|
||||
* Patched version of ChibiOS/RT support extra details in the system error messages
|
||||
*/
|
||||
#define EFI_CUSTOM_PANIC_METHOD TRUE
|
||||
|
||||
#define ADC_CHANNEL_VREF ADC_CHANNEL_IN14
|
||||
|
||||
/**
|
||||
* currently ChibiOS uses only first and second channels of each timer for input capture
|
||||
*
|
||||
* So, our options are:
|
||||
*
|
||||
* TIM2_CH1
|
||||
* PA5
|
||||
*
|
||||
* TIM4_CH1
|
||||
* PB6
|
||||
* PD12
|
||||
*
|
||||
* TIM9_CH1
|
||||
* PE5
|
||||
*/
|
||||
|
||||
|
||||
// Future: Consistently use consoleUartDevice
|
||||
#ifndef EFI_CONSOLE_SERIAL_DEVICE
|
||||
#define EFI_CONSOLE_SERIAL_DEVICE (&SD3)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Use 'HAL_USE_UART' DMA-mode driver instead of 'HAL_USE_SERIAL'
|
||||
*
|
||||
* See also
|
||||
* STM32_SERIAL_USE_USARTx
|
||||
* STM32_UART_USE_USARTx
|
||||
* in mcuconf.h
|
||||
*/
|
||||
#define TS_UART_DMA_MODE FALSE
|
||||
|
||||
#define PRIMARY_UART_DMA_MODE FALSE
|
||||
|
||||
//#define TS_UART_DEVICE (&UARTD3)
|
||||
#define TS_SERIAL_DEVICE (&SD3)
|
||||
|
||||
// todo: add DMA-mode for Console?
|
||||
#if (TS_UART_DMA_MODE || TS_UART_MODE)
|
||||
#undef EFI_CONSOLE_SERIAL_DEVICE
|
||||
#endif
|
||||
|
||||
#ifndef LED_CRITICAL_ERROR_BRAIN_PIN
|
||||
#define LED_CRITICAL_ERROR_BRAIN_PIN Gpio::D14
|
||||
#endif
|
||||
#ifndef LED_ERROR_BRAIN_PIN_MODE
|
||||
#define LED_ERROR_BRAIN_PIN_MODE DEFAULT_OUTPUT
|
||||
#endif
|
||||
|
||||
// USART1 -> check defined STM32_SERIAL_USE_USART1
|
||||
// For GPS we have USART1. We can start with PB7 USART1_RX and PB6 USART1_TX
|
||||
#define GPS_SERIAL_DEVICE &SD1
|
||||
#define GPS_SERIAL_SPEED 38400
|
||||
|
||||
#ifndef CONFIG_RESET_SWITCH_PORT
|
||||
// looks like this feature is not extremely popular, we can try living without it now :)
|
||||
//#define CONFIG_RESET_SWITCH_PORT GPIOD
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_RESET_SWITCH_PIN
|
||||
#define CONFIG_RESET_SWITCH_PIN 6
|
||||
#endif
|
||||
|
||||
// Enable file logging (like SD card) logic
|
||||
#define EFI_FILE_LOGGING FALSE
|
||||
|
||||
#define EFI_USB_SERIAL TRUE
|
||||
|
||||
// GPS reporting NMEA protocol on a serial port
|
||||
#undef EFI_UART_GPS
|
||||
#define EFI_UART_GPS FALSE
|
||||
|
||||
// consoleUartDevice is unused but provided on UART4 Tx:PC10 Rx:PC11
|
||||
// USART3 would work on the same pins but is reserved for future LIN bus use.
|
||||
// ToDo: Fix so that UART4 will work here.
|
||||
|
||||
#define HAL_USE_SERIAL_USB TRUE
|
||||
#undef EFI_CONSOLE_SERIAL_DEVICE
|
||||
#undef TS_UART_DEVICE
|
||||
#undef TS_SERIAL_DEVICE
|
||||
#undef TS_UART_MODE
|
||||
#define EFI_CONSOLE_SERIAL_DEVICE (&SD1)
|
||||
#define EFI_UART_ECHO_TEST_MODE TRUE
|
||||
|
||||
// USART3 is Alternate Function 7, UART4 is AF8
|
||||
// todo: start using consoleSerial{Tx,Rx}Pin
|
||||
#define EFI_CONSOLE_AF 7
|
||||
#define TS_SERIAL_AF 7
|
||||
#define EFI_CONSOLE_TX_BRAIN_PIN Gpio::C10
|
||||
#define EFI_CONSOLE_RX_BRAIN_PIN Gpio::C11
|
||||
|
||||
// todo: document the limitations of DMA mode for the UART.
|
||||
#undef TS_UART_DMA_MODE
|
||||
#define TS_UART_DMA_MODE FALSE
|
||||
|
||||
// todo: add DMA-mode for Console?
|
||||
#if (TS_UART_DMA_MODE || TS_UART_MODE)
|
||||
#undef EFI_CONSOLE_SERIAL_DEVICE
|
||||
#endif
|
|
@ -1,8 +0,0 @@
|
|||
#define ts_show_hip9011 false
|
||||
#define ts_show_cj125 false
|
||||
#define ts_show_full_pinout false
|
||||
#define ts_show_lcd false
|
||||
#define ts_show_joystick false
|
||||
#define ts_show_egt false
|
||||
#define ts_show_gps false
|
||||
#define ts_show_etb_pins false
|
|
@ -1,13 +0,0 @@
|
|||
# Skeleton Board
|
||||
|
||||
This directory contains an example of the files needed to configure the
|
||||
firmware for a specific RusEFI board.
|
||||
|
||||
The files here
|
||||
- select specific features to be included into the firmware
|
||||
- firmware to configure and support unique features of the board
|
||||
- set communication channels (USB, serial, CAN) and parameters e.g. speed
|
||||
- set the default GPIO pin configuration for use at startup
|
||||
|
||||
Note that many settings may be immediately reconfigured by the engine
|
||||
configuration.
|
|
@ -11,6 +11,14 @@
|
|||
#include "smart_gpio.h"
|
||||
#include "drivers/gpio/mc33810.h"
|
||||
|
||||
Gpio getCommsLedPin() {
|
||||
return Gpio::G6; /* LD1 - green */
|
||||
}
|
||||
|
||||
Gpio getRunningLedPin() {
|
||||
return Gpio::G8; /* LD3 - yellow */
|
||||
}
|
||||
|
||||
static void setSerialConfigurationOverrides() {
|
||||
engineConfiguration->binarySerialTxPin = Gpio::E1;
|
||||
engineConfiguration->binarySerialRxPin = Gpio::E0;
|
||||
|
@ -92,11 +100,6 @@ void setBoardDefaultConfiguration() {
|
|||
engineConfiguration->idle.solenoidPin = Gpio::TLE6240_PIN_11;
|
||||
engineConfiguration->secondSolenoidPin = Gpio::TLE6240_PIN_12;
|
||||
|
||||
engineConfiguration->communicationLedPin = Gpio::G6; /* LD1 - green */
|
||||
engineConfiguration->runningLedPin = Gpio::G8; /* LD3 - yellow */
|
||||
engineConfiguration->warningLedPin = Gpio::Unassigned; /* LD3 - yellow*/
|
||||
//engineConfiguration->unusedErrorPin = LED_ERROR_BRAIN_PIN; /* LD2 - red */
|
||||
|
||||
/* IF you have BOTH camshaft position sensor and crankshaft position sensor
|
||||
* camshaft is always trigger#1 input and then crankshaft is trigger#2. */
|
||||
engineConfiguration->triggerInputPins[0] = Gpio::H12; /* cam */
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -109,8 +109,9 @@
|
|||
#define CAN_ECU_HW_META 0xAB1234
|
||||
#define CAN_ECU_SERIAL_RX_ID 0x100
|
||||
#define CAN_ECU_SERIAL_TX_ID 0x102
|
||||
#define can_nbc_e_auto_enum 0="CAN_BUS_NBC_NONE",12="CAN_AIM_DASH",6="CAN_BUS_BMW_E90",10="CAN_BUS_GENESIS_COUPE",11="CAN_BUS_HONDA_K",7="CAN_BUS_Haltech",3="CAN_BUS_MAZDA_RX8",8="CAN_BUS_MQB",13="CAN_BUS_MS_SIMPLE_BROADCAST",4="CAN_BUS_NBC_BMW",1="CAN_BUS_NBC_FIAT",2="CAN_BUS_NBC_VAG",9="CAN_BUS_NISSAN_VQ",5="CAN_BUS_W202_C180"
|
||||
#define can_nbc_e_auto_enum 0="CAN_BUS_NBC_NONE",12="CAN_AIM_DASH",4="CAN_BUS_BMW_E46",6="CAN_BUS_BMW_E90",10="CAN_BUS_GENESIS_COUPE",11="CAN_BUS_HONDA_K",7="CAN_BUS_Haltech",3="CAN_BUS_MAZDA_RX8",8="CAN_BUS_MQB",13="CAN_BUS_MS_SIMPLE_BROADCAST",1="CAN_BUS_NBC_FIAT",2="CAN_BUS_NBC_VAG",9="CAN_BUS_NISSAN_VQ",5="CAN_BUS_W202_C180"
|
||||
#define can_nbc_e_CAN_AIM_DASH 12
|
||||
#define can_nbc_e_CAN_BUS_BMW_E46 4
|
||||
#define can_nbc_e_CAN_BUS_BMW_E90 6
|
||||
#define can_nbc_e_CAN_BUS_GENESIS_COUPE 10
|
||||
#define can_nbc_e_CAN_BUS_Haltech 7
|
||||
|
@ -118,7 +119,6 @@
|
|||
#define can_nbc_e_CAN_BUS_MAZDA_RX8 3
|
||||
#define can_nbc_e_CAN_BUS_MQB 8
|
||||
#define can_nbc_e_CAN_BUS_MS_SIMPLE_BROADCAST 13
|
||||
#define can_nbc_e_CAN_BUS_NBC_BMW 4
|
||||
#define can_nbc_e_CAN_BUS_NBC_FIAT 1
|
||||
#define can_nbc_e_CAN_BUS_NBC_NONE 0
|
||||
#define can_nbc_e_CAN_BUS_NBC_VAG 2
|
||||
|
@ -266,7 +266,7 @@
|
|||
#define ego_sensor_e_ES_NarrowBand 3
|
||||
#define ego_sensor_e_ES_PLX 4
|
||||
#define EGT_CHANNEL_COUNT 8
|
||||
#define engine_configuration_s_size 3972
|
||||
#define engine_configuration_s_size 3964
|
||||
#define engine_load_mode_e_auto_enum 0="LM_SPEED_DENSITY",2="LM_ALPHA_N",3="LM_LUA",100="LM_MOCK",1="LM_REAL_MAF"
|
||||
#define engine_load_mode_e_enum "Speed Density", "MAF Air Charge", "Alpha-N", "Lua"
|
||||
#define engine_load_mode_e_LM_ALPHA_N 2
|
||||
|
@ -939,7 +939,7 @@
|
|||
#define PACK_PERCENT_BYTE_MULT 100.0
|
||||
#define PEDAL_TO_TPS_SIZE 8
|
||||
#define PERCENT_TRIM_BYTE_PACKING_DIV 0.02
|
||||
#define persistent_config_s_size 23176
|
||||
#define persistent_config_s_size 23168
|
||||
#define pid_s_size 20
|
||||
#define PidAutoTune_AutoTunerState_AUTOTUNER_OFF 0
|
||||
#define PidAutoTune_AutoTunerState_CONVERGED 16
|
||||
|
@ -1030,7 +1030,7 @@
|
|||
#define show_Frankenso_presets false
|
||||
#define show_Proteus_presets false
|
||||
#define show_test_presets false
|
||||
#define SIGNATURE_HASH 709901255
|
||||
#define SIGNATURE_HASH 1369149359
|
||||
#define spi_device_e_auto_enum 0="SPI_NONE",1="SPI_DEVICE_1",2="SPI_DEVICE_2",3="SPI_DEVICE_3",4="SPI_DEVICE_4"
|
||||
#define spi_device_e_SPI_DEVICE_1 1
|
||||
#define spi_device_e_SPI_DEVICE_2 2
|
||||
|
@ -1076,7 +1076,7 @@
|
|||
#define TOOTH_PACKET_SIZE 2
|
||||
#define TOP_DEAD_CENTER_MESSAGE "r"
|
||||
#define TORQUE_CURVE_SIZE 6
|
||||
#define TOTAL_CONFIG_SIZE 23176
|
||||
#define TOTAL_CONFIG_SIZE 23168
|
||||
#define TPS_2_BYTE_PACKING_MULT 100
|
||||
#define TPS_TPS_ACCEL_CLT_CORR_TABLE 4
|
||||
#define TPS_TPS_ACCEL_TABLE 8
|
||||
|
@ -1301,7 +1301,6 @@
|
|||
#define ts_show_etb true
|
||||
#define ts_show_etb_pins true
|
||||
#define ts_show_full_pinout true
|
||||
#define ts_show_gps false
|
||||
#define ts_show_hardware_simulator true
|
||||
#define ts_show_hip9011 true
|
||||
#define ts_show_ignitionPinMode true
|
||||
|
@ -1321,7 +1320,7 @@
|
|||
#define ts_show_vbatt true
|
||||
#define ts_show_vr_threshold_2 true
|
||||
#define ts_show_vr_threshold_all true
|
||||
#define TS_SIGNATURE "rusEFI master.2023.06.02.subaru_eg33_f7.709901255"
|
||||
#define TS_SIGNATURE "rusEFI master.2023.06.06.subaru_eg33_f7.1369149359"
|
||||
#define TS_SINGLE_WRITE_COMMAND 'W'
|
||||
#define TS_SINGLE_WRITE_COMMAND_char W
|
||||
#define TS_TEST_COMMAND 't'
|
||||
|
|
|
@ -12,14 +12,6 @@
|
|||
#ifndef EFIFEATURES_SUBARUEG33_H_
|
||||
#define EFIFEATURES_SUBARUEG33_H_
|
||||
|
||||
/* LEDs */
|
||||
#undef LED_ERROR_BRAIN_PIN_MODE
|
||||
#define LED_ERROR_BRAIN_PIN_MODE INVERTED_OUTPUT
|
||||
#undef LED_WARNING_BRAIN_PIN_MODE
|
||||
#define LED_WARNING_BRAIN_PIN_MODE INVERTED_OUTPUT
|
||||
#undef LED_RUNING_BRAIN_PIN_MODE
|
||||
#define LED_RUNING_BRAIN_PIN_MODE INVERTED_OUTPUT
|
||||
|
||||
/* debug console */
|
||||
#define TS_PRIMARY_UxART_PORT SD1
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#define ts_show_hip9011 true
|
||||
#define ts_show_egt false
|
||||
#define ts_show_gps false
|
||||
|
||||
#define ts_show_etb_pins true
|
||||
#define ts_show_analog_divider false
|
||||
#define ts_show_spi true
|
||||
|
|
|
@ -433,122 +433,6 @@ void setTle8888TestConfiguration() {
|
|||
engineConfiguration->tpsMax = 799;
|
||||
}
|
||||
|
||||
/**
|
||||
* This configuration is used for MRE board Quality Assurance validation
|
||||
* todo: inline
|
||||
*/
|
||||
static void mreBoardOldTest() {
|
||||
#if (BOARD_TLE8888_COUNT > 0)
|
||||
engineConfiguration->debugMode = DBG_TLE8888;
|
||||
|
||||
engineConfiguration->triggerSimulatorRpm = 202;
|
||||
// set cranking_rpm 500
|
||||
engineConfiguration->cranking.rpm = 100;
|
||||
// set cranking_dwell 200
|
||||
engineConfiguration->ignitionDwellForCrankingMs = 200;
|
||||
// set cranking_fuel 300
|
||||
engineConfiguration->cranking.baseFuel = 190;
|
||||
engineConfiguration->injectionMode = IM_SEQUENTIAL;
|
||||
engineConfiguration->crankingInjectionMode = IM_SEQUENTIAL;
|
||||
|
||||
// EFI_ADC_1: "23 - AN temp 2"
|
||||
// test harness: Red/Green, 2K PD. expected 2.0v
|
||||
// iat in microrusefi/board_configuration.cpp
|
||||
|
||||
// EFI_ADC_2: "24 - AN temp 3"
|
||||
// test harness: Blue/White, 2K PD. expected 2.0v
|
||||
|
||||
|
||||
// EFI_ADC_10: "27 - AN volt 1"
|
||||
// test harness: Blue/Red, 3.84K PD / 5.3 PU. expected 1.6v
|
||||
engineConfiguration->mafAdcChannel = EFI_ADC_10;
|
||||
|
||||
// EFI_ADC_14: "32 - AN volt 6"
|
||||
// test harness: Red/White 3.6K PD / 5.2 PU. expected 1.6v
|
||||
engineConfiguration->throttlePedalPositionAdcChannel = EFI_ADC_14;
|
||||
|
||||
|
||||
// EFI_ADC_4: "28 - AN volt 10"
|
||||
// test harness: Red/Yellow
|
||||
engineConfiguration->afr.hwChannel = EFI_ADC_4;
|
||||
|
||||
|
||||
// EFI_ADC_7: "31 - AN volt 3"
|
||||
// test harness: White/Red
|
||||
engineConfiguration->map.sensor.hwChannel = EFI_ADC_7;
|
||||
|
||||
|
||||
//engineConfiguration->baroSensor.hwChannel
|
||||
//engineConfiguration->oilPressure.hwChannel
|
||||
//engineConfiguration->fuelLevelSensor
|
||||
|
||||
// TPS tps1_1AdcChannel EFI_ADC_13
|
||||
|
||||
engineConfiguration->cylindersCount = 10;
|
||||
engineConfiguration->firingOrder = FO_1_10_9_4_3_6_5_8_7_2;
|
||||
|
||||
// red LED #1
|
||||
engineConfiguration->ignitionPins[1 - 1] = Gpio::D4;
|
||||
engineConfiguration->ignitionPins[10 - 1] = Gpio::D3;
|
||||
engineConfiguration->ignitionPins[9 - 1] = Gpio::D6;
|
||||
engineConfiguration->ignitionPins[4 - 1] = Gpio::D7;
|
||||
engineConfiguration->ignitionPins[3 - 1] = Gpio::D1;
|
||||
engineConfiguration->ignitionPins[6 - 1] = Gpio::D2;
|
||||
engineConfiguration->ignitionPins[1] = Gpio::Unassigned;
|
||||
engineConfiguration->ignitionPins[4] = Gpio::Unassigned;
|
||||
engineConfiguration->ignitionPins[6] = Gpio::Unassigned;
|
||||
engineConfiguration->ignitionPins[7] = Gpio::Unassigned;
|
||||
|
||||
|
||||
engineConfiguration->fuelPumpPin = Gpio::Unassigned;
|
||||
engineConfiguration->idle.solenoidPin = Gpio::Unassigned;
|
||||
engineConfiguration->fanPin = Gpio::Unassigned;
|
||||
|
||||
// fuel pump is useful to test power on/off scenario
|
||||
// engineConfiguration->fuelPumpPin = Gpio::TLE8888_PIN_22;
|
||||
|
||||
|
||||
// LED #1
|
||||
// Gpio::TLE8888_PIN_22: "34 - GP Out 2"
|
||||
engineConfiguration->injectionPins[1 - 1] = Gpio::TLE8888_PIN_22;
|
||||
|
||||
// LED #2
|
||||
// Gpio::TLE8888_PIN_23: "33 - GP Out 3"
|
||||
engineConfiguration->injectionPins[10 - 1] = MRE_GPOUT_3;
|
||||
|
||||
// Gpio::TLE8888_PIN_1: LED #3 - INJ#2
|
||||
engineConfiguration->injectionPins[9 - 1] = Gpio::TLE8888_PIN_1;
|
||||
|
||||
// Gpio::TLE8888_PIN_2: LED #4 - INJ#1
|
||||
engineConfiguration->injectionPins[4 - 1] = Gpio::TLE8888_PIN_2;
|
||||
|
||||
// Gpio::TLE8888_PIN_3: LED #5 - INJ#3
|
||||
engineConfiguration->injectionPins[3 - 1] = Gpio::TLE8888_PIN_3;
|
||||
|
||||
// Gpio::TLE8888_PIN_4: LED #6 - INJ#4
|
||||
engineConfiguration->injectionPins[6 - 1] = Gpio::TLE8888_PIN_4;
|
||||
|
||||
// LED #7
|
||||
// Gpio::TLE8888_PIN_24: "43 - GP Out 4"
|
||||
engineConfiguration->injectionPins[5 - 1] = Gpio::TLE8888_PIN_24;
|
||||
|
||||
// LED #8
|
||||
// TLE8888 half bridges (pushpull, lowside, or high-low) IN12
|
||||
// Gpio::TLE8888_PIN_21: "35 - GP Out 1"
|
||||
engineConfiguration->injectionPins[8 - 1] = Gpio::TLE8888_PIN_21;
|
||||
|
||||
// LED #9
|
||||
// TLE8888 high current low side: IN10
|
||||
// Gpio::TLE8888_PIN_6: "7 - Lowside 1"
|
||||
engineConfiguration->injectionPins[7 - 1] = Gpio::TLE8888_PIN_6;
|
||||
|
||||
// LED #10
|
||||
// TLE8888 high current low side: VVT2 IN9 / OUT5
|
||||
// Gpio::TLE8888_PIN_5: "3 - Lowside 2"
|
||||
engineConfiguration->injectionPins[2 - 1] = Gpio::TLE8888_PIN_5;
|
||||
#endif /* BOARD_TLE8888_COUNT */
|
||||
}
|
||||
|
||||
#if HW_PROTEUS
|
||||
/*
|
||||
* set engine_type 96
|
||||
|
@ -655,17 +539,12 @@ void proteusBoardTest() {
|
|||
}
|
||||
#endif // HW_PROTEUS
|
||||
|
||||
void mreBCM() {
|
||||
void mreSecondaryCan() {
|
||||
for (int i = 0; i < MAX_CYLINDER_COUNT;i++) {
|
||||
engineConfiguration->ignitionPins[i] = Gpio::Unassigned;
|
||||
engineConfiguration->injectionPins[i] = Gpio::Unassigned;
|
||||
}
|
||||
engineConfiguration->fanPin = Gpio::Unassigned;
|
||||
engineConfiguration->consumeObdSensors = true;
|
||||
|
||||
}
|
||||
|
||||
void mreSecondaryCan() {
|
||||
engineConfiguration->triggerInputPins[0] = Gpio::Unassigned;
|
||||
|
||||
engineConfiguration->tps1_1AdcChannel = EFI_ADC_NONE;
|
||||
|
@ -709,12 +588,60 @@ end
|
|||
|
||||
}
|
||||
|
||||
void mreBCM() {
|
||||
mreSecondaryCan();
|
||||
// maybe time to kill this feature is pretty soon?
|
||||
engineConfiguration->consumeObdSensors = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* MRE_BOARD_NEW_TEST
|
||||
* set engine_type 31
|
||||
*/
|
||||
void mreBoardNewTest() {
|
||||
mreBoardOldTest();
|
||||
#if (BOARD_TLE8888_COUNT > 0)
|
||||
engineConfiguration->debugMode = DBG_TLE8888;
|
||||
|
||||
engineConfiguration->triggerSimulatorRpm = 202;
|
||||
// set cranking_rpm 500
|
||||
engineConfiguration->cranking.rpm = 100;
|
||||
// set cranking_dwell 200
|
||||
engineConfiguration->ignitionDwellForCrankingMs = 200;
|
||||
// set cranking_fuel 300
|
||||
engineConfiguration->cranking.baseFuel = 190;
|
||||
engineConfiguration->injectionMode = IM_SEQUENTIAL;
|
||||
engineConfiguration->crankingInjectionMode = IM_SEQUENTIAL;
|
||||
|
||||
// EFI_ADC_1: "23 - AN temp 2"
|
||||
// test harness: Red/Green, 2K PD. expected 2.0v
|
||||
// iat in microrusefi/board_configuration.cpp
|
||||
|
||||
// EFI_ADC_2: "24 - AN temp 3"
|
||||
// test harness: Blue/White, 2K PD. expected 2.0v
|
||||
|
||||
|
||||
// EFI_ADC_10: "27 - AN volt 1"
|
||||
// test harness: Blue/Red, 3.84K PD / 5.3 PU. expected 1.6v
|
||||
engineConfiguration->mafAdcChannel = EFI_ADC_10;
|
||||
|
||||
// EFI_ADC_14: "32 - AN volt 6"
|
||||
// test harness: Red/White 3.6K PD / 5.2 PU. expected 1.6v
|
||||
engineConfiguration->throttlePedalPositionAdcChannel = EFI_ADC_14;
|
||||
|
||||
// EFI_ADC_4: "28 - AN volt 10"
|
||||
// test harness: Red/Yellow
|
||||
engineConfiguration->afr.hwChannel = EFI_ADC_4;
|
||||
|
||||
// EFI_ADC_7: "31 - AN volt 3"
|
||||
// test harness: White/Red
|
||||
engineConfiguration->map.sensor.hwChannel = EFI_ADC_7;
|
||||
|
||||
engineConfiguration->fuelPumpPin = Gpio::Unassigned;
|
||||
engineConfiguration->idle.solenoidPin = Gpio::Unassigned;
|
||||
engineConfiguration->fanPin = Gpio::Unassigned;
|
||||
|
||||
|
||||
#endif /* BOARD_TLE8888_COUNT */
|
||||
|
||||
engineConfiguration->cylindersCount = 12;
|
||||
engineConfiguration->firingOrder = FO_1_2_3_4_5_6_7_8_9_10_11_12;
|
||||
|
|
|
@ -269,9 +269,6 @@ void setDodgeNeonNGCEngineConfiguration() {
|
|||
engineConfiguration->alternatorControl.dFactor = 0.1;
|
||||
engineConfiguration->alternatorControl.periodMs = 10;
|
||||
|
||||
engineConfiguration->canWriteEnabled = true;
|
||||
engineConfiguration->canNbcType = CAN_BUS_NBC_BMW;
|
||||
|
||||
engineConfiguration->tpsAccelEnrichmentThreshold = 10;
|
||||
|
||||
engineConfiguration->wwaeTau = 1.0f;
|
||||
|
|
|
@ -423,9 +423,6 @@
|
|||
#ifndef LED_CRITICAL_ERROR_BRAIN_PIN
|
||||
#define LED_CRITICAL_ERROR_BRAIN_PIN Gpio::D14
|
||||
#endif
|
||||
#ifndef LED_ERROR_BRAIN_PIN_MODE
|
||||
#define LED_ERROR_BRAIN_PIN_MODE DEFAULT_OUTPUT
|
||||
#endif
|
||||
|
||||
// USART1 -> check defined STM32_SERIAL_USE_USART1
|
||||
// For GPS we have USART1. We can start with PB7 USART1_RX and PB6 USART1_TX
|
||||
|
|
|
@ -85,19 +85,6 @@ extern WaveChart waveChart;
|
|||
|
||||
#include "sensor_chart.h"
|
||||
|
||||
extern pin_output_mode_e DEFAULT_OUTPUT;
|
||||
extern pin_output_mode_e INVERTED_OUTPUT;
|
||||
|
||||
#ifndef LED_WARNING_BRAIN_PIN_MODE
|
||||
#define LED_WARNING_BRAIN_PIN_MODE DEFAULT_OUTPUT
|
||||
#endif
|
||||
#ifndef LED_RUNING_BRAIN_PIN_MODE
|
||||
#define LED_RUNING_BRAIN_PIN_MODE DEFAULT_OUTPUT
|
||||
#endif
|
||||
#ifndef LED_COMMUNICATION_BRAIN_PIN_MODE
|
||||
#define LED_COMMUNICATION_BRAIN_PIN_MODE DEFAULT_OUTPUT
|
||||
#endif
|
||||
|
||||
int warningEnabled = true;
|
||||
|
||||
extern int maxTriggerReentrant;
|
||||
|
@ -257,15 +244,27 @@ void updateDevConsoleState() {
|
|||
#endif /* EFI_LOGIC_ANALYZER */
|
||||
}
|
||||
|
||||
static OutputPin *leds[] = { &enginePins.warningLedPin, &enginePins.runningLedPin,
|
||||
__attribute__((weak)) Gpio getCommsLedPin() {
|
||||
return Gpio::Unassigned;
|
||||
}
|
||||
|
||||
__attribute__((weak)) Gpio getWarningLedPin() {
|
||||
return Gpio::Unassigned;
|
||||
}
|
||||
|
||||
__attribute__((weak)) Gpio getRunningLedPin() {
|
||||
return Gpio::Unassigned;
|
||||
}
|
||||
|
||||
static OutputPin* leds[] = { &enginePins.warningLedPin, &enginePins.runningLedPin,
|
||||
&enginePins.errorLedPin, &enginePins.communicationLedPin, &enginePins.checkEnginePin };
|
||||
|
||||
static void initStatusLeds() {
|
||||
enginePins.communicationLedPin.initPin("led: comm status", engineConfiguration->communicationLedPin, &LED_COMMUNICATION_BRAIN_PIN_MODE, true);
|
||||
enginePins.communicationLedPin.initPin("led: comm status", getCommsLedPin(), LED_PIN_MODE, true);
|
||||
// checkEnginePin is already initialized by the time we get here
|
||||
|
||||
enginePins.warningLedPin.initPin("led: warning status", engineConfiguration->warningLedPin, &LED_WARNING_BRAIN_PIN_MODE, true);
|
||||
enginePins.runningLedPin.initPin("led: running status", engineConfiguration->runningLedPin, &LED_RUNING_BRAIN_PIN_MODE, true);
|
||||
enginePins.warningLedPin.initPin("led: warning status", getWarningLedPin(), LED_PIN_MODE, true);
|
||||
enginePins.runningLedPin.initPin("led: running status", getRunningLedPin(), LED_PIN_MODE, true);
|
||||
}
|
||||
|
||||
#if EFI_PROD_CODE
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "global.h"
|
||||
#include "rusefi_enums.h"
|
||||
// was generated automatically by rusEFI tool from rusefi_enums.h // by enum2string.jar tool on Sat May 13 15:41:57 UTC 2023
|
||||
// was generated automatically by rusEFI tool from rusefi_enums.h // by enum2string.jar tool on Sun Jun 04 00:32:14 UTC 2023
|
||||
// see also gen_config_and_enums.bat
|
||||
|
||||
|
||||
|
@ -282,6 +282,8 @@ const char *getCan_nbc_e(can_nbc_e value){
|
|||
switch(value) {
|
||||
case CAN_AIM_DASH:
|
||||
return "CAN_AIM_DASH";
|
||||
case CAN_BUS_BMW_E46:
|
||||
return "CAN_BUS_BMW_E46";
|
||||
case CAN_BUS_BMW_E90:
|
||||
return "CAN_BUS_BMW_E90";
|
||||
case CAN_BUS_GENESIS_COUPE:
|
||||
|
@ -296,8 +298,6 @@ case CAN_BUS_MQB:
|
|||
return "CAN_BUS_MQB";
|
||||
case CAN_BUS_MS_SIMPLE_BROADCAST:
|
||||
return "CAN_BUS_MS_SIMPLE_BROADCAST";
|
||||
case CAN_BUS_NBC_BMW:
|
||||
return "CAN_BUS_NBC_BMW";
|
||||
case CAN_BUS_NBC_FIAT:
|
||||
return "CAN_BUS_NBC_FIAT";
|
||||
case CAN_BUS_NBC_NONE:
|
||||
|
|
|
@ -259,24 +259,6 @@ void prepareVoidConfiguration(engine_configuration_s *engineConfiguration) {
|
|||
}
|
||||
|
||||
void setDefaultBasePins() {
|
||||
#ifdef EFI_WARNING_PIN
|
||||
engineConfiguration->warningLedPin = EFI_WARNING_PIN;
|
||||
#else
|
||||
engineConfiguration->warningLedPin = Gpio::D13; // orange LED on discovery
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef EFI_COMMUNICATION_PIN
|
||||
engineConfiguration->communicationLedPin = EFI_COMMUNICATION_PIN;
|
||||
#else
|
||||
engineConfiguration->communicationLedPin = Gpio::D15; // blue LED on discovery
|
||||
#endif
|
||||
#ifdef EFI_RUNNING_PIN
|
||||
engineConfiguration->runningLedPin = EFI_RUNNING_PIN;
|
||||
#else
|
||||
engineConfiguration->runningLedPin = Gpio::D12; // green LED on discovery
|
||||
#endif
|
||||
|
||||
#if EFI_PROD_CODE
|
||||
// call overrided board-specific serial configuration setup, if needed (for custom boards only)
|
||||
// needed also by bootloader code
|
||||
|
|
|
@ -5,16 +5,15 @@ static constexpr float geometricMean(float x, float y) {
|
|||
}
|
||||
|
||||
GearDetector::GearDetector()
|
||||
: StoredValueSensor(SensorType::DetectedGear, MS2NT(100))
|
||||
: Sensor(SensorType::DetectedGear)
|
||||
{
|
||||
Register();
|
||||
}
|
||||
|
||||
GearDetector::~GearDetector() {
|
||||
unregister();
|
||||
}
|
||||
|
||||
void GearDetector::onConfigurationChange(engine_configuration_s const * /*previousConfig*/) {
|
||||
void GearDetector::initGearDetector() {
|
||||
// Compute gear thresholds between gears
|
||||
|
||||
uint8_t gearCount = engineConfiguration->totalGearsCount;
|
||||
|
@ -32,7 +31,7 @@ void GearDetector::onConfigurationChange(engine_configuration_s const * /*previo
|
|||
// validate gears
|
||||
for (size_t i = 0; i < gearCount; i++) {
|
||||
if (engineConfiguration->gearRatio[i] <= 0) {
|
||||
firmwareError(ObdCode::OBD_PCM_Processor_Fault, "Invalid gear ratio for #%d", i + 1);
|
||||
firmwareError(ObdCode::OBD_PCM_Processor_Fault, "Expecting positive gear ratio for #%d", i + 1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -48,14 +47,24 @@ void GearDetector::onConfigurationChange(engine_configuration_s const * /*previo
|
|||
|
||||
m_gearThresholds[i] = geometricMean(gearI, gearIplusOne);
|
||||
}
|
||||
|
||||
Register();
|
||||
}
|
||||
|
||||
void GearDetector::onConfigurationChange(engine_configuration_s const * /*previousConfig*/) {
|
||||
initGearDetector();
|
||||
}
|
||||
|
||||
void GearDetector::onSlowCallback() {
|
||||
if (!isInitialized) {
|
||||
initGearDetector();
|
||||
isInitialized = true;
|
||||
}
|
||||
|
||||
float ratio = computeGearboxRatio();
|
||||
m_gearboxRatio = ratio;
|
||||
|
||||
auto gear = determineGearFromRatio(ratio);
|
||||
setValidValue(gear, getTimeNowNt());
|
||||
m_currentGear = determineGearFromRatio(ratio);
|
||||
}
|
||||
|
||||
size_t GearDetector::determineGearFromRatio(float ratio) const {
|
||||
|
@ -135,3 +144,13 @@ float GearDetector::getRpmInGear(size_t gear) const {
|
|||
float GearDetector::getGearboxRatio() const {
|
||||
return m_gearboxRatio;
|
||||
}
|
||||
|
||||
SensorResult GearDetector::get() const {
|
||||
return m_currentGear;
|
||||
}
|
||||
|
||||
void GearDetector::showInfo(const char* sensorName) const {
|
||||
efiPrintf("Sensor \"%s\" is gear detector.", sensorName);
|
||||
efiPrintf(" Gearbox ratio: %.3f", m_gearboxRatio);
|
||||
efiPrintf(" Detected gear: %d", m_currentGear);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
class GearDetector : public EngineModule, public StoredValueSensor {
|
||||
class GearDetector : public EngineModule, public Sensor {
|
||||
public:
|
||||
GearDetector();
|
||||
~GearDetector();
|
||||
|
@ -15,9 +15,14 @@ public:
|
|||
|
||||
float getRpmInGear(size_t gear) const;
|
||||
|
||||
SensorResult get() const;
|
||||
void showInfo(const char* sensorName) const;
|
||||
|
||||
private:
|
||||
float computeGearboxRatio() const;
|
||||
float getDriveshaftRpm() const;
|
||||
void initGearDetector();
|
||||
bool isInitialized = false;
|
||||
|
||||
float m_gearboxRatio = 0;
|
||||
size_t m_currentGear = 0;
|
||||
|
|
|
@ -494,7 +494,7 @@ typedef enum __attribute__ ((__packed__)) {
|
|||
CAN_BUS_NBC_FIAT = 1,
|
||||
CAN_BUS_NBC_VAG = 2,
|
||||
CAN_BUS_MAZDA_RX8 = 3,
|
||||
CAN_BUS_NBC_BMW = 4,
|
||||
CAN_BUS_BMW_E46 = 4,
|
||||
CAN_BUS_W202_C180 = 5,
|
||||
CAN_BUS_BMW_E90 = 6,
|
||||
CAN_BUS_Haltech = 7,
|
||||
|
|
|
@ -120,68 +120,18 @@ static bool cluster_time_set;
|
|||
constexpr uint8_t e90_temp_offset = 49;
|
||||
|
||||
// todo: those forward declarations are out of overall code style
|
||||
void canDashboardBMW(CanCycle cycle);
|
||||
void canDashboardFiat(CanCycle cycle);
|
||||
void canMazdaRX8(CanCycle cycle);
|
||||
void canDashboardW202(CanCycle cycle);
|
||||
void canDashboardBMWE90(CanCycle cycle);
|
||||
void canDashboardVagMqb(CanCycle cycle);
|
||||
void canDashboardNissanVQ(CanCycle cycle);
|
||||
void canDashboardGenesisCoupe(CanCycle cycle);
|
||||
void canDashboardAim(CanCycle cycle);
|
||||
void canDashboardHaltech(CanCycle cycle);
|
||||
|
||||
void updateDash(CanCycle cycle) {
|
||||
|
||||
// Transmit dash data, if enabled
|
||||
switch (engineConfiguration->canNbcType) {
|
||||
case CAN_BUS_NBC_NONE:
|
||||
break;
|
||||
case CAN_BUS_NBC_BMW:
|
||||
canDashboardBMW(cycle);
|
||||
break;
|
||||
case CAN_BUS_Haltech:
|
||||
canDashboardHaltech(cycle);
|
||||
break;
|
||||
case CAN_BUS_NBC_FIAT:
|
||||
canDashboardFiat(cycle);
|
||||
break;
|
||||
case CAN_BUS_NBC_VAG:
|
||||
canDashboardVAG(cycle);
|
||||
break;
|
||||
case CAN_BUS_MAZDA_RX8:
|
||||
canMazdaRX8(cycle);
|
||||
break;
|
||||
case CAN_BUS_W202_C180:
|
||||
canDashboardW202(cycle);
|
||||
break;
|
||||
case CAN_BUS_BMW_E90:
|
||||
canDashboardBMWE90(cycle);
|
||||
break;
|
||||
case CAN_BUS_MQB:
|
||||
canDashboardVagMqb(cycle);
|
||||
break;
|
||||
case CAN_BUS_NISSAN_VQ:
|
||||
canDashboardNissanVQ(cycle);
|
||||
break;
|
||||
case CAN_BUS_GENESIS_COUPE:
|
||||
canDashboardGenesisCoupe(cycle);
|
||||
break;
|
||||
case CAN_AIM_DASH:
|
||||
canDashboardAim(cycle);
|
||||
break;
|
||||
case CAN_BUS_MS_SIMPLE_BROADCAST:
|
||||
canDashboardTS(cycle);
|
||||
break;
|
||||
default:
|
||||
firmwareError(ObdCode::OBD_PCM_Processor_Fault, "Nothing for canNbcType %s", getCan_nbc_e(engineConfiguration->canNbcType));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//BMW Dashboard
|
||||
//todo: we use 50ms fixed cycle, trace is needed to check for correct period
|
||||
void canDashboardBMW(CanCycle cycle) {
|
||||
static void canDashboardBmwE46(CanCycle cycle) {
|
||||
|
||||
if (cycle.isInterval(CI::_50ms)) {
|
||||
{
|
||||
|
@ -430,8 +380,7 @@ void canDashboardVagMqb(CanCycle cycle) {
|
|||
}
|
||||
}
|
||||
|
||||
void canDashboardBMWE90(CanCycle cycle)
|
||||
{
|
||||
static void canDashboardBmwE90(CanCycle cycle) {
|
||||
|
||||
if (cycle.isInterval(CI::_50ms)) {
|
||||
|
||||
|
@ -1315,4 +1264,52 @@ void canDashboardAim(CanCycle cycle) {
|
|||
// transmitStruct<Aim5fd>(0x5fd, false);
|
||||
}
|
||||
|
||||
void updateDash(CanCycle cycle) {
|
||||
|
||||
// Transmit dash data, if enabled
|
||||
switch (engineConfiguration->canNbcType) {
|
||||
case CAN_BUS_NBC_NONE:
|
||||
break;
|
||||
case CAN_BUS_BMW_E46:
|
||||
canDashboardBmwE46(cycle);
|
||||
break;
|
||||
case CAN_BUS_Haltech:
|
||||
canDashboardHaltech(cycle);
|
||||
break;
|
||||
case CAN_BUS_NBC_FIAT:
|
||||
canDashboardFiat(cycle);
|
||||
break;
|
||||
case CAN_BUS_NBC_VAG:
|
||||
canDashboardVAG(cycle);
|
||||
break;
|
||||
case CAN_BUS_MAZDA_RX8:
|
||||
canMazdaRX8(cycle);
|
||||
break;
|
||||
case CAN_BUS_W202_C180:
|
||||
canDashboardW202(cycle);
|
||||
break;
|
||||
case CAN_BUS_BMW_E90:
|
||||
canDashboardBmwE90(cycle);
|
||||
break;
|
||||
case CAN_BUS_MQB:
|
||||
canDashboardVagMqb(cycle);
|
||||
break;
|
||||
case CAN_BUS_NISSAN_VQ:
|
||||
canDashboardNissanVQ(cycle);
|
||||
break;
|
||||
case CAN_BUS_GENESIS_COUPE:
|
||||
canDashboardGenesisCoupe(cycle);
|
||||
break;
|
||||
case CAN_AIM_DASH:
|
||||
canDashboardAim(cycle);
|
||||
break;
|
||||
case CAN_BUS_MS_SIMPLE_BROADCAST:
|
||||
canDashboardTS(cycle);
|
||||
break;
|
||||
default:
|
||||
firmwareError(ObdCode::OBD_PCM_Processor_Fault, "Nothing for canNbcType %s", getCan_nbc_e(engineConfiguration->canNbcType));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#endif // EFI_CAN_SUPPORT
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#pragma once
|
||||
#define VCS_DATE 20230602
|
||||
#define VCS_DATE 20230606
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue