Revert "The Big Refactoring of 2019: DECLARE_ENGINE_PARAMETER_SUFFIX consistency and simplification #657"
This reverts commit 61440c5
This commit is contained in:
parent
e3131ab13f
commit
fd14010809
|
@ -86,7 +86,7 @@ void setGy6139qmbDefaultEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE)
|
||||||
engineConfiguration->analogInputDividerCoefficient = 1;
|
engineConfiguration->analogInputDividerCoefficient = 1;
|
||||||
engineConfiguration->fuelAlgorithm = LM_MAP;
|
engineConfiguration->fuelAlgorithm = LM_MAP;
|
||||||
engineConfiguration->globalTriggerAngleOffset = 45;
|
engineConfiguration->globalTriggerAngleOffset = 45;
|
||||||
CONFIGB(sensorChartMode) = SC_MAP;
|
boardConfiguration->sensorChartMode = SC_MAP;
|
||||||
engineConfiguration->specs.displacement = 0.072; // 72cc
|
engineConfiguration->specs.displacement = 0.072; // 72cc
|
||||||
engineConfiguration->specs.cylindersCount = 1;
|
engineConfiguration->specs.cylindersCount = 1;
|
||||||
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
|
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
|
||||||
|
@ -100,7 +100,7 @@ void setGy6139qmbDefaultEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE)
|
||||||
engineConfiguration->trigger.customTotalToothCount = 8;
|
engineConfiguration->trigger.customTotalToothCount = 8;
|
||||||
engineConfiguration->trigger.customSkippedToothCount = 1;
|
engineConfiguration->trigger.customSkippedToothCount = 1;
|
||||||
|
|
||||||
CONFIGB(injectionPins)[0] = GPIOC_9;
|
boardConfiguration->injectionPins[0] = GPIOC_9;
|
||||||
CONFIGB(ignitionPins)[0] = GPIOC_8;
|
boardConfiguration->ignitionPins[0] = GPIOC_8;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,8 +26,8 @@ void setBmwE34(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
// setOperationMode(engineConfiguration, FOUR_STROKE_CAM_SENSOR);
|
// setOperationMode(engineConfiguration, FOUR_STROKE_CAM_SENSOR);
|
||||||
// engineConfiguration->trigger.type = TT_ONE_PLUS_TOOTHED_WHEEL_60_2;
|
// engineConfiguration->trigger.type = TT_ONE_PLUS_TOOTHED_WHEEL_60_2;
|
||||||
// engineConfiguration->injectionMode = IM_SEQUENTIAL;
|
// engineConfiguration->injectionMode = IM_SEQUENTIAL;
|
||||||
// CONFIGB(triggerInputPins)[0] = GPIOC_6;
|
// boardConfiguration->triggerInputPins[0] = GPIOC_6;
|
||||||
// CONFIGB(triggerInputPins)[1] = GPIOA_5;
|
// boardConfiguration->triggerInputPins[1] = GPIOA_5;
|
||||||
|
|
||||||
//Base engine setting
|
//Base engine setting
|
||||||
engineConfiguration->specs.cylindersCount = 6;
|
engineConfiguration->specs.cylindersCount = 6;
|
||||||
|
@ -38,7 +38,7 @@ void setBmwE34(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
|
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
|
||||||
engineConfiguration->useOnlyRisingEdgeForTrigger = true;
|
engineConfiguration->useOnlyRisingEdgeForTrigger = true;
|
||||||
|
|
||||||
CONFIGB(tachOutputPin) = GPIOC_8;
|
boardConfiguration->tachOutputPin = GPIOC_8;
|
||||||
|
|
||||||
// Trigger configuration
|
// Trigger configuration
|
||||||
// engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_60_2;
|
// engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_60_2;
|
||||||
|
@ -57,12 +57,12 @@ void setBmwE34(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->injector.flow = 750;
|
engineConfiguration->injector.flow = 750;
|
||||||
|
|
||||||
// General settings
|
// General settings
|
||||||
CONFIGB(tunerStudioSerialSpeed) = 57600;
|
boardConfiguration->tunerStudioSerialSpeed = 57600;
|
||||||
engineConfiguration->rpmHardLimit = 7000;
|
engineConfiguration->rpmHardLimit = 7000;
|
||||||
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_PARAMETER_SUFFIX);
|
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
// for best performance at high RPM, we need to turn off 'Engine Sniffer' and 'Sensor Sniffer'
|
// for best performance at high RPM, we need to turn off 'Engine Sniffer' and 'Sensor Sniffer'
|
||||||
CONFIGB(sensorChartMode) = SC_OFF;
|
boardConfiguration->sensorChartMode = SC_OFF;
|
||||||
engineConfiguration->isEngineChartEnabled = false;
|
engineConfiguration->isEngineChartEnabled = false;
|
||||||
|
|
||||||
engineConfiguration->isCylinderCleanupEnabled = false;
|
engineConfiguration->isCylinderCleanupEnabled = false;
|
||||||
|
@ -90,52 +90,52 @@ void setBmwE34(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->tpsAdcChannel = EFI_ADC_3;
|
engineConfiguration->tpsAdcChannel = EFI_ADC_3;
|
||||||
|
|
||||||
|
|
||||||
CONFIGB(triggerInputPins)[0] = GPIOA_5;
|
boardConfiguration->triggerInputPins[0] = GPIOA_5;
|
||||||
CONFIGB(triggerInputPins)[1] = GPIO_UNASSIGNED;
|
boardConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
setWholeTimingTable(25 PASS_ENGINE_PARAMETER_SUFFIX);
|
setWholeTimingTable(25 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
CONFIGB(malfunctionIndicatorPin) = GPIO_UNASSIGNED;
|
boardConfiguration->malfunctionIndicatorPin = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
// bc->isFastAdcEnabled = true;
|
// bc->isFastAdcEnabled = true;
|
||||||
|
|
||||||
CONFIGB(injectionPinMode) = OM_INVERTED;
|
boardConfiguration->injectionPinMode = OM_INVERTED;
|
||||||
CONFIGB(injectionPins)[0] = GPIOB_8; // #1
|
boardConfiguration->injectionPins[0] = GPIOB_8; // #1
|
||||||
CONFIGB(injectionPins)[1] = GPIOE_2; // #2
|
boardConfiguration->injectionPins[1] = GPIOE_2; // #2
|
||||||
CONFIGB(injectionPins)[2] = GPIOE_3; // #3
|
boardConfiguration->injectionPins[2] = GPIOE_3; // #3
|
||||||
CONFIGB(injectionPins)[3] = GPIOE_4; // #4
|
boardConfiguration->injectionPins[3] = GPIOE_4; // #4
|
||||||
CONFIGB(injectionPins)[4] = GPIOE_5; // #5
|
boardConfiguration->injectionPins[4] = GPIOE_5; // #5
|
||||||
CONFIGB(injectionPins)[5] = GPIOE_6; // #6
|
boardConfiguration->injectionPins[5] = GPIOE_6; // #6
|
||||||
|
|
||||||
CONFIGB(ignitionPinMode) = OM_INVERTED;
|
boardConfiguration->ignitionPinMode = OM_INVERTED;
|
||||||
|
|
||||||
CONFIGB(ignitionPins)[0] = GPIOB_5; // #1
|
boardConfiguration->ignitionPins[0] = GPIOB_5; // #1
|
||||||
CONFIGB(ignitionPins)[2] = GPIOB_6; // #3
|
boardConfiguration->ignitionPins[2] = GPIOB_6; // #3
|
||||||
CONFIGB(ignitionPins)[4] = GPIOB_7; // #5
|
boardConfiguration->ignitionPins[4] = GPIOB_7; // #5
|
||||||
|
|
||||||
CONFIGB(canRxPin) = GPIO_UNASSIGNED;
|
boardConfiguration->canRxPin = GPIO_UNASSIGNED;
|
||||||
CONFIGB(canTxPin) = GPIO_UNASSIGNED;
|
boardConfiguration->canTxPin = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
CONFIGB(triggerErrorPin) = GPIO_UNASSIGNED;
|
boardConfiguration->triggerErrorPin = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
// clutch up
|
// clutch up
|
||||||
CONFIGB(clutchUpPin) = GPIOD_3;
|
boardConfiguration->clutchUpPin = GPIOD_3;
|
||||||
CONFIGB(clutchUpPinMode) = PI_PULLUP;
|
boardConfiguration->clutchUpPinMode = PI_PULLUP;
|
||||||
|
|
||||||
// fuel pump
|
// fuel pump
|
||||||
CONFIGB(fuelPumpPin) = GPIOD_4;
|
boardConfiguration->fuelPumpPin = GPIOD_4;
|
||||||
|
|
||||||
// idle
|
// idle
|
||||||
CONFIGB(idle).solenoidPin = GPIOC_14;
|
boardConfiguration->idle.solenoidPin = GPIOC_14;
|
||||||
CONFIGB(idle).solenoidPinMode = OM_INVERTED;
|
boardConfiguration->idle.solenoidPinMode = OM_INVERTED;
|
||||||
CONFIGB(idle).solenoidFrequency = 300;
|
boardConfiguration->idle.solenoidFrequency = 300;
|
||||||
CONFIGB(manIdlePosition) = 50; // set_idle_pwm 50
|
boardConfiguration->manIdlePosition = 50; // set_idle_pwm 50
|
||||||
|
|
||||||
// disable sd_card
|
// disable sd_card
|
||||||
CONFIGB(sdCardCsPin) = GPIO_UNASSIGNED;
|
boardConfiguration->sdCardCsPin = GPIO_UNASSIGNED;
|
||||||
CONFIGB(is_enabled_spi_2) = false;
|
boardConfiguration->is_enabled_spi_2 = false;
|
||||||
CONFIGB(is_enabled_spi_3) = false;
|
boardConfiguration->is_enabled_spi_3 = false;
|
||||||
CONFIGB(max31855spiDevice) = SPI_NONE;
|
boardConfiguration->max31855spiDevice = SPI_NONE;
|
||||||
|
|
||||||
// turbocharger boost control solenoid: TODO output: GPIOE_6
|
// turbocharger boost control solenoid: TODO output: GPIOE_6
|
||||||
// water injection #1 TODO GPIOD_7
|
// water injection #1 TODO GPIOD_7
|
||||||
|
@ -145,7 +145,7 @@ void setBmwE34(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
* emulating the 60-0 trigger takes some resources, let's keep it slow by default
|
* emulating the 60-0 trigger takes some resources, let's keep it slow by default
|
||||||
* rpm 200
|
* rpm 200
|
||||||
*/
|
*/
|
||||||
CONFIGB(triggerSimulatorFrequency) = 200;
|
boardConfiguration->triggerSimulatorFrequency = 200;
|
||||||
|
|
||||||
// Configurating sensors:
|
// Configurating sensors:
|
||||||
|
|
||||||
|
@ -165,7 +165,7 @@ void setBmwE34(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
// */
|
// */
|
||||||
// bc->triggerSimulatorPins[1] = GPIO_UNASSIGNED;
|
// bc->triggerSimulatorPins[1] = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
CONFIGB(triggerSimulatorPins)[0] = GPIOD_1;
|
boardConfiguration->triggerSimulatorPins[0] = GPIOD_1;
|
||||||
CONFIGB(triggerSimulatorPins)[1] = GPIOD_2;
|
boardConfiguration->triggerSimulatorPins[1] = GPIOD_2;
|
||||||
CONFIGB(triggerSimulatorPins)[2] = GPIO_UNASSIGNED;
|
boardConfiguration->triggerSimulatorPins[2] = GPIO_UNASSIGNED;
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,8 +26,8 @@ void setCamaro4(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->specs.cylindersCount = 8;
|
engineConfiguration->specs.cylindersCount = 8;
|
||||||
|
|
||||||
engineConfiguration->specs.firingOrder = FO_1_8_7_2_6_5_4_3;
|
engineConfiguration->specs.firingOrder = FO_1_8_7_2_6_5_4_3;
|
||||||
CONFIGB(triggerInputPins)[0] = GPIOA_5;
|
boardConfiguration->triggerInputPins[0] = GPIOA_5;
|
||||||
CONFIGB(triggerInputPins)[1] = GPIOC_6;
|
boardConfiguration->triggerInputPins[1] = GPIOC_6;
|
||||||
|
|
||||||
engineConfiguration->injectionMode = IM_BATCH;
|
engineConfiguration->injectionMode = IM_BATCH;
|
||||||
engineConfiguration->twoWireBatchInjection = true;
|
engineConfiguration->twoWireBatchInjection = true;
|
||||||
|
@ -58,31 +58,31 @@ void setCamaro4(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->afr.hwChannel = EFI_ADC_13;
|
engineConfiguration->afr.hwChannel = EFI_ADC_13;
|
||||||
|
|
||||||
|
|
||||||
CONFIGB(idle).solenoidPin = GPIO_UNASSIGNED;
|
boardConfiguration->idle.solenoidPin = GPIO_UNASSIGNED;
|
||||||
CONFIGB(fuelPumpPin) = GPIO_UNASSIGNED;
|
boardConfiguration->fuelPumpPin = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
CONFIGB(injectionPins)[0] = GPIOE_6;
|
boardConfiguration->injectionPins[0] = GPIOE_6;
|
||||||
CONFIGB(injectionPins)[1] = GPIOE_5;
|
boardConfiguration->injectionPins[1] = GPIOE_5;
|
||||||
CONFIGB(injectionPins)[2] = GPIOD_7;
|
boardConfiguration->injectionPins[2] = GPIOD_7;
|
||||||
CONFIGB(injectionPins)[3] = GPIOC_13;
|
boardConfiguration->injectionPins[3] = GPIOC_13;
|
||||||
CONFIGB(injectionPins)[4] = GPIOE_3;
|
boardConfiguration->injectionPins[4] = GPIOE_3;
|
||||||
CONFIGB(injectionPins)[5] = GPIOE_4;
|
boardConfiguration->injectionPins[5] = GPIOE_4;
|
||||||
CONFIGB(injectionPins)[6] = GPIOD_3;
|
boardConfiguration->injectionPins[6] = GPIOD_3;
|
||||||
CONFIGB(injectionPins)[7] = GPIOE_2;
|
boardConfiguration->injectionPins[7] = GPIOE_2;
|
||||||
|
|
||||||
|
|
||||||
CONFIGB(ignitionPins)[0] = GPIOC_9;
|
boardConfiguration->ignitionPins[0] = GPIOC_9;
|
||||||
CONFIGB(ignitionPins)[1] = GPIOC_7;
|
boardConfiguration->ignitionPins[1] = GPIOC_7;
|
||||||
CONFIGB(ignitionPins)[2] = GPIOE_14;
|
boardConfiguration->ignitionPins[2] = GPIOE_14;
|
||||||
CONFIGB(ignitionPins)[3] = GPIOE_12;
|
boardConfiguration->ignitionPins[3] = GPIOE_12;
|
||||||
CONFIGB(ignitionPins)[4] = GPIOE_10;
|
boardConfiguration->ignitionPins[4] = GPIOE_10;
|
||||||
CONFIGB(ignitionPins)[5] = GPIOE_8;
|
boardConfiguration->ignitionPins[5] = GPIOE_8;
|
||||||
CONFIGB(ignitionPins)[6] = GPIOD_9;
|
boardConfiguration->ignitionPins[6] = GPIOD_9;
|
||||||
CONFIGB(ignitionPins)[7] = GPIOD_8;
|
boardConfiguration->ignitionPins[7] = GPIOD_8;
|
||||||
|
|
||||||
CONFIGB(fuelPumpPin) = GPIOB_8;
|
boardConfiguration->fuelPumpPin = GPIOB_8;
|
||||||
CONFIGB(fanPin) = GPIO_UNASSIGNED;
|
boardConfiguration->fanPin = GPIO_UNASSIGNED;
|
||||||
CONFIGB(mainRelayPin) = GPIOD_5;
|
boardConfiguration->mainRelayPin = GPIOD_5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -17,15 +17,13 @@
|
||||||
#include "citroenBerlingoTU3JP.h"
|
#include "citroenBerlingoTU3JP.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
void setLCD(board_configuration_s *boardConfiguration) {
|
||||||
|
boardConfiguration->HD44780_rs = GPIOE_7;
|
||||||
static void setLCD(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
boardConfiguration->HD44780_e = GPIOE_9;
|
||||||
CONFIGB(HD44780_rs) = GPIOE_7;
|
boardConfiguration->HD44780_db4 = GPIOE_11;
|
||||||
CONFIGB(HD44780_e) = GPIOE_9;
|
boardConfiguration->HD44780_db5 = GPIOE_13;
|
||||||
CONFIGB(HD44780_db4) = GPIOE_11;
|
boardConfiguration->HD44780_db6 = GPIOE_15;
|
||||||
CONFIGB(HD44780_db5) = GPIOE_13;
|
boardConfiguration->HD44780_db7 = GPIOB_10;
|
||||||
CONFIGB(HD44780_db6) = GPIOE_15;
|
|
||||||
CONFIGB(HD44780_db7) = GPIOB_10;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static const fuel_table_t tps_fuel_table = {
|
static const fuel_table_t tps_fuel_table = {
|
||||||
|
@ -122,35 +120,35 @@ void setCitroenBerlingoTU3JPConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
// Frankenstein lo-side output #11: PB8 Main relay
|
// Frankenstein lo-side output #11: PB8 Main relay
|
||||||
// Frankenstein lo-side output #12: PB9 Fuel pump
|
// Frankenstein lo-side output #12: PB9 Fuel pump
|
||||||
|
|
||||||
CONFIGB(ignitionPins)[0] = GPIOC_14;
|
boardConfiguration->ignitionPins[0] = GPIOC_14;
|
||||||
CONFIGB(ignitionPins)[1] = GPIO_UNASSIGNED;
|
boardConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(ignitionPins)[2] = GPIOC_15;
|
boardConfiguration->ignitionPins[2] = GPIOC_15;
|
||||||
CONFIGB(ignitionPins)[3] = GPIO_UNASSIGNED;
|
boardConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
engineConfiguration->injector.flow = 137; //SIEMENS DEKA VAZ20734
|
engineConfiguration->injector.flow = 137; //SIEMENS DEKA VAZ20734
|
||||||
CONFIGB(injectionPins)[0] = GPIOE_6;
|
boardConfiguration->injectionPins[0] = GPIOE_6;
|
||||||
CONFIGB(injectionPins)[1] = GPIOC_13;
|
boardConfiguration->injectionPins[1] = GPIOC_13;
|
||||||
CONFIGB(injectionPins)[2] = GPIO_UNASSIGNED;
|
boardConfiguration->injectionPins[2] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(injectionPins)[3] = GPIO_UNASSIGNED;
|
boardConfiguration->injectionPins[3] = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
CONFIGB(fanPin) = GPIOE_0;
|
boardConfiguration->fanPin = GPIOE_0;
|
||||||
CONFIGB(fanPinMode) = OM_DEFAULT;
|
boardConfiguration->fanPinMode = OM_DEFAULT;
|
||||||
engineConfiguration->fanOffTemperature = 95;
|
engineConfiguration->fanOffTemperature = 95;
|
||||||
engineConfiguration->fanOnTemperature = 99;
|
engineConfiguration->fanOnTemperature = 99;
|
||||||
|
|
||||||
CONFIGB(malfunctionIndicatorPin) = GPIOE_1;
|
boardConfiguration->malfunctionIndicatorPin = GPIOE_1;
|
||||||
CONFIGB(malfunctionIndicatorPinMode) = OM_DEFAULT;
|
boardConfiguration->malfunctionIndicatorPinMode = OM_DEFAULT;
|
||||||
|
|
||||||
CONFIGB(mainRelayPin) = GPIOB_8;
|
boardConfiguration->mainRelayPin = GPIOB_8;
|
||||||
|
|
||||||
CONFIGB(fuelPumpPin) = GPIOB_9;
|
boardConfiguration->fuelPumpPin = GPIOB_9;
|
||||||
CONFIGB(fuelPumpPinMode) = OM_DEFAULT;
|
boardConfiguration->fuelPumpPinMode = OM_DEFAULT;
|
||||||
|
|
||||||
setLCD(PASS_ENGINE_PARAMETER_SIGNATURE);
|
setLCD(boardConfiguration);
|
||||||
|
|
||||||
|
|
||||||
// CONFIGB(o2heaterPin) = GPIOC_13;
|
// boardConfiguration->o2heaterPin = GPIOC_13;
|
||||||
// CONFIGB(logicAnalyzerPins)[1] = GPIO_UNASSIGNED;
|
// boardConfiguration->logicAnalyzerPins[1] = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inputs
|
* Inputs
|
||||||
|
@ -208,7 +206,7 @@ void setCitroenBerlingoTU3JPConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
/**
|
/**
|
||||||
* Speed Sensor
|
* Speed Sensor
|
||||||
*/
|
*/
|
||||||
CONFIGB(vehicleSpeedSensorInputPin) = GPIOA_8;
|
boardConfiguration->vehicleSpeedSensorInputPin = GPIOA_8;
|
||||||
/**
|
/**
|
||||||
* Other
|
* Other
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -62,22 +62,22 @@ void test557init(void) {
|
||||||
}
|
}
|
||||||
#endif /* EFI_PROD_CODE */
|
#endif /* EFI_PROD_CODE */
|
||||||
|
|
||||||
void setFrankenso_01_LCD(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
void setFrankenso_01_LCD(board_configuration_s *boardConfiguration) {
|
||||||
CONFIGB(HD44780_rs) = GPIOE_7;
|
boardConfiguration->HD44780_rs = GPIOE_7;
|
||||||
CONFIGB(HD44780_e) = GPIOE_9;
|
boardConfiguration->HD44780_e = GPIOE_9;
|
||||||
CONFIGB(HD44780_db4) = GPIOE_11;
|
boardConfiguration->HD44780_db4 = GPIOE_11;
|
||||||
CONFIGB(HD44780_db5) = GPIOE_13;
|
boardConfiguration->HD44780_db5 = GPIOE_13;
|
||||||
CONFIGB(HD44780_db6) = GPIOE_15;
|
boardConfiguration->HD44780_db6 = GPIOE_15;
|
||||||
CONFIGB(HD44780_db7) = GPIOB_10;
|
boardConfiguration->HD44780_db7 = GPIOB_10;
|
||||||
}
|
}
|
||||||
|
|
||||||
void disableLCD(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
void disableLCD(board_configuration_s *boardConfiguration) {
|
||||||
CONFIGB(HD44780_rs) = GPIO_UNASSIGNED;
|
boardConfiguration->HD44780_rs = GPIO_UNASSIGNED;
|
||||||
CONFIGB(HD44780_e) = GPIO_UNASSIGNED;
|
boardConfiguration->HD44780_e = GPIO_UNASSIGNED;
|
||||||
CONFIGB(HD44780_db4) = GPIO_UNASSIGNED;
|
boardConfiguration->HD44780_db4 = GPIO_UNASSIGNED;
|
||||||
CONFIGB(HD44780_db5) = GPIO_UNASSIGNED;
|
boardConfiguration->HD44780_db5 = GPIO_UNASSIGNED;
|
||||||
CONFIGB(HD44780_db6) = GPIO_UNASSIGNED;
|
boardConfiguration->HD44780_db6 = GPIO_UNASSIGNED;
|
||||||
CONFIGB(HD44780_db7) = GPIO_UNASSIGNED;
|
boardConfiguration->HD44780_db7 = GPIO_UNASSIGNED;
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo: should this be renamed to 'setFrankensoConfiguration'?
|
// todo: should this be renamed to 'setFrankensoConfiguration'?
|
||||||
|
@ -85,9 +85,9 @@ void disableLCD(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
void setCustomEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
void setCustomEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->trigger.type = TT_ONE_PLUS_ONE;
|
engineConfiguration->trigger.type = TT_ONE_PLUS_ONE;
|
||||||
|
|
||||||
setFrankenso_01_LCD(PASS_ENGINE_PARAMETER_SIGNATURE);
|
setFrankenso_01_LCD(boardConfiguration);
|
||||||
commonFrankensoAnalogInputs(PASS_ENGINE_PARAMETER_SIGNATURE);
|
commonFrankensoAnalogInputs(engineConfiguration);
|
||||||
setFrankenso0_1_joystick(PASS_ENGINE_PARAMETER_SIGNATURE);
|
setFrankenso0_1_joystick(engineConfiguration);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Frankenso analog #1 PC2 ADC12 CLT
|
* Frankenso analog #1 PC2 ADC12 CLT
|
||||||
|
@ -133,28 +133,28 @@ void setCustomEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
// Frankenso low out #11: PB8 injector #3
|
// Frankenso low out #11: PB8 injector #3
|
||||||
// Frankenso low out #12: PB7 injector #4
|
// Frankenso low out #12: PB7 injector #4
|
||||||
|
|
||||||
CONFIGB(fuelPumpPin) = GPIOE_4;
|
boardConfiguration->fuelPumpPin = GPIOE_4;
|
||||||
CONFIGB(mainRelayPin) = GPIOD_7;
|
boardConfiguration->mainRelayPin = GPIOD_7;
|
||||||
CONFIGB(idle).solenoidPin = GPIOC_13;
|
boardConfiguration->idle.solenoidPin = GPIOC_13;
|
||||||
|
|
||||||
CONFIGB(fanPin) = GPIOE_5;
|
boardConfiguration->fanPin = GPIOE_5;
|
||||||
|
|
||||||
CONFIGB(injectionPins)[0] = GPIOB_9; // #1
|
boardConfiguration->injectionPins[0] = GPIOB_9; // #1
|
||||||
CONFIGB(injectionPins)[1] = GPIOE_2; // #2
|
boardConfiguration->injectionPins[1] = GPIOE_2; // #2
|
||||||
CONFIGB(injectionPins)[2] = GPIOB_8; // #3
|
boardConfiguration->injectionPins[2] = GPIOB_8; // #3
|
||||||
CONFIGB(injectionPins)[3] = GPIOB_7; // #4
|
boardConfiguration->injectionPins[3] = GPIOB_7; // #4
|
||||||
|
|
||||||
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_PARAMETER_SUFFIX);
|
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
#if EFI_PWM_TESTER
|
#if EFI_PWM_TESTER
|
||||||
CONFIGB(injectionPins)[4] = GPIOC_8; // #5
|
boardConfiguration->injectionPins[4] = GPIOC_8; // #5
|
||||||
CONFIGB(injectionPins)[5] = GPIOD_10; // #6
|
boardConfiguration->injectionPins[5] = GPIOD_10; // #6
|
||||||
CONFIGB(injectionPins)[6] = GPIOD_9;
|
boardConfiguration->injectionPins[6] = GPIOD_9;
|
||||||
CONFIGB(injectionPins)[7] = GPIOD_11;
|
boardConfiguration->injectionPins[7] = GPIOD_11;
|
||||||
CONFIGB(injectionPins)[8] = GPIOD_0;
|
boardConfiguration->injectionPins[8] = GPIOD_0;
|
||||||
CONFIGB(injectionPins)[9] = GPIOB_11;
|
boardConfiguration->injectionPins[9] = GPIOB_11;
|
||||||
CONFIGB(injectionPins)[10] = GPIOC_7;
|
boardConfiguration->injectionPins[10] = GPIOC_7;
|
||||||
CONFIGB(injectionPins)[11] = GPIOE_4;
|
boardConfiguration->injectionPins[11] = GPIOE_4;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* We want to initialize all outputs for test
|
* We want to initialize all outputs for test
|
||||||
|
@ -163,20 +163,20 @@ void setCustomEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
|
|
||||||
engineConfiguration->displayMode = DM_NONE;
|
engineConfiguration->displayMode = DM_NONE;
|
||||||
#else /* EFI_PWM_TESTER */
|
#else /* EFI_PWM_TESTER */
|
||||||
CONFIGB(injectionPins)[4] = GPIO_UNASSIGNED;
|
boardConfiguration->injectionPins[4] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(injectionPins)[5] = GPIO_UNASSIGNED;
|
boardConfiguration->injectionPins[5] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(injectionPins)[6] = GPIO_UNASSIGNED;
|
boardConfiguration->injectionPins[6] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(injectionPins)[7] = GPIO_UNASSIGNED;
|
boardConfiguration->injectionPins[7] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(injectionPins)[8] = GPIO_UNASSIGNED;
|
boardConfiguration->injectionPins[8] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(injectionPins)[9] = GPIO_UNASSIGNED;
|
boardConfiguration->injectionPins[9] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(injectionPins)[10] = GPIO_UNASSIGNED;
|
boardConfiguration->injectionPins[10] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(injectionPins)[11] = GPIO_UNASSIGNED;
|
boardConfiguration->injectionPins[11] = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
CONFIGB(ignitionPins)[0] = GPIOE_14;
|
boardConfiguration->ignitionPins[0] = GPIOE_14;
|
||||||
CONFIGB(ignitionPins)[1] = GPIOC_7;
|
boardConfiguration->ignitionPins[1] = GPIOC_7;
|
||||||
CONFIGB(ignitionPins)[2] = GPIOC_9;
|
boardConfiguration->ignitionPins[2] = GPIOC_9;
|
||||||
// set_ignition_pin 4 PE10
|
// set_ignition_pin 4 PE10
|
||||||
CONFIGB(ignitionPins)[3] = GPIOE_10;
|
boardConfiguration->ignitionPins[3] = GPIOE_10;
|
||||||
#endif /* EFI_PWM_TESTER */
|
#endif /* EFI_PWM_TESTER */
|
||||||
|
|
||||||
// todo: 8.2 or 10k?
|
// todo: 8.2 or 10k?
|
||||||
|
@ -192,7 +192,7 @@ void setFrankensoBoardTestConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
|
|
||||||
engineConfiguration->directSelfStimulation = true; // this engine type is used for board validation
|
engineConfiguration->directSelfStimulation = true; // this engine type is used for board validation
|
||||||
|
|
||||||
CONFIGB(triggerSimulatorFrequency) = 300;
|
boardConfiguration->triggerSimulatorFrequency = 300;
|
||||||
engineConfiguration->cranking.rpm = 100;
|
engineConfiguration->cranking.rpm = 100;
|
||||||
|
|
||||||
engineConfiguration->specs.cylindersCount = 12;
|
engineConfiguration->specs.cylindersCount = 12;
|
||||||
|
@ -201,38 +201,38 @@ void setFrankensoBoardTestConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
// set ignition_mode 1
|
// set ignition_mode 1
|
||||||
engineConfiguration->ignitionMode = IM_INDIVIDUAL_COILS;
|
engineConfiguration->ignitionMode = IM_INDIVIDUAL_COILS;
|
||||||
|
|
||||||
CONFIGB(injectionPins)[0] = GPIOB_7; // injector in default pinout
|
boardConfiguration->injectionPins[0] = GPIOB_7; // injector in default pinout
|
||||||
CONFIGB(injectionPins)[1] = GPIOB_8; // injector in default pinout
|
boardConfiguration->injectionPins[1] = GPIOB_8; // injector in default pinout
|
||||||
CONFIGB(injectionPins)[2] = GPIOB_9; // injector in default pinout
|
boardConfiguration->injectionPins[2] = GPIOB_9; // injector in default pinout
|
||||||
CONFIGB(injectionPins)[3] = GPIOC_13;
|
boardConfiguration->injectionPins[3] = GPIOC_13;
|
||||||
|
|
||||||
CONFIGB(injectionPins)[4] = GPIOD_3;
|
boardConfiguration->injectionPins[4] = GPIOD_3;
|
||||||
CONFIGB(injectionPins)[5] = GPIOD_5;
|
boardConfiguration->injectionPins[5] = GPIOD_5;
|
||||||
CONFIGB(injectionPins)[6] = GPIOD_7;
|
boardConfiguration->injectionPins[6] = GPIOD_7;
|
||||||
CONFIGB(injectionPins)[7] = GPIOE_2; // injector in default pinout
|
boardConfiguration->injectionPins[7] = GPIOE_2; // injector in default pinout
|
||||||
CONFIGB(injectionPins)[8] = GPIOE_3;
|
boardConfiguration->injectionPins[8] = GPIOE_3;
|
||||||
CONFIGB(injectionPins)[9] = GPIOE_4;
|
boardConfiguration->injectionPins[9] = GPIOE_4;
|
||||||
CONFIGB(injectionPins)[10] = GPIOE_5;
|
boardConfiguration->injectionPins[10] = GPIOE_5;
|
||||||
CONFIGB(injectionPins)[11] = GPIOE_6;
|
boardConfiguration->injectionPins[11] = GPIOE_6;
|
||||||
|
|
||||||
CONFIGB(fuelPumpPin) = GPIO_UNASSIGNED;
|
boardConfiguration->fuelPumpPin = GPIO_UNASSIGNED;
|
||||||
CONFIGB(mainRelayPin) = GPIO_UNASSIGNED;
|
boardConfiguration->mainRelayPin = GPIO_UNASSIGNED;
|
||||||
CONFIGB(idle).solenoidPin = GPIO_UNASSIGNED;
|
boardConfiguration->idle.solenoidPin = GPIO_UNASSIGNED;
|
||||||
CONFIGB(fanPin) = GPIO_UNASSIGNED;
|
boardConfiguration->fanPin = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
|
|
||||||
CONFIGB(ignitionPins)[0] = GPIOC_9; // coil in default pinout
|
boardConfiguration->ignitionPins[0] = GPIOC_9; // coil in default pinout
|
||||||
CONFIGB(ignitionPins)[1] = GPIOC_7; // coil in default pinout
|
boardConfiguration->ignitionPins[1] = GPIOC_7; // coil in default pinout
|
||||||
CONFIGB(ignitionPins)[2] = GPIOE_10; // coil in default pinout
|
boardConfiguration->ignitionPins[2] = GPIOE_10; // coil in default pinout
|
||||||
CONFIGB(ignitionPins)[3] = GPIOE_8; // Miata VVT tach
|
boardConfiguration->ignitionPins[3] = GPIOE_8; // Miata VVT tach
|
||||||
|
|
||||||
CONFIGB(ignitionPins)[4] = GPIOE_14; // coil in default pinout
|
boardConfiguration->ignitionPins[4] = GPIOE_14; // coil in default pinout
|
||||||
CONFIGB(ignitionPins)[5] = GPIOE_12;
|
boardConfiguration->ignitionPins[5] = GPIOE_12;
|
||||||
CONFIGB(ignitionPins)[6] = GPIOD_8;
|
boardConfiguration->ignitionPins[6] = GPIOD_8;
|
||||||
CONFIGB(ignitionPins)[7] = GPIOD_9;
|
boardConfiguration->ignitionPins[7] = GPIOD_9;
|
||||||
|
|
||||||
CONFIGB(ignitionPins)[8] = GPIOE_0; // brain board, not discovery
|
boardConfiguration->ignitionPins[8] = GPIOE_0; // brain board, not discovery
|
||||||
CONFIGB(ignitionPins)[9] = GPIOE_1; // brain board, not discovery
|
boardConfiguration->ignitionPins[9] = GPIOE_1; // brain board, not discovery
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,8 @@
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
void setCustomEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
void setCustomEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
void setFrankenso_01_LCD(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
void setFrankenso_01_LCD(board_configuration_s *boardConfiguration);
|
||||||
void disableLCD(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
void disableLCD(board_configuration_s *boardConfiguration);
|
||||||
void test557init(void);
|
void test557init(void);
|
||||||
|
|
||||||
void setFrankensoBoardTestConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
void setFrankensoBoardTestConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
|
@ -154,12 +154,12 @@ void setDodgeNeon1995EngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
// engineConfiguration->spi2MosiMode = PAL_STM32_OTYPE_OPENDRAIN; // 4
|
// engineConfiguration->spi2MosiMode = PAL_STM32_OTYPE_OPENDRAIN; // 4
|
||||||
// engineConfiguration->spi2MisoMode = PAL_STM32_PUDR_PULLUP; // 32
|
// engineConfiguration->spi2MisoMode = PAL_STM32_PUDR_PULLUP; // 32
|
||||||
|
|
||||||
// CONFIGB(spi2mosiPin) = GPIOB_15;
|
// boardConfiguration->spi2mosiPin = GPIOB_15;
|
||||||
// CONFIGB(spi2misoPin) = GPIOB_14;
|
// boardConfiguration->spi2misoPin = GPIOB_14;
|
||||||
// CONFIGB(spi2sckPin) = GPIOB_13;
|
// boardConfiguration->spi2sckPin = GPIOB_13;
|
||||||
CONFIGB(cj125CsPin) = GPIOB_0; // rev 0.4
|
boardConfiguration->cj125CsPin = GPIOB_0; // rev 0.4
|
||||||
CONFIGB(isCJ125Enabled) = true;
|
boardConfiguration->isCJ125Enabled = true;
|
||||||
CONFIGB(is_enabled_spi_2) = true;
|
boardConfiguration->is_enabled_spi_2 = true;
|
||||||
|
|
||||||
|
|
||||||
// set_rpm_hard_limit 4000
|
// set_rpm_hard_limit 4000
|
||||||
|
@ -223,28 +223,28 @@ void setDodgeNeon1995EngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
// Frankenstein: low side - out #11: PB8
|
// Frankenstein: low side - out #11: PB8
|
||||||
// Frankenstein: low side - out #12: PB9
|
// Frankenstein: low side - out #12: PB9
|
||||||
|
|
||||||
CONFIGB(injectionPins)[0] = GPIOB_9; // Frankenstein: low side - out #12
|
boardConfiguration->injectionPins[0] = GPIOB_9; // Frankenstein: low side - out #12
|
||||||
CONFIGB(injectionPins)[1] = GPIOB_8; // Frankenstein: low side - out #11
|
boardConfiguration->injectionPins[1] = GPIOB_8; // Frankenstein: low side - out #11
|
||||||
CONFIGB(injectionPins)[2] = GPIOE_3; // Frankenstein: low side - out #8
|
boardConfiguration->injectionPins[2] = GPIOE_3; // Frankenstein: low side - out #8
|
||||||
CONFIGB(injectionPins)[3] = GPIOE_5; // Frankenstein: low side - out #6
|
boardConfiguration->injectionPins[3] = GPIOE_5; // Frankenstein: low side - out #6
|
||||||
|
|
||||||
CONFIGB(fuelPumpPin) = GPIOC_13; // Frankenstein: low side - out #4
|
boardConfiguration->fuelPumpPin = GPIOC_13; // Frankenstein: low side - out #4
|
||||||
CONFIGB(fuelPumpPinMode) = OM_DEFAULT;
|
boardConfiguration->fuelPumpPinMode = OM_DEFAULT;
|
||||||
|
|
||||||
engineConfiguration->mapErrorDetectionTooHigh = 120;
|
engineConfiguration->mapErrorDetectionTooHigh = 120;
|
||||||
|
|
||||||
// set injection_pin_mode 0
|
// set injection_pin_mode 0
|
||||||
CONFIGB(injectionPinMode) = OM_DEFAULT;
|
boardConfiguration->injectionPinMode = OM_DEFAULT;
|
||||||
|
|
||||||
// Frankenstein: high side #1: PE8
|
// Frankenstein: high side #1: PE8
|
||||||
// Frankenstein: high side #2: PE10
|
// Frankenstein: high side #2: PE10
|
||||||
|
|
||||||
CONFIGB(ignitionPins)[0] = GPIOE_8; // Frankenstein: high side #1
|
boardConfiguration->ignitionPins[0] = GPIOE_8; // Frankenstein: high side #1
|
||||||
CONFIGB(ignitionPins)[1] = GPIO_UNASSIGNED;
|
boardConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(ignitionPins)[2] = GPIOE_10; // // Frankenstein: high side #2
|
boardConfiguration->ignitionPins[2] = GPIOE_10; // // Frankenstein: high side #2
|
||||||
|
|
||||||
// set ignition_pin_mode 0
|
// set ignition_pin_mode 0
|
||||||
CONFIGB(ignitionPinMode) = OM_DEFAULT;
|
boardConfiguration->ignitionPinMode = OM_DEFAULT;
|
||||||
|
|
||||||
setThermistorConfiguration(&engineConfiguration->clt, 0, 32500, 30, 7550, 100, 700);
|
setThermistorConfiguration(&engineConfiguration->clt, 0, 32500, 30, 7550, 100, 700);
|
||||||
engineConfiguration->clt.config.bias_resistor = 2700;
|
engineConfiguration->clt.config.bias_resistor = 2700;
|
||||||
|
@ -254,10 +254,10 @@ void setDodgeNeon1995EngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
|
|
||||||
void setDodgeNeonNGCEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
void setDodgeNeonNGCEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->trigger.type = TT_DODGE_NEON_2003_CAM;
|
engineConfiguration->trigger.type = TT_DODGE_NEON_2003_CAM;
|
||||||
setFrankenso_01_LCD(PASS_ENGINE_PARAMETER_SIGNATURE);
|
setFrankenso_01_LCD(boardConfiguration);
|
||||||
setFrankenso0_1_joystick(PASS_ENGINE_PARAMETER_SIGNATURE);
|
setFrankenso0_1_joystick(engineConfiguration);
|
||||||
|
|
||||||
// CONFIGB(useWarmupPidAfr) = true;
|
// boardConfiguration->useWarmupPidAfr = true;
|
||||||
engineConfiguration->warmupAfrPid.pFactor = -0.2;
|
engineConfiguration->warmupAfrPid.pFactor = -0.2;
|
||||||
engineConfiguration->warmupAfrPid.iFactor = -0.0005;
|
engineConfiguration->warmupAfrPid.iFactor = -0.0005;
|
||||||
// engineConfiguration->warmupAfrPid.dFactor = -0.02;
|
// engineConfiguration->warmupAfrPid.dFactor = -0.02;
|
||||||
|
@ -328,14 +328,14 @@ void setDodgeNeonNGCEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
|
|
||||||
setFuelTablesLoadBin(20, 120 PASS_ENGINE_PARAMETER_SUFFIX);
|
setFuelTablesLoadBin(20, 120 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
CONFIGB(malfunctionIndicatorPin) = GPIO_UNASSIGNED;
|
boardConfiguration->malfunctionIndicatorPin = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PA4 Wideband O2 Sensor
|
* PA4 Wideband O2 Sensor
|
||||||
*/
|
*/
|
||||||
engineConfiguration->afr.hwChannel = EFI_ADC_4;
|
engineConfiguration->afr.hwChannel = EFI_ADC_4;
|
||||||
|
|
||||||
commonFrankensoAnalogInputs(PASS_ENGINE_PARAMETER_SIGNATURE);
|
commonFrankensoAnalogInputs(engineConfiguration);
|
||||||
engineConfiguration->vbattDividerCoeff = 9.75;// ((float) (8.2 + 33)) / 8.2 * 2;
|
engineConfiguration->vbattDividerCoeff = 9.75;// ((float) (8.2 + 33)) / 8.2 * 2;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -354,29 +354,29 @@ void setDodgeNeonNGCEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
// Frankenso low out #11: PB8 injector #1
|
// Frankenso low out #11: PB8 injector #1
|
||||||
// Frankenso low out #12: PB7 injector #4
|
// Frankenso low out #12: PB7 injector #4
|
||||||
|
|
||||||
CONFIGB(fanPin) = GPIOD_7;
|
boardConfiguration->fanPin = GPIOD_7;
|
||||||
|
|
||||||
CONFIGB(injectionPins)[0] = GPIOB_8;
|
boardConfiguration->injectionPins[0] = GPIOB_8;
|
||||||
CONFIGB(injectionPins)[1] = GPIOB_9;
|
boardConfiguration->injectionPins[1] = GPIOB_9;
|
||||||
CONFIGB(injectionPins)[2] = GPIOE_2;
|
boardConfiguration->injectionPins[2] = GPIOE_2;
|
||||||
CONFIGB(injectionPins)[3] = GPIOB_7;
|
boardConfiguration->injectionPins[3] = GPIOB_7;
|
||||||
|
|
||||||
CONFIGB(ignitionPins)[0] = GPIOC_9;
|
boardConfiguration->ignitionPins[0] = GPIOC_9;
|
||||||
CONFIGB(ignitionPins)[1] = GPIO_UNASSIGNED;
|
boardConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(ignitionPins)[2] = GPIOE_8;
|
boardConfiguration->ignitionPins[2] = GPIOE_8;
|
||||||
CONFIGB(ignitionPins)[3] = GPIO_UNASSIGNED;
|
boardConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
CONFIGB(mainRelayPin) = GPIOE_6;
|
boardConfiguration->mainRelayPin = GPIOE_6;
|
||||||
|
|
||||||
CONFIGB(idle).solenoidPin = GPIOC_13;
|
boardConfiguration->idle.solenoidPin = GPIOC_13;
|
||||||
CONFIGB(idle).solenoidFrequency = 300;
|
boardConfiguration->idle.solenoidFrequency = 300;
|
||||||
CONFIGB(manIdlePosition) = 36;
|
boardConfiguration->manIdlePosition = 36;
|
||||||
|
|
||||||
CONFIGB(fuelPumpPin) = GPIOE_3;
|
boardConfiguration->fuelPumpPin = GPIOE_3;
|
||||||
CONFIGB(fuelPumpPinMode) = OM_DEFAULT;
|
boardConfiguration->fuelPumpPinMode = OM_DEFAULT;
|
||||||
|
|
||||||
CONFIGB(triggerInputPins)[0] = GPIOA_5;
|
boardConfiguration->triggerInputPins[0] = GPIOA_5;
|
||||||
CONFIGB(triggerInputPins)[1] = GPIOC_6;
|
boardConfiguration->triggerInputPins[1] = GPIOC_6;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Frankenso analog #1 PC2 ADC12 CLT
|
* Frankenso analog #1 PC2 ADC12 CLT
|
||||||
|
@ -427,8 +427,8 @@ void setDodgeNeonNGCEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
*/
|
*/
|
||||||
engineConfiguration->clt.adcChannel = EFI_ADC_12;
|
engineConfiguration->clt.adcChannel = EFI_ADC_12;
|
||||||
|
|
||||||
CONFIGB(sensorChartMode) = SC_MAP;
|
boardConfiguration->sensorChartMode = SC_MAP;
|
||||||
CONFIGB(isFastAdcEnabled) = true;
|
boardConfiguration->isFastAdcEnabled = true;
|
||||||
engineConfiguration->map.sensor.type = MT_DODGE_NEON_2003;
|
engineConfiguration->map.sensor.type = MT_DODGE_NEON_2003;
|
||||||
|
|
||||||
engineConfiguration->hip9011Gain = 0.3;
|
engineConfiguration->hip9011Gain = 0.3;
|
||||||
|
@ -447,10 +447,10 @@ void setDodgeNeonNGCEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
|
|
||||||
engineConfiguration->cylinderBore = 87.5;
|
engineConfiguration->cylinderBore = 87.5;
|
||||||
|
|
||||||
CONFIGB(clutchDownPin) = GPIOC_12;
|
boardConfiguration->clutchDownPin = GPIOC_12;
|
||||||
CONFIGB(clutchDownPinMode) = PI_PULLUP;
|
boardConfiguration->clutchDownPinMode = PI_PULLUP;
|
||||||
// CONFIGB(clutchUpPin) = GPIOA_14; // note SWCLK - conflict with SWD
|
// boardConfiguration->clutchUpPin = GPIOA_14; // note SWCLK - conflict with SWD
|
||||||
CONFIGB(clutchUpPinMode) = PI_PULLUP;
|
boardConfiguration->clutchUpPinMode = PI_PULLUP;
|
||||||
|
|
||||||
engineConfiguration->activateAuxPid1 = 1;
|
engineConfiguration->activateAuxPid1 = 1;
|
||||||
engineConfiguration->auxPidPins[0] = GPIOD_5; // playing with AUX PID for alternator
|
engineConfiguration->auxPidPins[0] = GPIOD_5; // playing with AUX PID for alternator
|
||||||
|
@ -467,22 +467,22 @@ void setDodgeNeonNGCEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
// /**
|
// /**
|
||||||
// * set_fsio_setting 1 0.55
|
// * set_fsio_setting 1 0.55
|
||||||
// */
|
// */
|
||||||
// CONFIGB(fsio_setting)[0] = 0.55;
|
// boardConfiguration->fsio_setting[0] = 0.55;
|
||||||
// setFsioExt(0, GPIOE_5, "0 fsio_setting", 400 PASS_ENGINE_PARAMETER_SUFFIX);
|
// setFsioExt(0, GPIOE_5, "0 fsio_setting", 400 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CONFIGB(vehicleSpeedSensorInputPin) = GPIOA_8;
|
boardConfiguration->vehicleSpeedSensorInputPin = GPIOA_8;
|
||||||
|
|
||||||
engineConfiguration->fanOnTemperature = 92;
|
engineConfiguration->fanOnTemperature = 92;
|
||||||
engineConfiguration->fanOffTemperature = 89;
|
engineConfiguration->fanOffTemperature = 89;
|
||||||
// engineConfiguration->fanOnTemperature = 115; // knock testing - value is a bit high
|
// engineConfiguration->fanOnTemperature = 115; // knock testing - value is a bit high
|
||||||
// engineConfiguration->fanOffTemperature = 100;
|
// engineConfiguration->fanOffTemperature = 100;
|
||||||
|
|
||||||
// CONFIGB(tunerStudioSerialSpeed) = 9600;
|
// boardConfiguration->tunerStudioSerialSpeed = 9600;
|
||||||
CONFIGB(tunerStudioSerialSpeed) = 19200;
|
boardConfiguration->tunerStudioSerialSpeed = 19200;
|
||||||
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_PARAMETER_SUFFIX);
|
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
//temp CONFIGB(alternatorControlPin) = GPIOD_5;
|
//temp boardConfiguration->alternatorControlPin = GPIOD_5;
|
||||||
engineConfiguration->targetVBatt = 14.0;
|
engineConfiguration->targetVBatt = 14.0;
|
||||||
engineConfiguration->alternatorControl.offset = 20;
|
engineConfiguration->alternatorControl.offset = 20;
|
||||||
engineConfiguration->alternatorControl.pFactor = 20;
|
engineConfiguration->alternatorControl.pFactor = 20;
|
||||||
|
@ -508,8 +508,8 @@ void setDodgeNeonNGCEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->wwaeTau = 0;
|
engineConfiguration->wwaeTau = 0;
|
||||||
engineConfiguration->wwaeBeta = 0;
|
engineConfiguration->wwaeBeta = 0;
|
||||||
|
|
||||||
CONFIGB(isSdCardEnabled) = false;
|
boardConfiguration->isSdCardEnabled = false;
|
||||||
CONFIGB(manIdlePosition) = 36; // set_idle_pwm 40
|
boardConfiguration->manIdlePosition = 36; // set_idle_pwm 40
|
||||||
|
|
||||||
engineConfiguration->slowAdcAlpha = 0.33333;
|
engineConfiguration->slowAdcAlpha = 0.33333;
|
||||||
|
|
||||||
|
|
|
@ -36,27 +36,27 @@ void setDodgeRam1996(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->specs.firingOrder = FO_1_8_4_3_6_5_7_2;
|
engineConfiguration->specs.firingOrder = FO_1_8_4_3_6_5_7_2;
|
||||||
engineConfiguration->specs.displacement = 5.2;
|
engineConfiguration->specs.displacement = 5.2;
|
||||||
|
|
||||||
CONFIGB(triggerInputPins)[0] = GPIOC_6;
|
boardConfiguration->triggerInputPins[0] = GPIOC_6;
|
||||||
CONFIGB(triggerInputPins)[1] = GPIOA_5;
|
boardConfiguration->triggerInputPins[1] = GPIOA_5;
|
||||||
|
|
||||||
CONFIGB(injectionPins)[0] = GPIOE_2;
|
boardConfiguration->injectionPins[0] = GPIOE_2;
|
||||||
CONFIGB(injectionPins)[1] = GPIOB_9;
|
boardConfiguration->injectionPins[1] = GPIOB_9;
|
||||||
CONFIGB(injectionPins)[2] = GPIOD_5;
|
boardConfiguration->injectionPins[2] = GPIOD_5;
|
||||||
CONFIGB(injectionPins)[3] = GPIOB_8;
|
boardConfiguration->injectionPins[3] = GPIOB_8;
|
||||||
|
|
||||||
CONFIGB(injectionPins)[4] = GPIOB_7;
|
boardConfiguration->injectionPins[4] = GPIOB_7;
|
||||||
CONFIGB(injectionPins)[5] = GPIOE_3;
|
boardConfiguration->injectionPins[5] = GPIOE_3;
|
||||||
CONFIGB(injectionPins)[6] = GPIOE_4;
|
boardConfiguration->injectionPins[6] = GPIOE_4;
|
||||||
CONFIGB(injectionPins)[7] = GPIOD_3;
|
boardConfiguration->injectionPins[7] = GPIOD_3;
|
||||||
|
|
||||||
CONFIGB(ignitionPins)[0] = GPIOC_9;
|
boardConfiguration->ignitionPins[0] = GPIOC_9;
|
||||||
CONFIGB(ignitionPins)[1] = GPIO_UNASSIGNED;
|
boardConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(ignitionPins)[2] = GPIO_UNASSIGNED;
|
boardConfiguration->ignitionPins[2] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(ignitionPins)[3] = GPIO_UNASSIGNED;
|
boardConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
CONFIGB(mainRelayPin) = GPIOE_5;
|
boardConfiguration->mainRelayPin = GPIOE_5;
|
||||||
CONFIGB(fuelPumpPin) = GPIOE_6;
|
boardConfiguration->fuelPumpPin = GPIOE_6;
|
||||||
CONFIGB(fanPin) = GPIO_UNASSIGNED;
|
boardConfiguration->fanPin = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
engineConfiguration->engineChartSize = 450;
|
engineConfiguration->engineChartSize = 450;
|
||||||
|
|
||||||
|
@ -72,11 +72,11 @@ void setDodgeRam1996(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
setWholeTimingTable(10 PASS_ENGINE_PARAMETER_SUFFIX);
|
setWholeTimingTable(10 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
|
|
||||||
CONFIGB(alternatorControlPin) = GPIOD_7;
|
boardConfiguration->alternatorControlPin = GPIOD_7;
|
||||||
engineConfiguration->alternatorControl.pFactor = 22;
|
engineConfiguration->alternatorControl.pFactor = 22;
|
||||||
|
|
||||||
CONFIGB(idle).solenoidPin = GPIOC_13;
|
boardConfiguration->idle.solenoidPin = GPIOC_13;
|
||||||
CONFIGB(idle).solenoidFrequency = 300;
|
boardConfiguration->idle.solenoidFrequency = 300;
|
||||||
|
|
||||||
engineConfiguration->vbattAdcChannel = EFI_ADC_14;
|
engineConfiguration->vbattAdcChannel = EFI_ADC_14;
|
||||||
// engineConfiguration->vbattDividerCoeff = ((float) (8.93 + 41.27)) / 8.93 * 2;
|
// engineConfiguration->vbattDividerCoeff = ((float) (8.93 + 41.27)) / 8.93 * 2;
|
||||||
|
@ -88,5 +88,5 @@ void setDodgeRam1996(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
setDodgeSensor(&engineConfiguration->iat);
|
setDodgeSensor(&engineConfiguration->iat);
|
||||||
engineConfiguration->iat.config.bias_resistor = 2700;
|
engineConfiguration->iat.config.bias_resistor = 2700;
|
||||||
|
|
||||||
CONFIGB(useStepperIdle) = true;
|
boardConfiguration->useStepperIdle = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,12 +23,12 @@ void setDodgeStratus(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_PARAMETER_SUFFIX);
|
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
engineConfiguration->ignitionMode = IM_INDIVIDUAL_COILS;
|
engineConfiguration->ignitionMode = IM_INDIVIDUAL_COILS;
|
||||||
|
|
||||||
CONFIGB(ignitionPins)[0] = GPIOC_9;
|
boardConfiguration->ignitionPins[0] = GPIOC_9;
|
||||||
CONFIGB(ignitionPins)[1] = GPIO_UNASSIGNED;
|
boardConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(ignitionPins)[2] = GPIOE_8;
|
boardConfiguration->ignitionPins[2] = GPIOE_8;
|
||||||
CONFIGB(ignitionPins)[3] = GPIO_UNASSIGNED;
|
boardConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(ignitionPins)[4] = GPIO_UNASSIGNED;
|
boardConfiguration->ignitionPins[4] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(ignitionPins)[5] = GPIO_UNASSIGNED;
|
boardConfiguration->ignitionPins[5] = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -85,13 +85,13 @@ void setFordInline6(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
// output 5 is PC13
|
// output 5 is PC13
|
||||||
// output 6 is PC15
|
// output 6 is PC15
|
||||||
|
|
||||||
CONFIGB(fuelPumpPin) = GPIOC_13;
|
boardConfiguration->fuelPumpPin = GPIOC_13;
|
||||||
CONFIGB(injectionPins)[0] = GPIOB_9;
|
boardConfiguration->injectionPins[0] = GPIOB_9;
|
||||||
CONFIGB(injectionPins)[1] = GPIOE_3;
|
boardConfiguration->injectionPins[1] = GPIOE_3;
|
||||||
CONFIGB(ignitionPins)[0] = GPIOC_15;
|
boardConfiguration->ignitionPins[0] = GPIOC_15;
|
||||||
|
|
||||||
CONFIGB(injectionPins)[2] = GPIO_UNASSIGNED;
|
boardConfiguration->injectionPins[2] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(fanPin) = GPIO_UNASSIGNED;
|
boardConfiguration->fanPin = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
engineConfiguration->tpsMin = convertVoltageTo10bitADC(1.250);
|
engineConfiguration->tpsMin = convertVoltageTo10bitADC(1.250);
|
||||||
engineConfiguration->tpsMax = convertVoltageTo10bitADC(4.538);
|
engineConfiguration->tpsMax = convertVoltageTo10bitADC(4.538);
|
||||||
|
@ -99,10 +99,10 @@ void setFordInline6(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
// engineConfiguration->vbattAdcChannel = 0; //
|
// engineConfiguration->vbattAdcChannel = 0; //
|
||||||
engineConfiguration->mafAdcChannel = EFI_ADC_1;
|
engineConfiguration->mafAdcChannel = EFI_ADC_1;
|
||||||
|
|
||||||
CONFIGB(triggerInputPins)[0] = GPIOA_8;
|
boardConfiguration->triggerInputPins[0] = GPIOA_8;
|
||||||
CONFIGB(triggerInputPins)[1] = GPIOA_5;
|
boardConfiguration->triggerInputPins[1] = GPIOA_5;
|
||||||
CONFIGB(logicAnalyzerPins)[0] = GPIOC_6;
|
boardConfiguration->logicAnalyzerPins[0] = GPIOC_6;
|
||||||
CONFIGB(logicAnalyzerPins)[1] = GPIOE_5;
|
boardConfiguration->logicAnalyzerPins[1] = GPIOE_5;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* EFI_SUPPORT_1995_FORD_INLINE_6 */
|
#endif /* EFI_SUPPORT_1995_FORD_INLINE_6 */
|
||||||
|
|
|
@ -120,8 +120,8 @@ void setFordAspireEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->useOnlyRisingEdgeForTrigger = true;
|
engineConfiguration->useOnlyRisingEdgeForTrigger = true;
|
||||||
engineConfiguration->trigger.type = TT_FORD_ASPIRE;
|
engineConfiguration->trigger.type = TT_FORD_ASPIRE;
|
||||||
|
|
||||||
CONFIGB(injectionPins)[4] = GPIO_UNASSIGNED;
|
boardConfiguration->injectionPins[4] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(injectionPins)[5] = GPIO_UNASSIGNED;
|
boardConfiguration->injectionPins[5] = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
engineConfiguration->HD44780width = 20;
|
engineConfiguration->HD44780width = 20;
|
||||||
engineConfiguration->HD44780height = 4;
|
engineConfiguration->HD44780height = 4;
|
||||||
|
|
|
@ -69,10 +69,10 @@ EXTERN_ENGINE;
|
||||||
void setFordEscortGt(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
void setFordEscortGt(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->trigger.type = TT_MAZDA_DOHC_1_4;
|
engineConfiguration->trigger.type = TT_MAZDA_DOHC_1_4;
|
||||||
|
|
||||||
common079721_2351(PASS_ENGINE_PARAMETER_SIGNATURE);
|
common079721_2351(engineConfiguration, boardConfiguration);
|
||||||
|
|
||||||
setFrankenso_01_LCD(PASS_ENGINE_PARAMETER_SIGNATURE);
|
setFrankenso_01_LCD(boardConfiguration);
|
||||||
setFrankenso0_1_joystick(PASS_ENGINE_PARAMETER_SIGNATURE);
|
setFrankenso0_1_joystick(engineConfiguration);
|
||||||
|
|
||||||
setDensoTODO(config);
|
setDensoTODO(config);
|
||||||
|
|
||||||
|
@ -104,21 +104,21 @@ void setFordEscortGt(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
|
|
||||||
copyFuelTable(racingFestivaVeTable, config->veTable);
|
copyFuelTable(racingFestivaVeTable, config->veTable);
|
||||||
|
|
||||||
// CONFIGB(triggerInputPins)[0] = GPIOC_6; // 2G YEL/BLU
|
// boardConfiguration->triggerInputPins[0] = GPIOC_6; // 2G YEL/BLU
|
||||||
// CONFIGB(triggerInputPins)[1] = GPIOA_5; // 2E White CKP
|
// boardConfiguration->triggerInputPins[1] = GPIOA_5; // 2E White CKP
|
||||||
|
|
||||||
// in case of SOHC distributor we only have one signal
|
// in case of SOHC distributor we only have one signal
|
||||||
// CONFIGB(triggerInputPins)[0] = GPIOA_5; // 2E White CKP
|
// boardConfiguration->triggerInputPins[0] = GPIOA_5; // 2E White CKP
|
||||||
// CONFIGB(triggerInputPins)[1] = GPIO_UNASSIGNED;
|
// boardConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
// in case of DOHC distributor we have two signals
|
// in case of DOHC distributor we have two signals
|
||||||
CONFIGB(triggerInputPins)[0] = GPIOC_6;
|
boardConfiguration->triggerInputPins[0] = GPIOC_6;
|
||||||
CONFIGB(triggerInputPins)[1] = GPIOA_5; // 2E White CKP
|
boardConfiguration->triggerInputPins[1] = GPIOA_5; // 2E White CKP
|
||||||
|
|
||||||
// Denso 195500-2180
|
// Denso 195500-2180
|
||||||
engineConfiguration->injector.flow = 265;
|
engineConfiguration->injector.flow = 265;
|
||||||
|
|
||||||
CONFIGB(isFastAdcEnabled) = true;
|
boardConfiguration->isFastAdcEnabled = true;
|
||||||
engineConfiguration->map.sensor.type = MT_DENSO183;
|
engineConfiguration->map.sensor.type = MT_DENSO183;
|
||||||
engineConfiguration->map.sensor.hwChannel = EFI_ADC_4;
|
engineConfiguration->map.sensor.hwChannel = EFI_ADC_4;
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ void setFordEscortGt(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->afr.hwChannel = EFI_ADC_2; // Frankenso analog #5 // PA2
|
engineConfiguration->afr.hwChannel = EFI_ADC_2; // Frankenso analog #5 // PA2
|
||||||
|
|
||||||
// set_idle_position 10
|
// set_idle_position 10
|
||||||
CONFIGB(manIdlePosition) = 10;
|
boardConfiguration->manIdlePosition = 10;
|
||||||
engineConfiguration->crankingIACposition = 65;
|
engineConfiguration->crankingIACposition = 65;
|
||||||
|
|
||||||
setWholeIatCorrTimingTable(0 PASS_ENGINE_PARAMETER_SUFFIX);
|
setWholeIatCorrTimingTable(0 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
@ -155,8 +155,8 @@ void setFordEscortGt(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
setSingleCoilDwell(engineConfiguration);
|
setSingleCoilDwell(engineConfiguration);
|
||||||
engineConfiguration->ignitionMode = IM_ONE_COIL;
|
engineConfiguration->ignitionMode = IM_ONE_COIL;
|
||||||
|
|
||||||
CONFIGB(triggerSimulatorPinModes)[0] = OM_OPENDRAIN;
|
boardConfiguration->triggerSimulatorPinModes[0] = OM_OPENDRAIN;
|
||||||
CONFIGB(triggerSimulatorPinModes)[1] = OM_OPENDRAIN;
|
boardConfiguration->triggerSimulatorPinModes[1] = OM_OPENDRAIN;
|
||||||
|
|
||||||
// individual coils
|
// individual coils
|
||||||
// W6 PC9
|
// W6 PC9
|
||||||
|
@ -164,11 +164,11 @@ void setFordEscortGt(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
// W12 PE8
|
// W12 PE8
|
||||||
// W13 PE12
|
// W13 PE12
|
||||||
|
|
||||||
CONFIGB(ignitionPins)[0] = GPIOC_9;
|
boardConfiguration->ignitionPins[0] = GPIOC_9;
|
||||||
CONFIGB(ignitionPins)[1] = GPIOC_7;
|
boardConfiguration->ignitionPins[1] = GPIOC_7;
|
||||||
CONFIGB(ignitionPins)[2] = GPIOE_8;
|
boardConfiguration->ignitionPins[2] = GPIOE_8;
|
||||||
CONFIGB(ignitionPins)[3] = GPIOE_12;
|
boardConfiguration->ignitionPins[3] = GPIOE_12;
|
||||||
CONFIGB(ignitionPinMode) = OM_DEFAULT;
|
boardConfiguration->ignitionPinMode = OM_DEFAULT;
|
||||||
|
|
||||||
engineConfiguration->ignitionMode = IM_INDIVIDUAL_COILS;
|
engineConfiguration->ignitionMode = IM_INDIVIDUAL_COILS;
|
||||||
|
|
||||||
|
@ -190,23 +190,23 @@ void setFordEscortGt(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
// Frankenso low out #11: PB8
|
// Frankenso low out #11: PB8
|
||||||
// Frankenso low out #12: PB7
|
// Frankenso low out #12: PB7
|
||||||
|
|
||||||
CONFIGB(injectionPins)[0] = GPIOD_3;
|
boardConfiguration->injectionPins[0] = GPIOD_3;
|
||||||
CONFIGB(injectionPins)[1] = GPIOE_2;
|
boardConfiguration->injectionPins[1] = GPIOE_2;
|
||||||
|
|
||||||
|
|
||||||
//setDefaultCrankingFuel(engineConfiguration);
|
//setDefaultCrankingFuel(engineConfiguration);
|
||||||
engineConfiguration->cranking.baseFuel = 5;
|
engineConfiguration->cranking.baseFuel = 5;
|
||||||
|
|
||||||
// 40% idle is good default
|
// 40% idle is good default
|
||||||
CONFIGB(idle).solenoidFrequency = 300;
|
boardConfiguration->idle.solenoidFrequency = 300;
|
||||||
CONFIGB(idle).solenoidPin = GPIOB_9;
|
boardConfiguration->idle.solenoidPin = GPIOB_9;
|
||||||
|
|
||||||
CONFIGB(malfunctionIndicatorPin) = GPIOE_5;
|
boardConfiguration->malfunctionIndicatorPin = GPIOE_5;
|
||||||
CONFIGB(malfunctionIndicatorPinMode) = OM_DEFAULT;
|
boardConfiguration->malfunctionIndicatorPinMode = OM_DEFAULT;
|
||||||
|
|
||||||
CONFIGB(tunerStudioSerialSpeed) = 19200;
|
boardConfiguration->tunerStudioSerialSpeed = 19200;
|
||||||
|
|
||||||
commonFrankensoAnalogInputs(PASS_ENGINE_PARAMETER_SIGNATURE);
|
commonFrankensoAnalogInputs(engineConfiguration);
|
||||||
setCommonNTCSensor(&engineConfiguration->clt);
|
setCommonNTCSensor(&engineConfiguration->clt);
|
||||||
engineConfiguration->clt.config.bias_resistor = 2700;
|
engineConfiguration->clt.config.bias_resistor = 2700;
|
||||||
setCommonNTCSensor(&engineConfiguration->iat);
|
setCommonNTCSensor(&engineConfiguration->iat);
|
||||||
|
@ -230,7 +230,7 @@ void setFordEscortGt(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
* to test
|
* to test
|
||||||
* set_fsio_setting 1 5000
|
* set_fsio_setting 1 5000
|
||||||
*/
|
*/
|
||||||
CONFIGB(fsio_setting)[0] = 5000;
|
boardConfiguration->fsio_setting[0] = 5000;
|
||||||
// set_fsio_expression 1 "rpm > fsio_setting(1)"
|
// set_fsio_expression 1 "rpm > fsio_setting(1)"
|
||||||
setFsioExt(0, GPIOE_3, RPM_ABOVE_USER_SETTING_1, 150 PASS_ENGINE_PARAMETER_SUFFIX);
|
setFsioExt(0, GPIOE_3, RPM_ABOVE_USER_SETTING_1, 150 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
|
@ -246,9 +246,9 @@ void setFordEscortGt(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
* set_rpn_expression 1 "rpm 0 fsio_setting > coolant 1 fsio_setting > | vbatt 2 fsio_setting < |"
|
* set_rpn_expression 1 "rpm 0 fsio_setting > coolant 1 fsio_setting > | vbatt 2 fsio_setting < |"
|
||||||
* eval "rpm 0 fsio_setting > coolant 1 fsio_setting > | vbatt 2 fsio_setting < |"
|
* eval "rpm 0 fsio_setting > coolant 1 fsio_setting > | vbatt 2 fsio_setting < |"
|
||||||
*/
|
*/
|
||||||
CONFIGB(fsio_setting)[1] = 6200; // RPM threshold
|
boardConfiguration->fsio_setting[1] = 6200; // RPM threshold
|
||||||
CONFIGB(fsio_setting)[2] = 90; // CLT threshold
|
boardConfiguration->fsio_setting[2] = 90; // CLT threshold
|
||||||
CONFIGB(fsio_setting)[3] = 13.5; // voltage threshold
|
boardConfiguration->fsio_setting[3] = 13.5; // voltage threshold
|
||||||
|
|
||||||
// setFsio(1, GPIOC_13, "rpm 2 fsio_setting > coolant 3 fsio_setting > | vbatt 4 fsio_setting < |" PASS_ENGINE_PARAMETER_SUFFIX);
|
// setFsio(1, GPIOC_13, "rpm 2 fsio_setting > coolant 3 fsio_setting > | vbatt 4 fsio_setting < |" PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
setFsio(1, GPIOD_7, RPM_ABOVE_USER_SETTING_2 PASS_ENGINE_PARAMETER_SUFFIX);
|
setFsio(1, GPIOD_7, RPM_ABOVE_USER_SETTING_2 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
@ -272,7 +272,7 @@ void setFordEscortGt(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
config->ignitionRpmBins[15] = 7000;
|
config->ignitionRpmBins[15] = 7000;
|
||||||
copyTimingTable(racingFestivaIgnitionTable, config->ignitionTable);
|
copyTimingTable(racingFestivaIgnitionTable, config->ignitionTable);
|
||||||
|
|
||||||
// CONFIGB(useWarmupPidAfr) = true;
|
// boardConfiguration->useWarmupPidAfr = true;
|
||||||
engineConfiguration->warmupAfrPid.pFactor = -0.2;
|
engineConfiguration->warmupAfrPid.pFactor = -0.2;
|
||||||
engineConfiguration->warmupAfrPid.iFactor = -0.0005;
|
engineConfiguration->warmupAfrPid.iFactor = -0.0005;
|
||||||
// engineConfiguration->warmupAfrPid.dFactor = -0.02;
|
// engineConfiguration->warmupAfrPid.dFactor = -0.02;
|
||||||
|
@ -284,7 +284,7 @@ void setFordEscortGt(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->engineLoadAccelEnrichmentThreshold = 5.0;
|
engineConfiguration->engineLoadAccelEnrichmentThreshold = 5.0;
|
||||||
engineConfiguration->engineLoadAccelEnrichmentMultiplier = 1;
|
engineConfiguration->engineLoadAccelEnrichmentMultiplier = 1;
|
||||||
|
|
||||||
CONFIGB(isSdCardEnabled) = true;
|
boardConfiguration->isSdCardEnabled = true;
|
||||||
|
|
||||||
// engineConfiguration->useFSIO16ForTimingAdjustment = true;
|
// engineConfiguration->useFSIO16ForTimingAdjustment = true;
|
||||||
engineConfiguration->fsioAdc[0] = EFI_ADC_12; // PA3
|
engineConfiguration->fsioAdc[0] = EFI_ADC_12; // PA3
|
||||||
|
|
|
@ -32,10 +32,10 @@ void setFordFiestaDefaultEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE)
|
||||||
|
|
||||||
|
|
||||||
// etb testing
|
// etb testing
|
||||||
// CONFIGB(clutchUpPin)
|
// boardConfiguration->clutchUpPin
|
||||||
CONFIGB(etbControlPin1) = GPIOD_3;
|
boardConfiguration->etbControlPin1 = GPIOD_3;
|
||||||
engineConfiguration->pedalPositionAdcChannel = EFI_ADC_1;
|
engineConfiguration->pedalPositionAdcChannel = EFI_ADC_1;
|
||||||
CONFIGB(etbDirectionPin2) = GPIOD_5;
|
boardConfiguration->etbDirectionPin2 = GPIOD_5;
|
||||||
|
|
||||||
engineConfiguration->tpsMin = 337;
|
engineConfiguration->tpsMin = 337;
|
||||||
engineConfiguration->tpsMax = 896;
|
engineConfiguration->tpsMax = 896;
|
||||||
|
|
|
@ -17,6 +17,6 @@ void setGm2_2(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
setOperationMode(engineConfiguration, FOUR_STROKE_CAM_SENSOR);
|
setOperationMode(engineConfiguration, FOUR_STROKE_CAM_SENSOR);
|
||||||
engineConfiguration->trigger.type = TT_ONE_PLUS_TOOTHED_WHEEL_60_2;
|
engineConfiguration->trigger.type = TT_ONE_PLUS_TOOTHED_WHEEL_60_2;
|
||||||
|
|
||||||
CONFIGB(triggerInputPins)[0] = GPIOC_6;
|
boardConfiguration->triggerInputPins[0] = GPIOC_6;
|
||||||
CONFIGB(triggerInputPins)[1] = GPIOA_8;
|
boardConfiguration->triggerInputPins[1] = GPIOA_8;
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,8 +64,8 @@ void setHonda600(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->fuelAlgorithm = LM_ALPHA_N;
|
engineConfiguration->fuelAlgorithm = LM_ALPHA_N;
|
||||||
|
|
||||||
// upside down wiring
|
// upside down wiring
|
||||||
CONFIGB(triggerInputPins)[0] = GPIOA_5;
|
boardConfiguration->triggerInputPins[0] = GPIOA_5;
|
||||||
CONFIGB(triggerInputPins)[1] = GPIOC_6;
|
boardConfiguration->triggerInputPins[1] = GPIOC_6;
|
||||||
|
|
||||||
|
|
||||||
// set global_trigger_offset_angle 180
|
// set global_trigger_offset_angle 180
|
||||||
|
@ -85,9 +85,9 @@ void setHonda600(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
|
|
||||||
//setIndividualCoilsIgnition();
|
//setIndividualCoilsIgnition();
|
||||||
|
|
||||||
setFrankenso_01_LCD(PASS_ENGINE_PARAMETER_SIGNATURE);
|
setFrankenso_01_LCD(boardConfiguration);
|
||||||
commonFrankensoAnalogInputs(PASS_ENGINE_PARAMETER_SIGNATURE);
|
commonFrankensoAnalogInputs(engineConfiguration);
|
||||||
setFrankenso0_1_joystick(PASS_ENGINE_PARAMETER_SIGNATURE);
|
setFrankenso0_1_joystick(engineConfiguration);
|
||||||
setMap(config->injectionPhase, 320);
|
setMap(config->injectionPhase, 320);
|
||||||
/**
|
/**
|
||||||
* Frankenso analog #1 PC2 ADC12 CLT
|
* Frankenso analog #1 PC2 ADC12 CLT
|
||||||
|
@ -133,33 +133,33 @@ void setHonda600(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
// Frankenso low out #11: PB8 injector #3
|
// Frankenso low out #11: PB8 injector #3
|
||||||
// Frankenso low out #12: PB7 injector #4
|
// Frankenso low out #12: PB7 injector #4
|
||||||
|
|
||||||
CONFIGB(fuelPumpPin) = GPIOE_4;
|
boardConfiguration->fuelPumpPin = GPIOE_4;
|
||||||
CONFIGB(mainRelayPin) = GPIOD_7;
|
boardConfiguration->mainRelayPin = GPIOD_7;
|
||||||
CONFIGB(idle).solenoidPin = GPIOC_13;
|
boardConfiguration->idle.solenoidPin = GPIOC_13;
|
||||||
|
|
||||||
CONFIGB(fanPin) = GPIOE_5;
|
boardConfiguration->fanPin = GPIOE_5;
|
||||||
|
|
||||||
CONFIGB(injectionPins)[0] = GPIOB_9; // #1
|
boardConfiguration->injectionPins[0] = GPIOB_9; // #1
|
||||||
CONFIGB(injectionPins)[1] = GPIOD_5; // #2
|
boardConfiguration->injectionPins[1] = GPIOD_5; // #2
|
||||||
CONFIGB(injectionPins)[2] = GPIOB_7; // #3
|
boardConfiguration->injectionPins[2] = GPIOB_7; // #3
|
||||||
CONFIGB(injectionPins)[3] = GPIOB_8; // #4
|
boardConfiguration->injectionPins[3] = GPIOB_8; // #4
|
||||||
|
|
||||||
setDefaultCustomMaps(PASS_ENGINE_PARAMETER_SIGNATURE);
|
setDefaultCustomMaps(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
setAlgorithm(LM_ALPHA_N PASS_ENGINE_PARAMETER_SUFFIX);
|
setAlgorithm(LM_ALPHA_N PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
CONFIGB(injectionPins)[4] = GPIO_UNASSIGNED;
|
boardConfiguration->injectionPins[4] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(injectionPins)[5] = GPIO_UNASSIGNED;
|
boardConfiguration->injectionPins[5] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(injectionPins)[6] = GPIO_UNASSIGNED;
|
boardConfiguration->injectionPins[6] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(injectionPins)[7] = GPIO_UNASSIGNED;
|
boardConfiguration->injectionPins[7] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(injectionPins)[8] = GPIO_UNASSIGNED;
|
boardConfiguration->injectionPins[8] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(injectionPins)[9] = GPIO_UNASSIGNED;
|
boardConfiguration->injectionPins[9] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(injectionPins)[10] = GPIO_UNASSIGNED;
|
boardConfiguration->injectionPins[10] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(injectionPins)[11] = GPIO_UNASSIGNED;
|
boardConfiguration->injectionPins[11] = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
CONFIGB(ignitionPins)[0] = GPIOE_14;
|
boardConfiguration->ignitionPins[0] = GPIOE_14;
|
||||||
CONFIGB(ignitionPins)[1] = GPIOC_7;
|
boardConfiguration->ignitionPins[1] = GPIOC_7;
|
||||||
CONFIGB(ignitionPins)[2] = GPIOE_10;
|
boardConfiguration->ignitionPins[2] = GPIOE_10;
|
||||||
CONFIGB(ignitionPins)[3] = GPIOC_9; // #4
|
boardConfiguration->ignitionPins[3] = GPIOC_9; // #4
|
||||||
|
|
||||||
// todo: 8.2 or 10k?
|
// todo: 8.2 or 10k?
|
||||||
engineConfiguration->vbattDividerCoeff = ((float) (10 + 33)) / 10 * 2;
|
engineConfiguration->vbattDividerCoeff = ((float) (10 + 33)) / 10 * 2;
|
||||||
|
|
|
@ -39,7 +39,7 @@ EXTERN_ENGINE;
|
||||||
|
|
||||||
static void setHondaAccordConfigurationCommon(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
static void setHondaAccordConfigurationCommon(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->map.sensor.type = MT_DENSO183;
|
engineConfiguration->map.sensor.type = MT_DENSO183;
|
||||||
CONFIGB(isFastAdcEnabled) = true;
|
boardConfiguration->isFastAdcEnabled = true;
|
||||||
|
|
||||||
// set ignition_mode 0
|
// set ignition_mode 0
|
||||||
engineConfiguration->ignitionMode = IM_ONE_COIL;
|
engineConfiguration->ignitionMode = IM_ONE_COIL;
|
||||||
|
@ -150,29 +150,29 @@ static void setHondaAccordConfigurationCommon(DECLARE_ENGINE_PARAMETER_SIGNATURE
|
||||||
// Frankenso low out #10: PD5 Injector #3
|
// Frankenso low out #10: PD5 Injector #3
|
||||||
// Frankenso low out #11: PB8 injector #1
|
// Frankenso low out #11: PB8 injector #1
|
||||||
// Frankenso low out #12: PB7 injector #4
|
// Frankenso low out #12: PB7 injector #4
|
||||||
CONFIGB(fuelPumpPin) = GPIOE_3;
|
boardConfiguration->fuelPumpPin = GPIOE_3;
|
||||||
CONFIGB(fuelPumpPinMode) = OM_DEFAULT;
|
boardConfiguration->fuelPumpPinMode = OM_DEFAULT;
|
||||||
CONFIGB(malfunctionIndicatorPin) = GPIOE_2;
|
boardConfiguration->malfunctionIndicatorPin = GPIOE_2;
|
||||||
CONFIGB(malfunctionIndicatorPinMode) = OM_DEFAULT;
|
boardConfiguration->malfunctionIndicatorPinMode = OM_DEFAULT;
|
||||||
CONFIGB(fanPin) = GPIOE_4; // blue wire
|
boardConfiguration->fanPin = GPIOE_4; // blue wire
|
||||||
|
|
||||||
CONFIGB(idle).solenoidPin = GPIOD_3; // green wire
|
boardConfiguration->idle.solenoidPin = GPIOD_3; // green wire
|
||||||
|
|
||||||
CONFIGB(injectionPins)[0] = GPIOB_8;
|
boardConfiguration->injectionPins[0] = GPIOB_8;
|
||||||
CONFIGB(injectionPins)[1] = GPIOB_9;
|
boardConfiguration->injectionPins[1] = GPIOB_9;
|
||||||
CONFIGB(injectionPins)[2] = GPIOD_5;
|
boardConfiguration->injectionPins[2] = GPIOD_5;
|
||||||
CONFIGB(injectionPins)[3] = GPIOB_7;
|
boardConfiguration->injectionPins[3] = GPIOB_7;
|
||||||
|
|
||||||
CONFIGB(ignitionPins)[0] = GPIOE_12; // white wire
|
boardConfiguration->ignitionPins[0] = GPIOE_12; // white wire
|
||||||
CONFIGB(ignitionPins)[1] = GPIO_UNASSIGNED;
|
boardConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(ignitionPins)[2] = GPIO_UNASSIGNED;
|
boardConfiguration->ignitionPins[2] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(ignitionPins)[3] = GPIO_UNASSIGNED;
|
boardConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
|
|
||||||
setFrankenso_01_LCD(PASS_ENGINE_PARAMETER_SIGNATURE);
|
setFrankenso_01_LCD(boardConfiguration);
|
||||||
setFrankenso0_1_joystick(PASS_ENGINE_PARAMETER_SIGNATURE);
|
setFrankenso0_1_joystick(engineConfiguration);
|
||||||
|
|
||||||
CONFIGB(idle).solenoidFrequency = 500;
|
boardConfiguration->idle.solenoidFrequency = 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -16,35 +16,35 @@ EXTERN_ENGINE;
|
||||||
|
|
||||||
void setLadaKalina(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
void setLadaKalina(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
setCustomEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE);
|
setCustomEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
disableLCD(PASS_ENGINE_PARAMETER_SIGNATURE);
|
disableLCD(boardConfiguration);
|
||||||
|
|
||||||
CONFIGB(HD44780_rs) = GPIO_UNASSIGNED;
|
boardConfiguration->HD44780_rs = GPIO_UNASSIGNED;
|
||||||
CONFIGB(HD44780_e) = GPIO_UNASSIGNED;
|
boardConfiguration->HD44780_e = GPIO_UNASSIGNED;
|
||||||
CONFIGB(HD44780_db4) = GPIO_UNASSIGNED;
|
boardConfiguration->HD44780_db4 = GPIO_UNASSIGNED;
|
||||||
CONFIGB(HD44780_db5) = GPIO_UNASSIGNED;
|
boardConfiguration->HD44780_db5 = GPIO_UNASSIGNED;
|
||||||
CONFIGB(HD44780_db6) = GPIO_UNASSIGNED;
|
boardConfiguration->HD44780_db6 = GPIO_UNASSIGNED;
|
||||||
CONFIGB(HD44780_db7) = GPIO_UNASSIGNED;
|
boardConfiguration->HD44780_db7 = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
|
|
||||||
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
|
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
|
||||||
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_60_2;
|
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_60_2;
|
||||||
|
|
||||||
CONFIGB(triggerInputPins)[0] = GPIOA_5;
|
boardConfiguration->triggerInputPins[0] = GPIOA_5;
|
||||||
CONFIGB(triggerInputPins)[1] = GPIO_UNASSIGNED;
|
boardConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
engineConfiguration->globalTriggerAngleOffset = 114;
|
engineConfiguration->globalTriggerAngleOffset = 114;
|
||||||
|
|
||||||
CONFIGB(ignitionPins)[0] = GPIOE_14;
|
boardConfiguration->ignitionPins[0] = GPIOE_14;
|
||||||
CONFIGB(ignitionPins)[1] = GPIOC_7;
|
boardConfiguration->ignitionPins[1] = GPIOC_7;
|
||||||
CONFIGB(ignitionPins)[2] = GPIOC_9;
|
boardConfiguration->ignitionPins[2] = GPIOC_9;
|
||||||
CONFIGB(ignitionPins)[3] = GPIOE_12;
|
boardConfiguration->ignitionPins[3] = GPIOE_12;
|
||||||
|
|
||||||
CONFIGB(useStepperIdle) = true;
|
boardConfiguration->useStepperIdle = true;
|
||||||
CONFIGB(fuelPumpPin) = GPIOC_13;
|
boardConfiguration->fuelPumpPin = GPIOC_13;
|
||||||
CONFIGB(mainRelayPin) = GPIOD_7;
|
boardConfiguration->mainRelayPin = GPIOD_7;
|
||||||
|
|
||||||
CONFIGB(idle).stepperDirectionPin = GPIOE_15;
|
boardConfiguration->idle.stepperDirectionPin = GPIOE_15;
|
||||||
CONFIGB(idle).stepperStepPin = GPIOE_13;
|
boardConfiguration->idle.stepperStepPin = GPIOE_13;
|
||||||
engineConfiguration->stepperEnablePin = GPIOE_11;
|
engineConfiguration->stepperEnablePin = GPIOE_11;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ void setMazda626EngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
// engineConfiguration->trigger.type = TT_MAZDA_DOHC_1_4;
|
// engineConfiguration->trigger.type = TT_MAZDA_DOHC_1_4;
|
||||||
|
|
||||||
// with this complex trigger we do not need this by default
|
// with this complex trigger we do not need this by default
|
||||||
CONFIGB(sensorChartMode) = SC_OFF;
|
boardConfiguration->sensorChartMode = SC_OFF;
|
||||||
|
|
||||||
engineConfiguration->useOnlyRisingEdgeForTrigger = true;
|
engineConfiguration->useOnlyRisingEdgeForTrigger = true;
|
||||||
|
|
||||||
|
@ -105,6 +105,6 @@ void setMazda626EngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
|
|
||||||
engineConfiguration->externalKnockSenseAdc = EFI_ADC_4;
|
engineConfiguration->externalKnockSenseAdc = EFI_ADC_4;
|
||||||
|
|
||||||
CONFIGB(triggerInputPins)[1] = GPIO_UNASSIGNED;
|
boardConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED;
|
||||||
engineConfiguration->camInput = GPIOA_5;
|
engineConfiguration->camInput = GPIOA_5;
|
||||||
}
|
}
|
||||||
|
|
|
@ -131,14 +131,14 @@ static void commonMiataNa(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->trigger.type = TT_MAZDA_MIATA_NA;
|
engineConfiguration->trigger.type = TT_MAZDA_MIATA_NA;
|
||||||
engineConfiguration->engineChartSize = 100;
|
engineConfiguration->engineChartSize = 100;
|
||||||
|
|
||||||
CONFIGB(triggerInputPins)[0] = GPIOC_6; // 2G YEL/BLU
|
boardConfiguration->triggerInputPins[0] = GPIOC_6; // 2G YEL/BLU
|
||||||
CONFIGB(triggerInputPins)[1] = GPIOA_5; // 2E White CKP
|
boardConfiguration->triggerInputPins[1] = GPIOA_5; // 2E White CKP
|
||||||
|
|
||||||
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
|
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
|
||||||
setFuelLoadBin(1.2, 4.4 PASS_ENGINE_PARAMETER_SUFFIX);
|
setFuelLoadBin(1.2, 4.4 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
setFuelRpmBin(800, 7000 PASS_ENGINE_PARAMETER_SUFFIX);
|
setFuelRpmBin(800, 7000 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
CONFIGB(idle).solenoidFrequency = 160;
|
boardConfiguration->idle.solenoidFrequency = 160;
|
||||||
|
|
||||||
// Frankenstein: high side #1 is PE8
|
// Frankenstein: high side #1 is PE8
|
||||||
// Frankenstein: high side #2 is PE10
|
// Frankenstein: high side #2 is PE10
|
||||||
|
@ -147,16 +147,16 @@ static void commonMiataNa(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
// Frankenstein: high side #5 is PC9
|
// Frankenstein: high side #5 is PC9
|
||||||
// Frankenstein: high side #6 is PC7
|
// Frankenstein: high side #6 is PC7
|
||||||
|
|
||||||
CONFIGB(ignitionPins)[0] = GPIOE_12; // Frankenstein: high side #3
|
boardConfiguration->ignitionPins[0] = GPIOE_12; // Frankenstein: high side #3
|
||||||
CONFIGB(ignitionPins)[1] = GPIOE_14; // Frankenstein: high side #4
|
boardConfiguration->ignitionPins[1] = GPIOE_14; // Frankenstein: high side #4
|
||||||
CONFIGB(ignitionPins)[2] = GPIO_UNASSIGNED;
|
boardConfiguration->ignitionPins[2] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(ignitionPins)[3] = GPIO_UNASSIGNED;
|
boardConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(ignitionPinMode) = OM_DEFAULT;
|
boardConfiguration->ignitionPinMode = OM_DEFAULT;
|
||||||
|
|
||||||
setDefaultCrankingFuel(engineConfiguration);
|
setDefaultCrankingFuel(engineConfiguration);
|
||||||
|
|
||||||
CONFIGB(triggerSimulatorPinModes)[0] = OM_OPENDRAIN;
|
boardConfiguration->triggerSimulatorPinModes[0] = OM_OPENDRAIN;
|
||||||
CONFIGB(triggerSimulatorPinModes)[1] = OM_OPENDRAIN;
|
boardConfiguration->triggerSimulatorPinModes[1] = OM_OPENDRAIN;
|
||||||
|
|
||||||
setCommonNTCSensor(&engineConfiguration->clt);
|
setCommonNTCSensor(&engineConfiguration->clt);
|
||||||
engineConfiguration->clt.config.bias_resistor = 2700;
|
engineConfiguration->clt.config.bias_resistor = 2700;
|
||||||
|
@ -165,14 +165,14 @@ static void commonMiataNa(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void common079721_2351(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
void common079721_2351(engine_configuration_s *engineConfiguration, board_configuration_s *boardConfiguration) {
|
||||||
|
|
||||||
engineConfiguration->engineChartSize = 300;
|
engineConfiguration->engineChartSize = 300;
|
||||||
|
|
||||||
engineConfiguration->specs.cylindersCount = 4;
|
engineConfiguration->specs.cylindersCount = 4;
|
||||||
engineConfiguration->specs.firingOrder = FO_1_3_4_2;
|
engineConfiguration->specs.firingOrder = FO_1_3_4_2;
|
||||||
|
|
||||||
CONFIGB(fuelPumpPin) = GPIO_UNASSIGNED; // fuel pump is not controlled by ECU on this engine
|
boardConfiguration->fuelPumpPin = GPIO_UNASSIGNED; // fuel pump is not controlled by ECU on this engine
|
||||||
|
|
||||||
// set cranking_injection_mode 0
|
// set cranking_injection_mode 0
|
||||||
engineConfiguration->crankingInjectionMode = IM_SIMULTANEOUS;
|
engineConfiguration->crankingInjectionMode = IM_SIMULTANEOUS;
|
||||||
|
@ -202,7 +202,7 @@ void common079721_2351(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
* Frankenstein board
|
* Frankenstein board
|
||||||
*/
|
*/
|
||||||
void setMiata1990(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
void setMiata1990(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
common079721_2351(PASS_ENGINE_PARAMETER_SIGNATURE);
|
common079721_2351(engineConfiguration, boardConfiguration);
|
||||||
|
|
||||||
commonMiataNa(PASS_ENGINE_PARAMETER_SIGNATURE);
|
commonMiataNa(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
|
@ -219,13 +219,13 @@ void setMiata1990(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
// Frankenstein: low side - out #11: PB8
|
// Frankenstein: low side - out #11: PB8
|
||||||
// Frankenstein: low side - out #12: PB9
|
// Frankenstein: low side - out #12: PB9
|
||||||
|
|
||||||
CONFIGB(injectionPins)[0] = GPIOB_9; // Frankenstein: low side - out #12
|
boardConfiguration->injectionPins[0] = GPIOB_9; // Frankenstein: low side - out #12
|
||||||
CONFIGB(injectionPins)[1] = GPIOB_8; // Frankenstein: low side - out #11
|
boardConfiguration->injectionPins[1] = GPIOB_8; // Frankenstein: low side - out #11
|
||||||
CONFIGB(injectionPins)[2] = GPIO_UNASSIGNED;
|
boardConfiguration->injectionPins[2] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(injectionPins)[3] = GPIO_UNASSIGNED;
|
boardConfiguration->injectionPins[3] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(injectionPins)[4] = GPIO_UNASSIGNED;
|
boardConfiguration->injectionPins[4] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(injectionPins)[5] = GPIO_UNASSIGNED;
|
boardConfiguration->injectionPins[5] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(injectionPinMode) = OM_DEFAULT;
|
boardConfiguration->injectionPinMode = OM_DEFAULT;
|
||||||
|
|
||||||
// todo: idleValvePin
|
// todo: idleValvePin
|
||||||
}
|
}
|
||||||
|
@ -244,17 +244,17 @@ static void setMiata1994_common(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
|
|
||||||
copyTimingTable(miata_maf_advance_table, config->ignitionTable);
|
copyTimingTable(miata_maf_advance_table, config->ignitionTable);
|
||||||
|
|
||||||
// CONFIGB(triggerSimulatorPins)[0] = GPIOD_2; // 2G - YEL/BLU
|
// boardConfiguration->triggerSimulatorPins[0] = GPIOD_2; // 2G - YEL/BLU
|
||||||
// CONFIGB(triggerSimulatorPins)[1] = GPIOB_3; // 2E - WHT - four times
|
// boardConfiguration->triggerSimulatorPins[1] = GPIOB_3; // 2E - WHT - four times
|
||||||
// CONFIGB(triggerSimulatorPinModes)[0] = OM_OPENDRAIN;
|
// boardConfiguration->triggerSimulatorPinModes[0] = OM_OPENDRAIN;
|
||||||
// CONFIGB(triggerSimulatorPinModes)[1] = OM_OPENDRAIN;
|
// boardConfiguration->triggerSimulatorPinModes[1] = OM_OPENDRAIN;
|
||||||
//
|
//
|
||||||
// CONFIGB(triggerInputPins)[0] = GPIO_UNASSIGNED;
|
// boardConfiguration->triggerInputPins[0] = GPIO_UNASSIGNED;
|
||||||
// CONFIGB(triggerInputPins)[1] = GPIO_UNASSIGNED;
|
// boardConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED;
|
||||||
//
|
//
|
||||||
// CONFIGB(is_enabled_spi_1) = false;
|
// boardConfiguration->is_enabled_spi_1 = false;
|
||||||
// CONFIGB(is_enabled_spi_2) = false;
|
// boardConfiguration->is_enabled_spi_2 = false;
|
||||||
// CONFIGB(is_enabled_spi_3) = false;
|
// boardConfiguration->is_enabled_spi_3 = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Outputs
|
* Outputs
|
||||||
|
@ -271,27 +271,27 @@ static void setMiata1994_common(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
// Frankenso low out #10: PE0 (do not use with discovery!)
|
// Frankenso low out #10: PE0 (do not use with discovery!)
|
||||||
// Frankenso low out #11: PB8
|
// Frankenso low out #11: PB8
|
||||||
// Frankenso low out #12: PB7
|
// Frankenso low out #12: PB7
|
||||||
CONFIGB(fanPin) = GPIOE_6;
|
boardConfiguration->fanPin = GPIOE_6;
|
||||||
|
|
||||||
CONFIGB(o2heaterPin) = GPIO_UNASSIGNED;
|
boardConfiguration->o2heaterPin = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
CONFIGB(fuelPumpPin) = GPIOE_4;
|
boardConfiguration->fuelPumpPin = GPIOE_4;
|
||||||
|
|
||||||
CONFIGB(injectionPins)[4] = GPIO_UNASSIGNED;
|
boardConfiguration->injectionPins[4] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(injectionPins)[5] = GPIO_UNASSIGNED;
|
boardConfiguration->injectionPins[5] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(injectionPinMode) = OM_DEFAULT;
|
boardConfiguration->injectionPinMode = OM_DEFAULT;
|
||||||
|
|
||||||
CONFIGB(idle).solenoidPin = GPIOB_9;
|
boardConfiguration->idle.solenoidPin = GPIOB_9;
|
||||||
|
|
||||||
CONFIGB(ignitionPins)[0] = GPIOE_14; // Frankenso high side - pin 1G
|
boardConfiguration->ignitionPins[0] = GPIOE_14; // Frankenso high side - pin 1G
|
||||||
CONFIGB(ignitionPins)[1] = GPIO_UNASSIGNED;
|
boardConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(ignitionPins)[2] = GPIOC_7; // Frankenso high side - pin 1H
|
boardConfiguration->ignitionPins[2] = GPIOC_7; // Frankenso high side - pin 1H
|
||||||
CONFIGB(ignitionPins)[3] = GPIO_UNASSIGNED;
|
boardConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(ignitionPinMode) = OM_DEFAULT;
|
boardConfiguration->ignitionPinMode = OM_DEFAULT;
|
||||||
|
|
||||||
setFrankenso_01_LCD(PASS_ENGINE_PARAMETER_SIGNATURE);
|
setFrankenso_01_LCD(boardConfiguration);
|
||||||
|
|
||||||
commonFrankensoAnalogInputs(PASS_ENGINE_PARAMETER_SIGNATURE);
|
commonFrankensoAnalogInputs(engineConfiguration);
|
||||||
|
|
||||||
engineConfiguration->tpsAdcChannel = EFI_ADC_2; // PA2
|
engineConfiguration->tpsAdcChannel = EFI_ADC_2; // PA2
|
||||||
engineConfiguration->map.sensor.hwChannel = EFI_ADC_4;
|
engineConfiguration->map.sensor.hwChannel = EFI_ADC_4;
|
||||||
|
@ -311,20 +311,20 @@ void setMiata1994_d(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
/**
|
/**
|
||||||
* This board was avoiding PE0 & PE1 mosfets altogether
|
* This board was avoiding PE0 & PE1 mosfets altogether
|
||||||
*/
|
*/
|
||||||
CONFIGB(injectionPins)[0] = GPIOD_7; // avoiding PE1
|
boardConfiguration->injectionPins[0] = GPIOD_7; // avoiding PE1
|
||||||
CONFIGB(injectionPins)[1] = GPIOE_2;
|
boardConfiguration->injectionPins[1] = GPIOE_2;
|
||||||
CONFIGB(injectionPins)[2] = GPIOB_8;
|
boardConfiguration->injectionPins[2] = GPIOB_8;
|
||||||
CONFIGB(injectionPins)[3] = GPIOB_7;
|
boardConfiguration->injectionPins[3] = GPIOB_7;
|
||||||
|
|
||||||
// todo: add the diode? change idle valve logic?
|
// todo: add the diode? change idle valve logic?
|
||||||
CONFIGB(idle).solenoidPin = GPIO_UNASSIGNED;
|
boardConfiguration->idle.solenoidPin = GPIO_UNASSIGNED;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setMiata1994_s(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
void setMiata1994_s(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
setMiata1994_common(PASS_ENGINE_PARAMETER_SIGNATURE);
|
setMiata1994_common(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
engineConfiguration->vbattDividerCoeff = ((float) (10.0 + 33)) / 10 * 2;
|
engineConfiguration->vbattDividerCoeff = ((float) (10.0 + 33)) / 10 * 2;
|
||||||
|
|
||||||
CONFIGB(triggerSimulatorPins)[2] = GPIO_UNASSIGNED;
|
boardConfiguration->triggerSimulatorPins[2] = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
engineConfiguration->acSwitchAdc = EFI_ADC_1; // PA1, W50 on Frankenso
|
engineConfiguration->acSwitchAdc = EFI_ADC_1; // PA1, W50 on Frankenso
|
||||||
|
|
||||||
|
@ -334,13 +334,13 @@ void setMiata1994_s(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
/**
|
/**
|
||||||
* This board has PE0<>PD5 & PE1<>PD3 rewired in order to avoid Discovery issue
|
* This board has PE0<>PD5 & PE1<>PD3 rewired in order to avoid Discovery issue
|
||||||
*/
|
*/
|
||||||
CONFIGB(injectionPins)[0] = GPIOD_3; // avoiding PE1
|
boardConfiguration->injectionPins[0] = GPIOD_3; // avoiding PE1
|
||||||
CONFIGB(injectionPins)[1] = GPIOE_2; // injector #2
|
boardConfiguration->injectionPins[1] = GPIOE_2; // injector #2
|
||||||
CONFIGB(injectionPins)[2] = GPIOB_8; // injector #3
|
boardConfiguration->injectionPins[2] = GPIOB_8; // injector #3
|
||||||
CONFIGB(injectionPins)[3] = GPIOB_7; // injector #4
|
boardConfiguration->injectionPins[3] = GPIOB_7; // injector #4
|
||||||
|
|
||||||
// setFsio(engineConfiguration, 0, GPIOD_11, "coolant 80 >");
|
// setFsio(engineConfiguration, 0, GPIOD_11, "coolant 80 >");
|
||||||
CONFIGB(idle).solenoidFrequency = 500;
|
boardConfiguration->idle.solenoidFrequency = 500;
|
||||||
|
|
||||||
engineConfiguration->acCutoffLowRpm = 400;
|
engineConfiguration->acCutoffLowRpm = 400;
|
||||||
engineConfiguration->acCutoffHighRpm = 4500;
|
engineConfiguration->acCutoffHighRpm = 4500;
|
||||||
|
@ -353,8 +353,8 @@ void setMiata1994_s(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->tpsMax = 86;
|
engineConfiguration->tpsMax = 86;
|
||||||
engineConfiguration->tpsMin = 596;
|
engineConfiguration->tpsMin = 596;
|
||||||
|
|
||||||
CONFIGB(malfunctionIndicatorPin) = GPIOE_5;
|
boardConfiguration->malfunctionIndicatorPin = GPIOE_5;
|
||||||
CONFIGB(malfunctionIndicatorPinMode) = OM_DEFAULT;
|
boardConfiguration->malfunctionIndicatorPinMode = OM_DEFAULT;
|
||||||
|
|
||||||
engineConfiguration->fuelAlgorithm = LM_REAL_MAF;
|
engineConfiguration->fuelAlgorithm = LM_REAL_MAF;
|
||||||
setMazdaMiataNAMaf(config);
|
setMazdaMiataNAMaf(config);
|
||||||
|
@ -372,31 +372,31 @@ void setMiata1996(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
copyTimingTable(miata_maf_advance_table, config->ignitionTable);
|
copyTimingTable(miata_maf_advance_table, config->ignitionTable);
|
||||||
|
|
||||||
// upside down
|
// upside down
|
||||||
CONFIGB(triggerInputPins)[0] = GPIOA_5;
|
boardConfiguration->triggerInputPins[0] = GPIOA_5;
|
||||||
CONFIGB(triggerInputPins)[1] = GPIOC_6;
|
boardConfiguration->triggerInputPins[1] = GPIOC_6;
|
||||||
|
|
||||||
CONFIGB(fuelPumpPin) = GPIOE_4;
|
boardConfiguration->fuelPumpPin = GPIOE_4;
|
||||||
CONFIGB(idle).solenoidPin = GPIOE_5;
|
boardConfiguration->idle.solenoidPin = GPIOE_5;
|
||||||
|
|
||||||
engineConfiguration->mafAdcChannel = EFI_ADC_1;
|
engineConfiguration->mafAdcChannel = EFI_ADC_1;
|
||||||
engineConfiguration->clt.adcChannel = EFI_ADC_11;
|
engineConfiguration->clt.adcChannel = EFI_ADC_11;
|
||||||
engineConfiguration->tpsAdcChannel = EFI_ADC_13;
|
engineConfiguration->tpsAdcChannel = EFI_ADC_13;
|
||||||
|
|
||||||
CONFIGB(ignitionPins)[0] = GPIOE_12; // Frankenstein: high side #3
|
boardConfiguration->ignitionPins[0] = GPIOE_12; // Frankenstein: high side #3
|
||||||
CONFIGB(ignitionPins)[1] = GPIO_UNASSIGNED;
|
boardConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(ignitionPins)[2] = GPIOE_14; // Frankenstein: high side #4
|
boardConfiguration->ignitionPins[2] = GPIOE_14; // Frankenstein: high side #4
|
||||||
CONFIGB(ignitionPins)[3] = GPIO_UNASSIGNED;
|
boardConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(ignitionPinMode) = OM_DEFAULT;
|
boardConfiguration->ignitionPinMode = OM_DEFAULT;
|
||||||
|
|
||||||
// harness is sequential but we have a limited board
|
// harness is sequential but we have a limited board
|
||||||
engineConfiguration->crankingInjectionMode = IM_BATCH;
|
engineConfiguration->crankingInjectionMode = IM_BATCH;
|
||||||
engineConfiguration->injectionMode = IM_BATCH;
|
engineConfiguration->injectionMode = IM_BATCH;
|
||||||
|
|
||||||
CONFIGB(injectionPins)[0] = GPIOB_9; // Frankenstein: low side - out #12
|
boardConfiguration->injectionPins[0] = GPIOB_9; // Frankenstein: low side - out #12
|
||||||
CONFIGB(injectionPins)[1] = GPIOB_8; // Frankenstein: low side - out #11
|
boardConfiguration->injectionPins[1] = GPIOB_8; // Frankenstein: low side - out #11
|
||||||
CONFIGB(injectionPins)[2] = GPIO_UNASSIGNED;
|
boardConfiguration->injectionPins[2] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(injectionPins)[3] = GPIO_UNASSIGNED;
|
boardConfiguration->injectionPins[3] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(injectionPins)[4] = GPIO_UNASSIGNED;
|
boardConfiguration->injectionPins[4] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(injectionPins)[5] = GPIO_UNASSIGNED;
|
boardConfiguration->injectionPins[5] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(injectionPinMode) = OM_DEFAULT;
|
boardConfiguration->injectionPinMode = OM_DEFAULT;
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
void common079721_2351(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
void common079721_2351(engine_configuration_s *engineConfiguration, board_configuration_s *boardConfiguration);
|
||||||
void setMiata1990(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
void setMiata1990(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
void setMiata1994_d(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
void setMiata1994_d(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
void setMiata1994_s(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
void setMiata1994_s(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
|
@ -104,13 +104,13 @@ void miataNAcommon(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
|
|
||||||
copyTimingTable(mapBased16IgnitionTable, config->ignitionTable);
|
copyTimingTable(mapBased16IgnitionTable, config->ignitionTable);
|
||||||
|
|
||||||
CONFIGB(idle).solenoidFrequency = 160;
|
boardConfiguration->idle.solenoidFrequency = 160;
|
||||||
CONFIGB(idle).solenoidPin = GPIOB_9; // this W61 <> W61 jumper, pin 3W
|
boardConfiguration->idle.solenoidPin = GPIOB_9; // this W61 <> W61 jumper, pin 3W
|
||||||
|
|
||||||
CONFIGB(ignitionPins)[0] = GPIOE_14; // Frankenso high side - pin 1G
|
boardConfiguration->ignitionPins[0] = GPIOE_14; // Frankenso high side - pin 1G
|
||||||
CONFIGB(ignitionPins)[1] = GPIO_UNASSIGNED;
|
boardConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(ignitionPins)[2] = GPIOC_7; // Frankenso high side - pin 1H
|
boardConfiguration->ignitionPins[2] = GPIOC_7; // Frankenso high side - pin 1H
|
||||||
CONFIGB(ignitionPins)[3] = GPIO_UNASSIGNED;
|
boardConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
|
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
|
||||||
}
|
}
|
||||||
|
@ -154,7 +154,7 @@ void setMiataNA_1_6_Configuration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
|
|
||||||
engineConfiguration->vbattDividerCoeff = 9.75;// ((float) (8.2 + 33)) / 8.2 * 2;
|
engineConfiguration->vbattDividerCoeff = 9.75;// ((float) (8.2 + 33)) / 8.2 * 2;
|
||||||
|
|
||||||
CONFIGB(isSdCardEnabled) = true;
|
boardConfiguration->isSdCardEnabled = true;
|
||||||
|
|
||||||
// my car was originally a manual so proper TPS
|
// my car was originally a manual so proper TPS
|
||||||
engineConfiguration->tpsMin = 93; // convert 12to10 bit (ADC/4)
|
engineConfiguration->tpsMin = 93; // convert 12to10 bit (ADC/4)
|
||||||
|
@ -180,14 +180,14 @@ void setMiataNA_1_6_Configuration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
//WARNING: these indeces are off
|
//WARNING: these indeces are off
|
||||||
CONFIGB(fsio_setting)[0] = 6400; // RPM threshold
|
boardConfiguration->fsio_setting[0] = 6400; // RPM threshold
|
||||||
CONFIGB(fsio_setting)[1] = 100; // CLT threshold, fsio_setting #2
|
boardConfiguration->fsio_setting[1] = 100; // CLT threshold, fsio_setting #2
|
||||||
CONFIGB(fsio_setting)[2] = 13.0; // voltage threshold, fsio_setting #3
|
boardConfiguration->fsio_setting[2] = 13.0; // voltage threshold, fsio_setting #3
|
||||||
|
|
||||||
// set_fsio_setting 4 3000
|
// set_fsio_setting 4 3000
|
||||||
CONFIGB(fsio_setting)[3] = 3000; // oil pressure RPM, fsio_setting #4
|
boardConfiguration->fsio_setting[3] = 3000; // oil pressure RPM, fsio_setting #4
|
||||||
// set_fsio_setting 5 0.52
|
// set_fsio_setting 5 0.52
|
||||||
CONFIGB(fsio_setting)[4] = 0.52; // oil pressure threshold, fsio_setting #5
|
boardConfiguration->fsio_setting[4] = 0.52; // oil pressure threshold, fsio_setting #5
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// * set_rpn_expression 1 "rpm 3 fsio_setting >"
|
// * set_rpn_expression 1 "rpm 3 fsio_setting >"
|
||||||
|
@ -199,10 +199,10 @@ void setMiataNA_1_6_Configuration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
// todo: convert
|
// todo: convert
|
||||||
setFsio(0, GPIOC_13, COMBINED_WARNING_LIGHT PASS_ENGINE_PARAMETER_SUFFIX);
|
setFsio(0, GPIOC_13, COMBINED_WARNING_LIGHT PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
CONFIGB(injectionPins)[0] = GPIOD_3; // #1&3 pin 3U
|
boardConfiguration->injectionPins[0] = GPIOD_3; // #1&3 pin 3U
|
||||||
CONFIGB(injectionPins)[1] = GPIOE_2; // #2&4 pin 3V
|
boardConfiguration->injectionPins[1] = GPIOE_2; // #2&4 pin 3V
|
||||||
CONFIGB(injectionPins)[2] = GPIO_UNASSIGNED;
|
boardConfiguration->injectionPins[2] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(injectionPins)[3] = GPIO_UNASSIGNED;
|
boardConfiguration->injectionPins[3] = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
engineConfiguration->injectionMode = IM_BATCH;
|
engineConfiguration->injectionMode = IM_BATCH;
|
||||||
|
|
||||||
|
|
|
@ -36,10 +36,10 @@ void setMazdaMiataNA8Configuration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->vbattDividerCoeff = 9.75;// ((float) (8.2 + 33)) / 8.2 * 2;
|
engineConfiguration->vbattDividerCoeff = 9.75;// ((float) (8.2 + 33)) / 8.2 * 2;
|
||||||
|
|
||||||
|
|
||||||
CONFIGB(injectionPins)[0] = GPIOD_3; // #1 pin 3U
|
boardConfiguration->injectionPins[0] = GPIOD_3; // #1 pin 3U
|
||||||
CONFIGB(injectionPins)[1] = GPIOE_2; // #2 pin 3V
|
boardConfiguration->injectionPins[1] = GPIOE_2; // #2 pin 3V
|
||||||
CONFIGB(injectionPins)[2] = GPIOB_8; // #3 pin 3Y
|
boardConfiguration->injectionPins[2] = GPIOB_8; // #3 pin 3Y
|
||||||
CONFIGB(injectionPins)[3] = GPIOB_7; // #4 pin 3Z
|
boardConfiguration->injectionPins[3] = GPIOB_7; // #4 pin 3Z
|
||||||
|
|
||||||
engineConfiguration->injectionMode = IM_SEQUENTIAL;
|
engineConfiguration->injectionMode = IM_SEQUENTIAL;
|
||||||
|
|
||||||
|
|
|
@ -46,33 +46,33 @@ void setMazdaMiataNb1EngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->iat.adcChannel = EFI_ADC_13;
|
engineConfiguration->iat.adcChannel = EFI_ADC_13;
|
||||||
engineConfiguration->afr.hwChannel = EFI_ADC_2; // PA2
|
engineConfiguration->afr.hwChannel = EFI_ADC_2; // PA2
|
||||||
|
|
||||||
CONFIGB(idle).solenoidPin = GPIOE_0;
|
boardConfiguration->idle.solenoidPin = GPIOE_0;
|
||||||
CONFIGB(idle).solenoidPinMode = OM_DEFAULT;
|
boardConfiguration->idle.solenoidPinMode = OM_DEFAULT;
|
||||||
|
|
||||||
CONFIGB(fuelPumpPin) = GPIOC_14; // Frankenstein: low side - out #4
|
boardConfiguration->fuelPumpPin = GPIOC_14; // Frankenstein: low side - out #4
|
||||||
CONFIGB(fuelPumpPinMode) = OM_DEFAULT;
|
boardConfiguration->fuelPumpPinMode = OM_DEFAULT;
|
||||||
|
|
||||||
CONFIGB(injectionPins)[0] = GPIOB_9; // Frankenstein: low side - out #12
|
boardConfiguration->injectionPins[0] = GPIOB_9; // Frankenstein: low side - out #12
|
||||||
CONFIGB(injectionPins)[1] = GPIOB_8; // Frankenstein: low side - out #11
|
boardConfiguration->injectionPins[1] = GPIOB_8; // Frankenstein: low side - out #11
|
||||||
CONFIGB(injectionPins)[2] = GPIOE_3; // Frankenstein: low side - out #8
|
boardConfiguration->injectionPins[2] = GPIOE_3; // Frankenstein: low side - out #8
|
||||||
CONFIGB(injectionPins)[3] = GPIOE_5; // Frankenstein: low side - out #6
|
boardConfiguration->injectionPins[3] = GPIOE_5; // Frankenstein: low side - out #6
|
||||||
CONFIGB(injectionPins)[4] = GPIO_UNASSIGNED;
|
boardConfiguration->injectionPins[4] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(injectionPins)[5] = GPIO_UNASSIGNED;
|
boardConfiguration->injectionPins[5] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(injectionPinMode) = OM_DEFAULT;
|
boardConfiguration->injectionPinMode = OM_DEFAULT;
|
||||||
|
|
||||||
CONFIGB(ignitionPins)[0] = GPIOE_10; // Frankenstein: high side #1
|
boardConfiguration->ignitionPins[0] = GPIOE_10; // Frankenstein: high side #1
|
||||||
CONFIGB(ignitionPins)[1] = GPIO_UNASSIGNED;
|
boardConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(ignitionPins)[2] = GPIOC_9; // // Frankenstein: high side #2
|
boardConfiguration->ignitionPins[2] = GPIOC_9; // // Frankenstein: high side #2
|
||||||
CONFIGB(ignitionPins)[3] = GPIO_UNASSIGNED;
|
boardConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(ignitionPinMode) = OM_INVERTED;
|
boardConfiguration->ignitionPinMode = OM_INVERTED;
|
||||||
|
|
||||||
CONFIGB(malfunctionIndicatorPin) = GPIOE_1;
|
boardConfiguration->malfunctionIndicatorPin = GPIOE_1;
|
||||||
CONFIGB(malfunctionIndicatorPinMode) = OM_DEFAULT;
|
boardConfiguration->malfunctionIndicatorPinMode = OM_DEFAULT;
|
||||||
|
|
||||||
CONFIGB(fanPin) = GPIOE_6;
|
boardConfiguration->fanPin = GPIOE_6;
|
||||||
CONFIGB(fanPinMode) = OM_DEFAULT;
|
boardConfiguration->fanPinMode = OM_DEFAULT;
|
||||||
|
|
||||||
CONFIGB(clutchDownPin) = GPIO_UNASSIGNED;
|
boardConfiguration->clutchDownPin = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
// set_whole_fuel_map 3
|
// set_whole_fuel_map 3
|
||||||
setWholeFuelMap(3 PASS_ENGINE_PARAMETER_SUFFIX);
|
setWholeFuelMap(3 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
@ -85,7 +85,7 @@ void setMazdaMiataNb1EngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
* to test
|
* to test
|
||||||
* set_fsio_setting 1 5000
|
* set_fsio_setting 1 5000
|
||||||
*/
|
*/
|
||||||
CONFIGB(fsio_setting)[0] = 5000;
|
boardConfiguration->fsio_setting[0] = 5000;
|
||||||
// (self and (rpm > 4800)) OR (rpm > 5000)
|
// (self and (rpm > 4800)) OR (rpm > 5000)
|
||||||
// set_rpn_expression 1 "self rpm 4800 > & rpm 5000 > OR"
|
// set_rpn_expression 1 "self rpm 4800 > & rpm 5000 > OR"
|
||||||
// setFsioExt(0, GPIOE_3, "self rpm 4800 > & rpm 5000 > OR", 150 PASS_ENGINE_PARAMETER_SUFFIX);
|
// setFsioExt(0, GPIOE_3, "self rpm 4800 > & rpm 5000 > OR", 150 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
|
@ -240,20 +240,20 @@ void setMazdaMiata2003EngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
setOperationMode(engineConfiguration, FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR);
|
setOperationMode(engineConfiguration, FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR);
|
||||||
engineConfiguration->specs.displacement = 1.8;
|
engineConfiguration->specs.displacement = 1.8;
|
||||||
|
|
||||||
// CONFIGB(triggerInputPins)[0] = GPIOA_8; // custom Frankenso wiring in order to use SPI1 for accelerometer
|
// boardConfiguration->triggerInputPins[0] = GPIOA_8; // custom Frankenso wiring in order to use SPI1 for accelerometer
|
||||||
CONFIGB(triggerInputPins)[0] = GPIOA_5; // board still not modified
|
boardConfiguration->triggerInputPins[0] = GPIOA_5; // board still not modified
|
||||||
CONFIGB(triggerInputPins)[1] = GPIO_UNASSIGNED;
|
boardConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED;
|
||||||
engineConfiguration->camInput = GPIOC_6;
|
engineConfiguration->camInput = GPIOC_6;
|
||||||
|
|
||||||
// CONFIGB(is_enabled_spi_1) = true;
|
// boardConfiguration->is_enabled_spi_1 = true;
|
||||||
|
|
||||||
|
|
||||||
engineConfiguration->twoWireBatchInjection = true; // this is needed for #492 testing
|
engineConfiguration->twoWireBatchInjection = true; // this is needed for #492 testing
|
||||||
|
|
||||||
CONFIGB(alternatorControlPin) = GPIOE_10;
|
boardConfiguration->alternatorControlPin = GPIOE_10;
|
||||||
CONFIGB(alternatorControlPinMode) = OM_OPENDRAIN;
|
boardConfiguration->alternatorControlPinMode = OM_OPENDRAIN;
|
||||||
|
|
||||||
// CONFIGB(vehicleSpeedSensorInputPin) = GPIOA_8;
|
// boardConfiguration->vehicleSpeedSensorInputPin = GPIOA_8;
|
||||||
|
|
||||||
// enable altdebug
|
// enable altdebug
|
||||||
engineConfiguration->targetVBatt = 13.8;
|
engineConfiguration->targetVBatt = 13.8;
|
||||||
|
@ -271,12 +271,12 @@ void setMazdaMiata2003EngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->auxPid[0].maxValue = 44;
|
engineConfiguration->auxPid[0].maxValue = 44;
|
||||||
|
|
||||||
// set idle_position 35
|
// set idle_position 35
|
||||||
CONFIGB(manIdlePosition) = 35;
|
boardConfiguration->manIdlePosition = 35;
|
||||||
|
|
||||||
|
|
||||||
// set vvt_mode 3
|
// set vvt_mode 3
|
||||||
engineConfiguration->vvtMode = MIATA_NB2;
|
engineConfiguration->vvtMode = MIATA_NB2;
|
||||||
CONFIGB(vvtCamSensorUseRise) = true;
|
boardConfiguration->vvtCamSensorUseRise = true;
|
||||||
engineConfiguration->vvtDisplayInverted = true;
|
engineConfiguration->vvtDisplayInverted = true;
|
||||||
engineConfiguration->vvtOffset = 98; // 2003 red car value
|
engineConfiguration->vvtOffset = 98; // 2003 red car value
|
||||||
|
|
||||||
|
@ -286,7 +286,7 @@ void setMazdaMiata2003EngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
// /**
|
// /**
|
||||||
// * set_fsio_setting 1 0.55
|
// * set_fsio_setting 1 0.55
|
||||||
// */
|
// */
|
||||||
CONFIGB(fsio_setting)[0] = 0.0;
|
boardConfiguration->fsio_setting[0] = 0.0;
|
||||||
// setFsioExt(0, GPIOE_3, "0 fsio_setting", 400 PASS_ENGINE_PARAMETER_SUFFIX);
|
// setFsioExt(0, GPIOE_3, "0 fsio_setting", 400 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
|
|
||||||
|
@ -313,12 +313,12 @@ void setMazdaMiata2003EngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
* Miata coil on #4 PE14 - white ECU wire "1&4"
|
* Miata coil on #4 PE14 - white ECU wire "1&4"
|
||||||
*/
|
*/
|
||||||
|
|
||||||
CONFIGB(ignitionPins)[0] = GPIOE_14;
|
boardConfiguration->ignitionPins[0] = GPIOE_14;
|
||||||
CONFIGB(ignitionPins)[1] = GPIO_UNASSIGNED;
|
boardConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(ignitionPins)[2] = GPIOC_9;
|
boardConfiguration->ignitionPins[2] = GPIOC_9;
|
||||||
CONFIGB(ignitionPins)[3] = GPIO_UNASSIGNED;
|
boardConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
CONFIGB(etbControlPin1) = GPIOC_7;
|
boardConfiguration->etbControlPin1 = GPIOC_7;
|
||||||
|
|
||||||
// default TPS is engineConfiguration->tpsAdcChannel = EFI_ADC_2;
|
// default TPS is engineConfiguration->tpsAdcChannel = EFI_ADC_2;
|
||||||
// it becomes pedal sensor on test mule
|
// it becomes pedal sensor on test mule
|
||||||
|
@ -372,8 +372,8 @@ void setMazdaMiata2003EngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
// 0.1375
|
// 0.1375
|
||||||
// 6.375
|
// 6.375
|
||||||
// 10.625
|
// 10.625
|
||||||
CONFIGB(nb2ratioFrom) = 8.50 * 0.75;
|
boardConfiguration->nb2ratioFrom = 8.50 * 0.75;
|
||||||
CONFIGB(nb2ratioTo) = 14;
|
boardConfiguration->nb2ratioTo = 14;
|
||||||
engineConfiguration->nbVvtIndex = 0;
|
engineConfiguration->nbVvtIndex = 0;
|
||||||
|
|
||||||
|
|
||||||
|
@ -384,7 +384,7 @@ void setMazdaMiata2003EngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
|
|
||||||
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
|
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
|
||||||
|
|
||||||
CONFIGB(malfunctionIndicatorPin) = GPIOE_6; // just for a test
|
boardConfiguration->malfunctionIndicatorPin = GPIOE_6; // just for a test
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* http://miataturbo.wikidot.com/fuel-injectors
|
* http://miataturbo.wikidot.com/fuel-injectors
|
||||||
|
@ -392,8 +392,8 @@ void setMazdaMiata2003EngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
*/
|
*/
|
||||||
engineConfiguration->injector.flow = 265;
|
engineConfiguration->injector.flow = 265;
|
||||||
|
|
||||||
// CONFIGB(malfunctionIndicatorPin) = GPIOD_9;
|
// boardConfiguration->malfunctionIndicatorPin = GPIOD_9;
|
||||||
// CONFIGB(malfunctionIndicatorPinMode) = OM_INVERTED;
|
// boardConfiguration->malfunctionIndicatorPinMode = OM_INVERTED;
|
||||||
|
|
||||||
// todo: blue jumper wire - what is it?!
|
// todo: blue jumper wire - what is it?!
|
||||||
// Frankenso analog #6 pin 3R, W56 (5th lower row pin from the end) top <> W45 bottom jumper, not OEM
|
// Frankenso analog #6 pin 3R, W56 (5th lower row pin from the end) top <> W45 bottom jumper, not OEM
|
||||||
|
@ -423,9 +423,9 @@ void setMazdaMiata2003EngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
* set_fsio_setting 3 65
|
* set_fsio_setting 3 65
|
||||||
* set_fsio_setting 4 15
|
* set_fsio_setting 4 15
|
||||||
*/
|
*/
|
||||||
CONFIGB(fsio_setting)[1] = 6500; // #2 RPM threshold
|
boardConfiguration->fsio_setting[1] = 6500; // #2 RPM threshold
|
||||||
CONFIGB(fsio_setting)[2] = 105; // #3 CLT threshold
|
boardConfiguration->fsio_setting[2] = 105; // #3 CLT threshold
|
||||||
CONFIGB(fsio_setting)[3] = 12.0; // #4 voltage threshold
|
boardConfiguration->fsio_setting[3] = 12.0; // #4 voltage threshold
|
||||||
|
|
||||||
setFsio(1, GPIOE_6, COMBINED_WARNING_LIGHT PASS_ENGINE_PARAMETER_SUFFIX);
|
setFsio(1, GPIOE_6, COMBINED_WARNING_LIGHT PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
|
@ -467,7 +467,7 @@ void setMazdaMiata2003EngineConfigurationNaFuelRail(DECLARE_ENGINE_PARAMETER_SIG
|
||||||
memcpy(config->afrLoadBins, targetAfrLoadBins, sizeof(targetAfrLoadBins));
|
memcpy(config->afrLoadBins, targetAfrLoadBins, sizeof(targetAfrLoadBins));
|
||||||
copyTargetAfrTable(target_AFR_NA, config->afrTable);
|
copyTargetAfrTable(target_AFR_NA, config->afrTable);
|
||||||
|
|
||||||
CONFIGB(ignitionPins)[2] = GPIOC_7;
|
boardConfiguration->ignitionPins[2] = GPIOC_7;
|
||||||
|
|
||||||
// Frankenso analog #7 pin 3J, W48 top <>W48 bottom jumper, not OEM
|
// Frankenso analog #7 pin 3J, W48 top <>W48 bottom jumper, not OEM
|
||||||
engineConfiguration->afr.hwChannel = EFI_ADC_3; // PA3
|
engineConfiguration->afr.hwChannel = EFI_ADC_3; // PA3
|
||||||
|
@ -490,7 +490,7 @@ void setMazdaMiata2003EngineConfigurationNaFuelRail(DECLARE_ENGINE_PARAMETER_SIG
|
||||||
engineConfiguration->rpmHardLimit = 7200; // we want to survive the race, but we also want some fun!
|
engineConfiguration->rpmHardLimit = 7200; // we want to survive the race, but we also want some fun!
|
||||||
|
|
||||||
// set idle_position 30
|
// set idle_position 30
|
||||||
CONFIGB(manIdlePosition) = 30;
|
boardConfiguration->manIdlePosition = 30;
|
||||||
engineConfiguration->crankingIACposition = 65;
|
engineConfiguration->crankingIACposition = 65;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -502,7 +502,7 @@ void setMazdaMiata2003EngineConfigurationNaFuelRail(DECLARE_ENGINE_PARAMETER_SIG
|
||||||
void setMazdaMiata2003EngineConfigurationBoardTest(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
void setMazdaMiata2003EngineConfigurationBoardTest(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
setMazdaMiata2003EngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE);
|
setMazdaMiata2003EngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
CONFIGB(ignitionPins)[2] = GPIOC_7;
|
boardConfiguration->ignitionPins[2] = GPIOC_7;
|
||||||
|
|
||||||
// Frankenso analog #7 pin 3J, W48 top <>W48 bottom jumper, not OEM. Make sure 500K pull-down on Frankenso
|
// Frankenso analog #7 pin 3J, W48 top <>W48 bottom jumper, not OEM. Make sure 500K pull-down on Frankenso
|
||||||
engineConfiguration->afr.hwChannel = EFI_ADC_3; // PA3
|
engineConfiguration->afr.hwChannel = EFI_ADC_3; // PA3
|
||||||
|
|
|
@ -68,19 +68,19 @@ void setMitsubishiConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
// Frankenstein: low side - out #11: PB8
|
// Frankenstein: low side - out #11: PB8
|
||||||
// Frankenstein: low side - out #12: PB9
|
// Frankenstein: low side - out #12: PB9
|
||||||
|
|
||||||
CONFIGB(injectionPins)[0] = GPIOB_9; // Frankenstein: low side - out #12
|
boardConfiguration->injectionPins[0] = GPIOB_9; // Frankenstein: low side - out #12
|
||||||
CONFIGB(injectionPins)[1] = GPIOB_8; // Frankenstein: low side - out #11
|
boardConfiguration->injectionPins[1] = GPIOB_8; // Frankenstein: low side - out #11
|
||||||
CONFIGB(injectionPins)[2] = GPIOE_3; // Frankenstein: low side - out #8
|
boardConfiguration->injectionPins[2] = GPIOE_3; // Frankenstein: low side - out #8
|
||||||
CONFIGB(injectionPins)[3] = GPIOE_5; // Frankenstein: low side - out #6
|
boardConfiguration->injectionPins[3] = GPIOE_5; // Frankenstein: low side - out #6
|
||||||
|
|
||||||
|
|
||||||
// Frankenstein: high side #1: PE8
|
// Frankenstein: high side #1: PE8
|
||||||
// Frankenstein: high side #2: PE10
|
// Frankenstein: high side #2: PE10
|
||||||
|
|
||||||
CONFIGB(ignitionPins)[0] = GPIOE_8; // Frankenstein: high side #1
|
boardConfiguration->ignitionPins[0] = GPIOE_8; // Frankenstein: high side #1
|
||||||
CONFIGB(ignitionPins)[1] = GPIO_UNASSIGNED;
|
boardConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(ignitionPins)[2] = GPIOE_10; // // Frankenstein: high side #2
|
boardConfiguration->ignitionPins[2] = GPIOE_10; // // Frankenstein: high side #2
|
||||||
CONFIGB(ignitionPins)[3] = GPIO_UNASSIGNED;
|
boardConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
engineConfiguration->HD44780width = 20;
|
engineConfiguration->HD44780width = 20;
|
||||||
engineConfiguration->HD44780height = 4;
|
engineConfiguration->HD44780height = 4;
|
||||||
|
|
|
@ -18,25 +18,25 @@
|
||||||
#include "engine_math.h"
|
#include "engine_math.h"
|
||||||
#include "allsensors.h"
|
#include "allsensors.h"
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
void setFrankenstein_01_LCD(board_configuration_s *boardConfiguration) {
|
||||||
|
boardConfiguration->HD44780_rs = GPIOE_9;
|
||||||
void setFrankenstein_01_LCD(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
boardConfiguration->HD44780_e = GPIOE_11;
|
||||||
CONFIGB(HD44780_rs) = GPIOE_9;
|
boardConfiguration->HD44780_db4 = GPIOE_13;
|
||||||
CONFIGB(HD44780_e) = GPIOE_11;
|
boardConfiguration->HD44780_db5 = GPIOE_15;
|
||||||
CONFIGB(HD44780_db4) = GPIOE_13;
|
boardConfiguration->HD44780_db6 = GPIOB_11;
|
||||||
CONFIGB(HD44780_db5) = GPIOE_15;
|
boardConfiguration->HD44780_db7 = GPIOB_13;
|
||||||
CONFIGB(HD44780_db6) = GPIOB_11;
|
|
||||||
CONFIGB(HD44780_db7) = GPIOB_13;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EXTERN_ENGINE;
|
||||||
|
|
||||||
void setRoverv8(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
void setRoverv8(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
|
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
|
||||||
// set trigger_type 9
|
// set trigger_type 9
|
||||||
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_36_1;
|
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_36_1;
|
||||||
|
|
||||||
CONFIGB(is_enabled_spi_2) = false;
|
boardConfiguration->is_enabled_spi_2 = false;
|
||||||
CONFIGB(isHip9011Enabled) = false;
|
boardConfiguration->isHip9011Enabled = false;
|
||||||
setFrankenstein_01_LCD(PASS_ENGINE_PARAMETER_SIGNATURE);
|
setFrankenstein_01_LCD(boardConfiguration);
|
||||||
|
|
||||||
engineConfiguration->specs.displacement = 3.528;
|
engineConfiguration->specs.displacement = 3.528;
|
||||||
engineConfiguration->specs.cylindersCount = 8;
|
engineConfiguration->specs.cylindersCount = 8;
|
||||||
|
@ -57,13 +57,13 @@ void setRoverv8(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
|
|
||||||
// set ignition_mode 2
|
// set ignition_mode 2
|
||||||
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
|
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
|
||||||
CONFIGB(ignitionPinMode) = OM_INVERTED;
|
boardConfiguration->ignitionPinMode = OM_INVERTED;
|
||||||
|
|
||||||
// set_ignition_channels
|
// set_ignition_channels
|
||||||
CONFIGB(ignitionPins)[0] = GPIOE_8; // Frankenstein: low side - out #x (?)
|
boardConfiguration->ignitionPins[0] = GPIOE_8; // Frankenstein: low side - out #x (?)
|
||||||
CONFIGB(ignitionPins)[7] = GPIOE_10; // Frankenstein: low side - out #x (?)
|
boardConfiguration->ignitionPins[7] = GPIOE_10; // Frankenstein: low side - out #x (?)
|
||||||
CONFIGB(ignitionPins)[3] = GPIOE_12; // Frankenstein: low side - out #x (?)
|
boardConfiguration->ignitionPins[3] = GPIOE_12; // Frankenstein: low side - out #x (?)
|
||||||
CONFIGB(ignitionPins)[2] = GPIOE_14; // Frankenstein: low side - out #x (?)
|
boardConfiguration->ignitionPins[2] = GPIOE_14; // Frankenstein: low side - out #x (?)
|
||||||
|
|
||||||
// Frankenstein: low side - out #1: PC14
|
// Frankenstein: low side - out #1: PC14
|
||||||
// Frankenstein: low side - out #2: PC15
|
// Frankenstein: low side - out #2: PC15
|
||||||
|
@ -78,27 +78,27 @@ void setRoverv8(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
// Frankenstein: low side - out #11: PB8
|
// Frankenstein: low side - out #11: PB8
|
||||||
// Frankenstein: low side - out #12: PB9
|
// Frankenstein: low side - out #12: PB9
|
||||||
|
|
||||||
CONFIGB(injectionPins)[0] = GPIOC_14; // Frankenstein: low side - out #1
|
boardConfiguration->injectionPins[0] = GPIOC_14; // Frankenstein: low side - out #1
|
||||||
CONFIGB(injectionPins)[1] = GPIOC_15; // Frankenstein: low side - out #2
|
boardConfiguration->injectionPins[1] = GPIOC_15; // Frankenstein: low side - out #2
|
||||||
CONFIGB(injectionPins)[2] = GPIOE_6; // Frankenstein: low side - out #3
|
boardConfiguration->injectionPins[2] = GPIOE_6; // Frankenstein: low side - out #3
|
||||||
CONFIGB(injectionPins)[3] = GPIOC_13; // Frankenstein: low side - out #4
|
boardConfiguration->injectionPins[3] = GPIOC_13; // Frankenstein: low side - out #4
|
||||||
CONFIGB(injectionPins)[4] = GPIOE_4; // Frankenstein: low side - out #5
|
boardConfiguration->injectionPins[4] = GPIOE_4; // Frankenstein: low side - out #5
|
||||||
CONFIGB(injectionPins)[5] = GPIOE_5; // Frankenstein: low side - out #6
|
boardConfiguration->injectionPins[5] = GPIOE_5; // Frankenstein: low side - out #6
|
||||||
CONFIGB(injectionPins)[6] = GPIOE_2; // Frankenstein: low side - out #7
|
boardConfiguration->injectionPins[6] = GPIOE_2; // Frankenstein: low side - out #7
|
||||||
CONFIGB(injectionPins)[7] = GPIOE_3; // Frankenstein: low side - out #8
|
boardConfiguration->injectionPins[7] = GPIOE_3; // Frankenstein: low side - out #8
|
||||||
|
|
||||||
// not valid ICU pin CONFIGB(vehicleSpeedSensorInputPin) = GPIOC_2;
|
// not valid ICU pin boardConfiguration->vehicleSpeedSensorInputPin = GPIOC_2;
|
||||||
|
|
||||||
//GPIOE_0 AND GPIOE_1 are bad pins since they conflict with accelerometer
|
//GPIOE_0 AND GPIOE_1 are bad pins since they conflict with accelerometer
|
||||||
//no malfunction indicator pin needed, since we use CAN_BUS_MAZDA_RX8
|
//no malfunction indicator pin needed, since we use CAN_BUS_MAZDA_RX8
|
||||||
//CONFIGB(fuelPumpPin) = GPIOE_0; // Frankenstein: low side - out #9
|
//boardConfiguration->fuelPumpPin = GPIOE_0; // Frankenstein: low side - out #9
|
||||||
//CONFIGB(malfunctionIndicatorPin) = GPIOE_1; // Frankenstein: low side - out #10
|
//boardConfiguration->malfunctionIndicatorPin = GPIOE_1; // Frankenstein: low side - out #10
|
||||||
CONFIGB(fuelPumpPin) = GPIOB_8; // Frankenstein: low side - out #11
|
boardConfiguration->fuelPumpPin = GPIOB_8; // Frankenstein: low side - out #11
|
||||||
CONFIGB(fuelPumpPinMode) = OM_DEFAULT;
|
boardConfiguration->fuelPumpPinMode = OM_DEFAULT;
|
||||||
CONFIGB(mainRelayPin) = GPIOB_9; // Frankenstein: low side - out #12
|
boardConfiguration->mainRelayPin = GPIOB_9; // Frankenstein: low side - out #12
|
||||||
|
|
||||||
CONFIGB(triggerInputPins)[0] = GPIOC_6; // 2G YEL/BLU
|
boardConfiguration->triggerInputPins[0] = GPIOC_6; // 2G YEL/BLU
|
||||||
CONFIGB(triggerInputPins)[1] = GPIOA_5; // 2E White CKP
|
boardConfiguration->triggerInputPins[1] = GPIOA_5; // 2E White CKP
|
||||||
|
|
||||||
setCommonNTCSensor(&engineConfiguration->clt);
|
setCommonNTCSensor(&engineConfiguration->clt);
|
||||||
engineConfiguration->clt.config.bias_resistor = 2700;
|
engineConfiguration->clt.config.bias_resistor = 2700;
|
||||||
|
@ -123,19 +123,19 @@ void setRoverv8(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->tpsMax = convertVoltageTo10bitADC(4.538);
|
engineConfiguration->tpsMax = convertVoltageTo10bitADC(4.538);
|
||||||
|
|
||||||
// Stepper logic:
|
// Stepper logic:
|
||||||
CONFIGB(idle).stepperDirectionPin = GPIOB_10;
|
boardConfiguration->idle.stepperDirectionPin = GPIOB_10;
|
||||||
CONFIGB(idle).stepperStepPin = GPIOB_15;
|
boardConfiguration->idle.stepperStepPin = GPIOB_15;
|
||||||
engineConfiguration->stepperEnablePin = GPIOB_14;
|
engineConfiguration->stepperEnablePin = GPIOB_14;
|
||||||
engineConfiguration->idleStepperReactionTime = 10;
|
engineConfiguration->idleStepperReactionTime = 10;
|
||||||
engineConfiguration->idleStepperTotalSteps = 150;
|
engineConfiguration->idleStepperTotalSteps = 150;
|
||||||
|
|
||||||
CONFIGB(useStepperIdle) = false;
|
boardConfiguration->useStepperIdle = false;
|
||||||
|
|
||||||
// set injection_pin_mode 0
|
// set injection_pin_mode 0
|
||||||
CONFIGB(injectionPinMode) = OM_DEFAULT;
|
boardConfiguration->injectionPinMode = OM_DEFAULT;
|
||||||
|
|
||||||
CONFIGB(canTxPin) = GPIOB_6;
|
boardConfiguration->canTxPin = GPIOB_6;
|
||||||
CONFIGB(canRxPin) = GPIOB_12;
|
boardConfiguration->canRxPin = GPIOB_12;
|
||||||
engineConfiguration->canWriteEnabled = true;
|
engineConfiguration->canWriteEnabled = true;
|
||||||
engineConfiguration->canReadEnabled = false;
|
engineConfiguration->canReadEnabled = false;
|
||||||
engineConfiguration->canNbcType = CAN_BUS_MAZDA_RX8;
|
engineConfiguration->canNbcType = CAN_BUS_MAZDA_RX8;
|
||||||
|
@ -144,10 +144,10 @@ void setRoverv8(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_PARAMETER_SUFFIX);
|
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
// todo: make this official Frankenstein joystick?
|
// todo: make this official Frankenstein joystick?
|
||||||
CONFIGB(joystickCenterPin) = GPIOD_8;
|
boardConfiguration->joystickCenterPin = GPIOD_8;
|
||||||
CONFIGB(joystickAPin) = GPIOD_10;
|
boardConfiguration->joystickAPin = GPIOD_10;
|
||||||
CONFIGB(joystickBPin) = GPIO_UNASSIGNED;
|
boardConfiguration->joystickBPin = GPIO_UNASSIGNED;
|
||||||
CONFIGB(joystickCPin) = GPIO_UNASSIGNED;
|
boardConfiguration->joystickCPin = GPIO_UNASSIGNED;
|
||||||
CONFIGB(joystickDPin) = GPIOD_11;
|
boardConfiguration->joystickDPin = GPIOD_11;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
void setFrankenstein_01_LCD(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
void setFrankenstein_01_LCD(board_configuration_s *boardConfiguration);
|
||||||
void setRoverv8(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
void setRoverv8(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
#endif /* ROVER_V8_H_ */
|
#endif /* ROVER_V8_H_ */
|
||||||
|
|
|
@ -34,7 +34,7 @@ void setSachs(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->trigger.customTotalToothCount = 50;
|
engineConfiguration->trigger.customTotalToothCount = 50;
|
||||||
engineConfiguration->trigger.customSkippedToothCount = 2;
|
engineConfiguration->trigger.customSkippedToothCount = 2;
|
||||||
|
|
||||||
CONFIGB(useSerialPort) = false;
|
boardConfiguration->useSerialPort = false;
|
||||||
|
|
||||||
// Frankenstein analog input #1: PA1 adc1 MAP
|
// Frankenstein analog input #1: PA1 adc1 MAP
|
||||||
// Frankenstein analog input #2: PA3 adc3 TPS
|
// Frankenstein analog input #2: PA3 adc3 TPS
|
||||||
|
@ -73,12 +73,12 @@ void setSachs(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
// Frankenstein: low side - out #11: PB8
|
// Frankenstein: low side - out #11: PB8
|
||||||
// Frankenstein: low side - out #12: PB9
|
// Frankenstein: low side - out #12: PB9
|
||||||
|
|
||||||
CONFIGB(triggerInputPins)[0] = GPIOA_5;
|
boardConfiguration->triggerInputPins[0] = GPIOA_5;
|
||||||
CONFIGB(triggerInputPins)[1] = GPIO_UNASSIGNED;
|
boardConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
CONFIGB(injectionPins)[0] = GPIOC_15;
|
boardConfiguration->injectionPins[0] = GPIOC_15;
|
||||||
|
|
||||||
CONFIGB(fuelPumpPin) = GPIOE_6;
|
boardConfiguration->fuelPumpPin = GPIOE_6;
|
||||||
|
|
||||||
// todo: extract a method? figure out something smarter
|
// todo: extract a method? figure out something smarter
|
||||||
setFuelRpmBin(800, 15000 PASS_ENGINE_PARAMETER_SUFFIX);
|
setFuelRpmBin(800, 15000 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
@ -87,7 +87,7 @@ void setSachs(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
setLinearCurve(config->afrRpmBins, FUEL_RPM_COUNT, 15000, 7000, 1);
|
setLinearCurve(config->afrRpmBins, FUEL_RPM_COUNT, 15000, 7000, 1);
|
||||||
|
|
||||||
engineConfiguration->hasFrequencyReportingMapSensor = true;
|
engineConfiguration->hasFrequencyReportingMapSensor = true;
|
||||||
CONFIGB(frequencyReportingMapInputPin) = GPIOC_6;
|
boardConfiguration->frequencyReportingMapInputPin = GPIOC_6;
|
||||||
CONFIGB(mapFrequency100Kpa) = 159;
|
boardConfiguration->mapFrequency100Kpa = 159;
|
||||||
CONFIGB(mapFrequency0Kpa) = 80;
|
boardConfiguration->mapFrequency0Kpa = 80;
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,8 +14,8 @@
|
||||||
EXTERN_ENGINE;
|
EXTERN_ENGINE;
|
||||||
|
|
||||||
void setSubaru2003Wrx(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
void setSubaru2003Wrx(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
setFrankenso_01_LCD(PASS_ENGINE_PARAMETER_SIGNATURE);
|
setFrankenso_01_LCD(boardConfiguration);
|
||||||
setFrankenso0_1_joystick(PASS_ENGINE_PARAMETER_SIGNATURE);
|
setFrankenso0_1_joystick(engineConfiguration);
|
||||||
|
|
||||||
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL;
|
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL;
|
||||||
engineConfiguration->trigger.customTotalToothCount = 5;
|
engineConfiguration->trigger.customTotalToothCount = 5;
|
||||||
|
@ -23,15 +23,15 @@ void setSubaru2003Wrx(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
|
|
||||||
engineConfiguration->sensorChartFrequency = 2;
|
engineConfiguration->sensorChartFrequency = 2;
|
||||||
|
|
||||||
CONFIGB(useStepperIdle) = true;
|
boardConfiguration->useStepperIdle = true;
|
||||||
|
|
||||||
// See http://rusefi.com/forum/viewtopic.php?f=4&t=1161
|
// See http://rusefi.com/forum/viewtopic.php?f=4&t=1161
|
||||||
CONFIGB(idle).stepperDirectionPin = GPIOD_1; // top stepper drive pin, white wire recommended
|
boardConfiguration->idle.stepperDirectionPin = GPIOD_1; // top stepper drive pin, white wire recommended
|
||||||
CONFIGB(idle).stepperStepPin = GPIOD_6; // yellow wire recommended
|
boardConfiguration->idle.stepperStepPin = GPIOD_6; // yellow wire recommended
|
||||||
engineConfiguration->stepperEnablePin = GPIOB_1; // bottom stepper driver board pin, blue wire recommended
|
engineConfiguration->stepperEnablePin = GPIOB_1; // bottom stepper driver board pin, blue wire recommended
|
||||||
|
|
||||||
CONFIGB(triggerSimulatorPins)[0] = GPIO_UNASSIGNED; // we want to avoid PD1 conflict
|
boardConfiguration->triggerSimulatorPins[0] = GPIO_UNASSIGNED; // we want to avoid PD1 conflict
|
||||||
CONFIGB(triggerSimulatorPins)[1] = GPIO_UNASSIGNED;
|
boardConfiguration->triggerSimulatorPins[1] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(triggerSimulatorPins)[2] = GPIO_UNASSIGNED;
|
boardConfiguration->triggerSimulatorPins[2] = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ void setSuzukiVitara(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->ignitionMode = IM_ONE_COIL;
|
engineConfiguration->ignitionMode = IM_ONE_COIL;
|
||||||
engineConfiguration->injectionMode = IM_SIMULTANEOUS;
|
engineConfiguration->injectionMode = IM_SIMULTANEOUS;
|
||||||
|
|
||||||
CONFIGB(mainRelayPin) = GPIOE_6;
|
boardConfiguration->mainRelayPin = GPIOE_6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -40,17 +40,17 @@ void setTestEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
board_configuration_s *bc = &engineConfiguration->bc;
|
board_configuration_s *bc = &engineConfiguration->bc;
|
||||||
bc->malfunctionIndicatorPin = GPIO_UNASSIGNED;
|
bc->malfunctionIndicatorPin = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
CONFIGB(ignitionPins)[0] = GPIOC_7; // #1
|
boardConfiguration->ignitionPins[0] = GPIOC_7; // #1
|
||||||
CONFIGB(ignitionPins)[1] = GPIO_UNASSIGNED; // #2
|
boardConfiguration->ignitionPins[1] = GPIO_UNASSIGNED; // #2
|
||||||
CONFIGB(ignitionPins)[2] = GPIO_UNASSIGNED; // #3
|
boardConfiguration->ignitionPins[2] = GPIO_UNASSIGNED; // #3
|
||||||
CONFIGB(ignitionPins)[3] = GPIO_UNASSIGNED; // #4
|
boardConfiguration->ignitionPins[3] = GPIO_UNASSIGNED; // #4
|
||||||
CONFIGB(ignitionPins)[4] = GPIO_UNASSIGNED; // #5
|
boardConfiguration->ignitionPins[4] = GPIO_UNASSIGNED; // #5
|
||||||
CONFIGB(ignitionPins)[5] = GPIO_UNASSIGNED; // #6
|
boardConfiguration->ignitionPins[5] = GPIO_UNASSIGNED; // #6
|
||||||
|
|
||||||
CONFIGB(logicAnalyzerPins)[0] = GPIO_UNASSIGNED;
|
boardConfiguration->logicAnalyzerPins[0] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(logicAnalyzerPins)[1] = GPIO_UNASSIGNED;
|
boardConfiguration->logicAnalyzerPins[1] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(logicAnalyzerPins)[2] = GPIO_UNASSIGNED;
|
boardConfiguration->logicAnalyzerPins[2] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(logicAnalyzerPins)[3] = GPIO_UNASSIGNED;
|
boardConfiguration->logicAnalyzerPins[3] = GPIO_UNASSIGNED;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setTestVVTEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
void setTestVVTEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
|
@ -63,7 +63,7 @@ void setTestVVTEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
// set algorithm 3
|
// set algorithm 3
|
||||||
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_PARAMETER_SUFFIX);
|
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
CONFIGB(triggerInputPins)[1] = GPIO_UNASSIGNED;
|
boardConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED;
|
||||||
engineConfiguration->camInput = GPIOA_5;
|
engineConfiguration->camInput = GPIOA_5;
|
||||||
|
|
||||||
// set global_trigger_offset_angle 0
|
// set global_trigger_offset_angle 0
|
||||||
|
|
|
@ -32,22 +32,22 @@ static void common2jz(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
// set ignition_mode 1
|
// set ignition_mode 1
|
||||||
engineConfiguration->ignitionMode = IM_INDIVIDUAL_COILS;
|
engineConfiguration->ignitionMode = IM_INDIVIDUAL_COILS;
|
||||||
|
|
||||||
CONFIGB(ignitionPins)[0] = GPIOE_14;
|
boardConfiguration->ignitionPins[0] = GPIOE_14;
|
||||||
CONFIGB(ignitionPins)[1] = GPIOC_7;
|
boardConfiguration->ignitionPins[1] = GPIOC_7;
|
||||||
CONFIGB(ignitionPins)[2] = GPIOC_9;
|
boardConfiguration->ignitionPins[2] = GPIOC_9;
|
||||||
CONFIGB(ignitionPins)[3] = GPIOE_10;
|
boardConfiguration->ignitionPins[3] = GPIOE_10;
|
||||||
CONFIGB(ignitionPins)[4] = GPIOE_8;
|
boardConfiguration->ignitionPins[4] = GPIOE_8;
|
||||||
CONFIGB(ignitionPins)[5] = GPIOE_12;
|
boardConfiguration->ignitionPins[5] = GPIOE_12;
|
||||||
|
|
||||||
|
|
||||||
CONFIGB(injectionPins)[0] = GPIOB_9; // #1
|
boardConfiguration->injectionPins[0] = GPIOB_9; // #1
|
||||||
CONFIGB(injectionPins)[1] = GPIOE_2; // #2
|
boardConfiguration->injectionPins[1] = GPIOE_2; // #2
|
||||||
CONFIGB(injectionPins)[2] = GPIOB_8; // #3
|
boardConfiguration->injectionPins[2] = GPIOB_8; // #3
|
||||||
CONFIGB(injectionPins)[3] = GPIOB_7; // #4
|
boardConfiguration->injectionPins[3] = GPIOB_7; // #4
|
||||||
CONFIGB(injectionPins)[4] = GPIOE_3; // #5
|
boardConfiguration->injectionPins[4] = GPIOE_3; // #5
|
||||||
CONFIGB(injectionPins)[5] = GPIOE_4; // #6
|
boardConfiguration->injectionPins[5] = GPIOE_4; // #6
|
||||||
|
|
||||||
CONFIGB(fuelPumpPin) = GPIO_UNASSIGNED;
|
boardConfiguration->fuelPumpPin = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
// chartsize 450
|
// chartsize 450
|
||||||
engineConfiguration->engineChartSize = 450;
|
engineConfiguration->engineChartSize = 450;
|
||||||
|
@ -87,10 +87,10 @@ void setToyota_jzs147EngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
// engineConfiguration->injectionMode = IM_BATCH;
|
// engineConfiguration->injectionMode = IM_BATCH;
|
||||||
// engineConfiguration->twoWireBatchInjection = true;
|
// engineConfiguration->twoWireBatchInjection = true;
|
||||||
|
|
||||||
// CONFIGB(triggerInputPins)[0] = GPIOA_5;
|
// boardConfiguration->triggerInputPins[0] = GPIOA_5;
|
||||||
// CONFIGB(triggerInputPins)[1] = GPIOC_6;
|
// boardConfiguration->triggerInputPins[1] = GPIOC_6;
|
||||||
|
|
||||||
CONFIGB(isSdCardEnabled) = false;
|
boardConfiguration->isSdCardEnabled = false;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -98,13 +98,13 @@ void setToyota_jzs147EngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
void setToyota_2jz_vics(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
void setToyota_2jz_vics(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
common2jz(PASS_ENGINE_PARAMETER_SIGNATURE);
|
common2jz(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
CONFIGB(isSdCardEnabled) = true;
|
boardConfiguration->isSdCardEnabled = true;
|
||||||
|
|
||||||
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
|
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
|
||||||
engineConfiguration->trigger.type = TT_2JZ_3_34;
|
engineConfiguration->trigger.type = TT_2JZ_3_34;
|
||||||
|
|
||||||
CONFIGB(triggerInputPins)[0] = GPIOA_5; // crank sensor
|
boardConfiguration->triggerInputPins[0] = GPIOA_5; // crank sensor
|
||||||
CONFIGB(triggerInputPins)[1] = GPIO_UNASSIGNED; // cam sensor will he handled by custom vtti code
|
boardConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED; // cam sensor will he handled by custom vtti code
|
||||||
|
|
||||||
engineConfiguration->camInput = GPIOC_6;
|
engineConfiguration->camInput = GPIOC_6;
|
||||||
engineConfiguration->vvtMode = VVT_2GZ;
|
engineConfiguration->vvtMode = VVT_2GZ;
|
||||||
|
|
|
@ -49,11 +49,11 @@ void setVwAba(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
|
|
||||||
engineConfiguration->ignitionMode = IM_ONE_COIL;
|
engineConfiguration->ignitionMode = IM_ONE_COIL;
|
||||||
|
|
||||||
CONFIGB(ignitionPins)[0] = GPIOE_14; // Frankenso high side - pin 1G
|
boardConfiguration->ignitionPins[0] = GPIOE_14; // Frankenso high side - pin 1G
|
||||||
CONFIGB(ignitionPins)[1] = GPIO_UNASSIGNED;
|
boardConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(ignitionPins)[2] = GPIO_UNASSIGNED;
|
boardConfiguration->ignitionPins[2] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(ignitionPins)[3] = GPIO_UNASSIGNED;
|
boardConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(ignitionPinMode) = OM_DEFAULT;
|
boardConfiguration->ignitionPinMode = OM_DEFAULT;
|
||||||
|
|
||||||
float mapRange = 110;
|
float mapRange = 110;
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ void setVwAba(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
setFuelTablesLoadBin(20, mapRange PASS_ENGINE_PARAMETER_SUFFIX);
|
setFuelTablesLoadBin(20, mapRange PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
setTimingLoadBin(20, mapRange PASS_ENGINE_PARAMETER_SUFFIX);
|
setTimingLoadBin(20, mapRange PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
||||||
CONFIGB(isSdCardEnabled) = false;
|
boardConfiguration->isSdCardEnabled = false;
|
||||||
engineConfiguration->tpsMin = 740;
|
engineConfiguration->tpsMin = 740;
|
||||||
engineConfiguration->tpsMax = 135;
|
engineConfiguration->tpsMax = 135;
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,39 +31,39 @@ void setZil130(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CONFIGB(malfunctionIndicatorPin) = GPIO_UNASSIGNED;
|
boardConfiguration->malfunctionIndicatorPin = GPIO_UNASSIGNED;
|
||||||
// engineConfiguration->twoWireBatchInjection = true;
|
// engineConfiguration->twoWireBatchInjection = true;
|
||||||
CONFIGB(injectionPinMode) = OM_INVERTED;
|
boardConfiguration->injectionPinMode = OM_INVERTED;
|
||||||
CONFIGB(injectionPins)[0] = GPIOB_8; // #1
|
boardConfiguration->injectionPins[0] = GPIOB_8; // #1
|
||||||
CONFIGB(injectionPins)[1] = GPIOE_2; // #2
|
boardConfiguration->injectionPins[1] = GPIOE_2; // #2
|
||||||
CONFIGB(injectionPins)[2] = GPIOE_3; // #3
|
boardConfiguration->injectionPins[2] = GPIOE_3; // #3
|
||||||
CONFIGB(injectionPins)[3] = GPIOE_4; // #4
|
boardConfiguration->injectionPins[3] = GPIOE_4; // #4
|
||||||
CONFIGB(injectionPins)[4] = GPIO_UNASSIGNED; // #5
|
boardConfiguration->injectionPins[4] = GPIO_UNASSIGNED; // #5
|
||||||
CONFIGB(injectionPins)[5] = GPIO_UNASSIGNED; // #6
|
boardConfiguration->injectionPins[5] = GPIO_UNASSIGNED; // #6
|
||||||
CONFIGB(injectionPins)[6] = GPIO_UNASSIGNED;
|
boardConfiguration->injectionPins[6] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(injectionPins)[5] = GPIO_UNASSIGNED;
|
boardConfiguration->injectionPins[5] = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
CONFIGB(ignitionPins)[0] = GPIOB_5; // #1
|
boardConfiguration->ignitionPins[0] = GPIOB_5; // #1
|
||||||
CONFIGB(ignitionPins)[1] = GPIOB_6; // #2
|
boardConfiguration->ignitionPins[1] = GPIOB_6; // #2
|
||||||
CONFIGB(ignitionPins)[2] = GPIO_UNASSIGNED; // #3
|
boardConfiguration->ignitionPins[2] = GPIO_UNASSIGNED; // #3
|
||||||
CONFIGB(ignitionPins)[3] = GPIOB_7; // #4
|
boardConfiguration->ignitionPins[3] = GPIOB_7; // #4
|
||||||
CONFIGB(ignitionPins)[4] = GPIOC_7; // #5
|
boardConfiguration->ignitionPins[4] = GPIOC_7; // #5
|
||||||
|
|
||||||
// fuel pump
|
// fuel pump
|
||||||
CONFIGB(fuelPumpPin) = GPIOD_4;
|
boardConfiguration->fuelPumpPin = GPIOD_4;
|
||||||
|
|
||||||
// idle
|
// idle
|
||||||
CONFIGB(idle).solenoidPin = GPIOC_14;
|
boardConfiguration->idle.solenoidPin = GPIOC_14;
|
||||||
CONFIGB(idle).solenoidPinMode = OM_INVERTED;
|
boardConfiguration->idle.solenoidPinMode = OM_INVERTED;
|
||||||
CONFIGB(idle).solenoidFrequency = 300;
|
boardConfiguration->idle.solenoidFrequency = 300;
|
||||||
CONFIGB(manIdlePosition) = 50; // set_idle_pwm 50
|
boardConfiguration->manIdlePosition = 50; // set_idle_pwm 50
|
||||||
|
|
||||||
// disable sd_card
|
// disable sd_card
|
||||||
CONFIGB(sdCardCsPin) = GPIO_UNASSIGNED;
|
boardConfiguration->sdCardCsPin = GPIO_UNASSIGNED;
|
||||||
CONFIGB(is_enabled_spi_2) = false;
|
boardConfiguration->is_enabled_spi_2 = false;
|
||||||
CONFIGB(is_enabled_spi_3) = false;
|
boardConfiguration->is_enabled_spi_3 = false;
|
||||||
CONFIGB(max31855spiDevice) = SPI_NONE;
|
boardConfiguration->max31855spiDevice = SPI_NONE;
|
||||||
|
|
||||||
CONFIGB(fanPin) = GPIO_UNASSIGNED;
|
boardConfiguration->fanPin = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -272,13 +272,14 @@ static void initTemperatureCurve(float *bins, float *values, int size, float def
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setDefaultFsioParameters(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
static void setDefaultFsioParameters(engine_configuration_s *engineConfiguration) {
|
||||||
|
board_configuration_s *boardConfiguration = &engineConfiguration->bc;
|
||||||
for (int i = 0; i < AUX_PID_COUNT; i++) {
|
for (int i = 0; i < AUX_PID_COUNT; i++) {
|
||||||
engineConfiguration->auxPidPins[i] = GPIO_UNASSIGNED;
|
engineConfiguration->auxPidPins[i] = GPIO_UNASSIGNED;
|
||||||
}
|
}
|
||||||
for (int i = 0; i < FSIO_COMMAND_COUNT; i++) {
|
for (int i = 0; i < FSIO_COMMAND_COUNT; i++) {
|
||||||
CONFIGB(fsioOutputPins)[i] = GPIO_UNASSIGNED;
|
boardConfiguration->fsioOutputPins[i] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(fsioDigitalInputs)[i] = GPIO_UNASSIGNED;
|
boardConfiguration->fsioDigitalInputs[i] = GPIO_UNASSIGNED;
|
||||||
engineConfiguration->fsioInputModes[i] = PI_DEFAULT;
|
engineConfiguration->fsioInputModes[i] = PI_DEFAULT;
|
||||||
}
|
}
|
||||||
for (int i = 0; i < FSIO_ANALOG_INPUT_COUNT ; i++) {
|
for (int i = 0; i < FSIO_ANALOG_INPUT_COUNT ; i++) {
|
||||||
|
@ -291,17 +292,14 @@ void prepareVoidConfiguration(engine_configuration_s *engineConfiguration) {
|
||||||
memset(engineConfiguration, 0, sizeof(engine_configuration_s));
|
memset(engineConfiguration, 0, sizeof(engine_configuration_s));
|
||||||
board_configuration_s *boardConfiguration = &engineConfiguration->bc;
|
board_configuration_s *boardConfiguration = &engineConfiguration->bc;
|
||||||
|
|
||||||
// TODO: need to fix this place!!!
|
setDefaultFsioParameters(engineConfiguration);
|
||||||
persistent_config_s *config = NULL;
|
|
||||||
Engine *engine = NULL;
|
|
||||||
setDefaultFsioParameters(PASS_ENGINE_PARAMETER_SIGNATURE);
|
|
||||||
|
|
||||||
disableLCD(PASS_ENGINE_PARAMETER_SIGNATURE);
|
disableLCD(boardConfiguration);
|
||||||
|
|
||||||
engineConfiguration->camInput = GPIO_UNASSIGNED;
|
engineConfiguration->camInput = GPIO_UNASSIGNED;
|
||||||
CONFIGB(triggerInputPins)[0] = GPIO_UNASSIGNED;
|
boardConfiguration->triggerInputPins[0] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(triggerInputPins)[1] = GPIO_UNASSIGNED;
|
boardConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(triggerInputPins)[2] = GPIO_UNASSIGNED;
|
boardConfiguration->triggerInputPins[2] = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
for (int i = 0; i < SERVO_COUNT; i++) {
|
for (int i = 0; i < SERVO_COUNT; i++) {
|
||||||
engineConfiguration->servoOutputPins[i] = GPIO_UNASSIGNED;
|
engineConfiguration->servoOutputPins[i] = GPIO_UNASSIGNED;
|
||||||
|
@ -314,33 +312,33 @@ void prepareVoidConfiguration(engine_configuration_s *engineConfiguration) {
|
||||||
engineConfiguration->flexFuelSensor = GPIO_UNASSIGNED;
|
engineConfiguration->flexFuelSensor = GPIO_UNASSIGNED;
|
||||||
engineConfiguration->test557pin = GPIO_UNASSIGNED;
|
engineConfiguration->test557pin = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
CONFIGB(cdmInputPin) = GPIO_UNASSIGNED;
|
boardConfiguration->cdmInputPin = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
CONFIGB(joystickCenterPin) = GPIO_UNASSIGNED;
|
boardConfiguration->joystickCenterPin = GPIO_UNASSIGNED;
|
||||||
CONFIGB(joystickAPin) = GPIO_UNASSIGNED;
|
boardConfiguration->joystickAPin = GPIO_UNASSIGNED;
|
||||||
CONFIGB(joystickBPin) = GPIO_UNASSIGNED;
|
boardConfiguration->joystickBPin = GPIO_UNASSIGNED;
|
||||||
CONFIGB(joystickCPin) = GPIO_UNASSIGNED;
|
boardConfiguration->joystickCPin = GPIO_UNASSIGNED;
|
||||||
CONFIGB(joystickDPin) = GPIO_UNASSIGNED;
|
boardConfiguration->joystickDPin = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
CONFIGB(frequencyReportingMapInputPin) = GPIO_UNASSIGNED;
|
boardConfiguration->frequencyReportingMapInputPin = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
engineConfiguration->sdCardSpiDevice = SPI_NONE;
|
engineConfiguration->sdCardSpiDevice = SPI_NONE;
|
||||||
CONFIGB(sdCardCsPin) = GPIO_UNASSIGNED;
|
boardConfiguration->sdCardCsPin = GPIO_UNASSIGNED;
|
||||||
engineConfiguration->accelerometerSpiDevice = SPI_DEVICE_1;
|
engineConfiguration->accelerometerSpiDevice = SPI_DEVICE_1;
|
||||||
|
|
||||||
engineConfiguration->cj125ua = EFI_ADC_NONE;
|
engineConfiguration->cj125ua = EFI_ADC_NONE;
|
||||||
engineConfiguration->cj125ur = EFI_ADC_NONE;
|
engineConfiguration->cj125ur = EFI_ADC_NONE;
|
||||||
|
|
||||||
CONFIGB(idle).stepperDirectionPin = GPIO_UNASSIGNED;
|
boardConfiguration->idle.stepperDirectionPin = GPIO_UNASSIGNED;
|
||||||
engineConfiguration->stepperDirectionPinMode = OM_DEFAULT;
|
engineConfiguration->stepperDirectionPinMode = OM_DEFAULT;
|
||||||
CONFIGB(idle).stepperStepPin = GPIO_UNASSIGNED;
|
boardConfiguration->idle.stepperStepPin = GPIO_UNASSIGNED;
|
||||||
engineConfiguration->stepperEnablePin = GPIO_UNASSIGNED;
|
engineConfiguration->stepperEnablePin = GPIO_UNASSIGNED;
|
||||||
engineConfiguration->stepperEnablePinMode = OM_DEFAULT;
|
engineConfiguration->stepperEnablePinMode = OM_DEFAULT;
|
||||||
|
|
||||||
engineConfiguration->dizzySparkOutputPin = GPIO_UNASSIGNED;
|
engineConfiguration->dizzySparkOutputPin = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
CONFIGB(acRelayPin) = GPIO_UNASSIGNED;
|
boardConfiguration->acRelayPin = GPIO_UNASSIGNED;
|
||||||
CONFIGB(acRelayPinMode) = OM_DEFAULT;
|
boardConfiguration->acRelayPinMode = OM_DEFAULT;
|
||||||
|
|
||||||
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
||||||
setDefaultAlternatorParameters();
|
setDefaultAlternatorParameters();
|
||||||
|
@ -352,50 +350,50 @@ void prepareVoidConfiguration(engine_configuration_s *engineConfiguration) {
|
||||||
#if EFI_IDLE_CONTROL || defined(__DOXYGEN__)
|
#if EFI_IDLE_CONTROL || defined(__DOXYGEN__)
|
||||||
setDefaultIdleParameters();
|
setDefaultIdleParameters();
|
||||||
#endif
|
#endif
|
||||||
CONFIGB(wboHeaterPin) = GPIO_UNASSIGNED;
|
boardConfiguration->wboHeaterPin = GPIO_UNASSIGNED;
|
||||||
CONFIGB(cj125CsPin) = GPIO_UNASSIGNED;
|
boardConfiguration->cj125CsPin = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
CONFIGB(hip9011CsPin) = GPIO_UNASSIGNED;
|
boardConfiguration->hip9011CsPin = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
CONFIGB(mainRelayPin) = GPIO_UNASSIGNED;
|
boardConfiguration->mainRelayPin = GPIO_UNASSIGNED;
|
||||||
CONFIGB(mainRelayPinMode) = OM_DEFAULT;
|
boardConfiguration->mainRelayPinMode = OM_DEFAULT;
|
||||||
CONFIGB(idle).solenoidPin = GPIO_UNASSIGNED;
|
boardConfiguration->idle.solenoidPin = GPIO_UNASSIGNED;
|
||||||
CONFIGB(idle).solenoidPinMode = OM_DEFAULT;
|
boardConfiguration->idle.solenoidPinMode = OM_DEFAULT;
|
||||||
CONFIGB(fuelPumpPin) = GPIO_UNASSIGNED;
|
boardConfiguration->fuelPumpPin = GPIO_UNASSIGNED;
|
||||||
CONFIGB(fuelPumpPinMode) = OM_DEFAULT;
|
boardConfiguration->fuelPumpPinMode = OM_DEFAULT;
|
||||||
CONFIGB(etbControlPin1) = GPIO_UNASSIGNED;
|
boardConfiguration->etbControlPin1 = GPIO_UNASSIGNED;
|
||||||
CONFIGB(etbControlPin2) = GPIO_UNASSIGNED;
|
boardConfiguration->etbControlPin2 = GPIO_UNASSIGNED;
|
||||||
CONFIGB(etbDirectionPin1) = GPIO_UNASSIGNED;
|
boardConfiguration->etbDirectionPin1 = GPIO_UNASSIGNED;
|
||||||
CONFIGB(etbDirectionPin2) = GPIO_UNASSIGNED;
|
boardConfiguration->etbDirectionPin2 = GPIO_UNASSIGNED;
|
||||||
CONFIGB(o2heaterPin) = GPIO_UNASSIGNED;
|
boardConfiguration->o2heaterPin = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
CONFIGB(tachOutputPin) = GPIO_UNASSIGNED;
|
boardConfiguration->tachOutputPin = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
CONFIGB(malfunctionIndicatorPin) = GPIO_UNASSIGNED;
|
boardConfiguration->malfunctionIndicatorPin = GPIO_UNASSIGNED;
|
||||||
CONFIGB(malfunctionIndicatorPinMode) = OM_DEFAULT;
|
boardConfiguration->malfunctionIndicatorPinMode = OM_DEFAULT;
|
||||||
|
|
||||||
CONFIGB(fanPin) = GPIO_UNASSIGNED;
|
boardConfiguration->fanPin = GPIO_UNASSIGNED;
|
||||||
CONFIGB(fanPinMode) = OM_DEFAULT;
|
boardConfiguration->fanPinMode = OM_DEFAULT;
|
||||||
|
|
||||||
CONFIGB(clutchDownPin) = GPIO_UNASSIGNED;
|
boardConfiguration->clutchDownPin = GPIO_UNASSIGNED;
|
||||||
CONFIGB(clutchDownPinMode) = PI_PULLUP;
|
boardConfiguration->clutchDownPinMode = PI_PULLUP;
|
||||||
CONFIGB(clutchUpPin) = GPIO_UNASSIGNED;
|
boardConfiguration->clutchUpPin = GPIO_UNASSIGNED;
|
||||||
CONFIGB(clutchUpPinMode) = PI_PULLUP;
|
boardConfiguration->clutchUpPinMode = PI_PULLUP;
|
||||||
engineConfiguration->brakePedalPin = GPIO_UNASSIGNED;
|
engineConfiguration->brakePedalPin = GPIO_UNASSIGNED;
|
||||||
engineConfiguration->brakePedalPinMode = PI_PULLUP;
|
engineConfiguration->brakePedalPinMode = PI_PULLUP;
|
||||||
|
|
||||||
CONFIGB(gps_rx_pin) = GPIO_UNASSIGNED;
|
boardConfiguration->gps_rx_pin = GPIO_UNASSIGNED;
|
||||||
CONFIGB(gps_tx_pin) = GPIO_UNASSIGNED;
|
boardConfiguration->gps_tx_pin = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
for (int i = 0;i < INJECTION_PIN_COUNT;i++) {
|
for (int i = 0;i < INJECTION_PIN_COUNT;i++) {
|
||||||
CONFIGB(injectionPins)[i] = GPIO_UNASSIGNED;
|
boardConfiguration->injectionPins[i] = GPIO_UNASSIGNED;
|
||||||
}
|
}
|
||||||
CONFIGB(injectionPinMode) = OM_DEFAULT;
|
boardConfiguration->injectionPinMode = OM_DEFAULT;
|
||||||
|
|
||||||
for (int i = 0;i < IGNITION_PIN_COUNT;i++) {
|
for (int i = 0;i < IGNITION_PIN_COUNT;i++) {
|
||||||
CONFIGB(ignitionPins)[i] = GPIO_UNASSIGNED;
|
boardConfiguration->ignitionPins[i] = GPIO_UNASSIGNED;
|
||||||
}
|
}
|
||||||
CONFIGB(ignitionPinMode) = OM_DEFAULT;
|
boardConfiguration->ignitionPinMode = OM_DEFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setDefaultBasePins(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
void setDefaultBasePins(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
|
@ -411,13 +409,13 @@ void setDefaultBasePins(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
|
|
||||||
// needed also by bootloader code
|
// needed also by bootloader code
|
||||||
void setDefaultSerialParameters(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
void setDefaultSerialParameters(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
CONFIGB(startConsoleInBinaryMode) = true;
|
boardConfiguration->startConsoleInBinaryMode = true;
|
||||||
CONFIGB(useSerialPort) = true;
|
boardConfiguration->useSerialPort = true;
|
||||||
engineConfiguration->binarySerialTxPin = GPIOC_10;
|
engineConfiguration->binarySerialTxPin = GPIOC_10;
|
||||||
engineConfiguration->binarySerialRxPin = GPIOC_11;
|
engineConfiguration->binarySerialRxPin = GPIOC_11;
|
||||||
engineConfiguration->consoleSerialTxPin = GPIOC_10;
|
engineConfiguration->consoleSerialTxPin = GPIOC_10;
|
||||||
engineConfiguration->consoleSerialRxPin = GPIOC_11;
|
engineConfiguration->consoleSerialRxPin = GPIOC_11;
|
||||||
CONFIGB(tunerStudioSerialSpeed) = TS_DEFAULT_SPEED;
|
boardConfiguration->tunerStudioSerialSpeed = TS_DEFAULT_SPEED;
|
||||||
engineConfiguration->uartConsoleSerialSpeed = 115200;
|
engineConfiguration->uartConsoleSerialSpeed = 115200;
|
||||||
|
|
||||||
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
||||||
|
@ -428,10 +426,10 @@ void setDefaultSerialParameters(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
|
|
||||||
// needed also by bootloader code
|
// needed also by bootloader code
|
||||||
void setDefaultSdCardParameters(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
void setDefaultSdCardParameters(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
CONFIGB(is_enabled_spi_3) = true;
|
boardConfiguration->is_enabled_spi_3 = true;
|
||||||
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_3;
|
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_3;
|
||||||
CONFIGB(sdCardCsPin) = GPIOD_4;
|
boardConfiguration->sdCardCsPin = GPIOD_4;
|
||||||
CONFIGB(isSdCardEnabled) = true;
|
boardConfiguration->isSdCardEnabled = true;
|
||||||
|
|
||||||
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
||||||
// call overrided board-specific SD card configuration setup, if needed (for custom boards only)
|
// call overrided board-specific SD card configuration setup, if needed (for custom boards only)
|
||||||
|
@ -506,7 +504,7 @@ static void setDefaultWarmupFuelEnrichment(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setDefaultFuelCutParameters(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
static void setDefaultFuelCutParameters(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
CONFIGB(coastingFuelCutEnabled) = false;
|
boardConfiguration->coastingFuelCutEnabled = false;
|
||||||
engineConfiguration->coastingFuelCutRpmLow = 1300;
|
engineConfiguration->coastingFuelCutRpmLow = 1300;
|
||||||
engineConfiguration->coastingFuelCutRpmHigh = 1500;
|
engineConfiguration->coastingFuelCutRpmHigh = 1500;
|
||||||
engineConfiguration->coastingFuelCutTps = 2;
|
engineConfiguration->coastingFuelCutTps = 2;
|
||||||
|
@ -592,17 +590,17 @@ static void setDefaultIdleSpeedTarget(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setDefaultStepperIdleParameters(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
static void setDefaultStepperIdleParameters(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
CONFIGB(idle).stepperDirectionPin = GPIOE_10;
|
boardConfiguration->idle.stepperDirectionPin = GPIOE_10;
|
||||||
CONFIGB(idle).stepperStepPin = GPIOE_12;
|
boardConfiguration->idle.stepperStepPin = GPIOE_12;
|
||||||
engineConfiguration->stepperEnablePin = GPIOE_14;
|
engineConfiguration->stepperEnablePin = GPIOE_14;
|
||||||
engineConfiguration->idleStepperReactionTime = 10;
|
engineConfiguration->idleStepperReactionTime = 10;
|
||||||
engineConfiguration->idleStepperTotalSteps = 150;
|
engineConfiguration->idleStepperTotalSteps = 150;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setCanDefaults(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
static void setCanDefaults(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
CONFIGB(canDeviceMode) = CD_USE_CAN2;
|
boardConfiguration->canDeviceMode = CD_USE_CAN2;
|
||||||
CONFIGB(canTxPin) = GPIOB_6;
|
boardConfiguration->canTxPin = GPIOB_6;
|
||||||
CONFIGB(canRxPin) = GPIOB_12;
|
boardConfiguration->canRxPin = GPIOB_12;
|
||||||
|
|
||||||
engineConfiguration->canSleepPeriod = 50;
|
engineConfiguration->canSleepPeriod = 50;
|
||||||
engineConfiguration->canReadEnabled = true;
|
engineConfiguration->canReadEnabled = true;
|
||||||
|
@ -797,7 +795,7 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->fuelClosedLoopCltThreshold = 70;
|
engineConfiguration->fuelClosedLoopCltThreshold = 70;
|
||||||
engineConfiguration->fuelClosedLoopRpmThreshold = 900;
|
engineConfiguration->fuelClosedLoopRpmThreshold = 900;
|
||||||
engineConfiguration->fuelClosedLoopTpsThreshold = 80;
|
engineConfiguration->fuelClosedLoopTpsThreshold = 80;
|
||||||
CONFIGB(fuelClosedLoopAfrLowThreshold) = 10.3;
|
boardConfiguration->fuelClosedLoopAfrLowThreshold = 10.3;
|
||||||
engineConfiguration->fuelClosedLoopAfrHighThreshold = 19.8;
|
engineConfiguration->fuelClosedLoopAfrHighThreshold = 19.8;
|
||||||
engineConfiguration->fuelClosedLoopPid.pFactor = -0.1;
|
engineConfiguration->fuelClosedLoopPid.pFactor = -0.1;
|
||||||
|
|
||||||
|
@ -812,16 +810,16 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
|
|
||||||
engineConfiguration->idleRpmPid.minValue = 5;
|
engineConfiguration->idleRpmPid.minValue = 5;
|
||||||
engineConfiguration->idleRpmPid.maxValue = 95;
|
engineConfiguration->idleRpmPid.maxValue = 95;
|
||||||
CONFIGB(idlePidDeactivationTpsThreshold) = 2;
|
boardConfiguration->idlePidDeactivationTpsThreshold = 2;
|
||||||
|
|
||||||
CONFIGB(idle).solenoidFrequency = 200;
|
boardConfiguration->idle.solenoidFrequency = 200;
|
||||||
// set idle_position 50
|
// set idle_position 50
|
||||||
CONFIGB(manIdlePosition) = 50;
|
boardConfiguration->manIdlePosition = 50;
|
||||||
engineConfiguration->crankingIACposition = 50;
|
engineConfiguration->crankingIACposition = 50;
|
||||||
// engineConfiguration->idleMode = IM_AUTO;
|
// engineConfiguration->idleMode = IM_AUTO;
|
||||||
engineConfiguration->idleMode = IM_MANUAL;
|
engineConfiguration->idleMode = IM_MANUAL;
|
||||||
|
|
||||||
CONFIGB(useStepperIdle) = false;
|
boardConfiguration->useStepperIdle = false;
|
||||||
|
|
||||||
setDefaultStepperIdleParameters(PASS_ENGINE_PARAMETER_SIGNATURE);
|
setDefaultStepperIdleParameters(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
|
@ -839,7 +837,7 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->analogInputDividerCoefficient = 2;
|
engineConfiguration->analogInputDividerCoefficient = 2;
|
||||||
|
|
||||||
// performance optimization
|
// performance optimization
|
||||||
CONFIGB(sensorChartMode) = SC_OFF;
|
boardConfiguration->sensorChartMode = SC_OFF;
|
||||||
|
|
||||||
engineConfiguration->storageMode = MS_AUTO;
|
engineConfiguration->storageMode = MS_AUTO;
|
||||||
|
|
||||||
|
@ -956,21 +954,21 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
engineConfiguration->knockDetectionWindowEnd = 135;
|
engineConfiguration->knockDetectionWindowEnd = 135;
|
||||||
|
|
||||||
engineConfiguration->fuelLevelSensor = EFI_ADC_NONE;
|
engineConfiguration->fuelLevelSensor = EFI_ADC_NONE;
|
||||||
CONFIGB(fuelLevelEmptyTankVoltage) = 0;
|
boardConfiguration->fuelLevelEmptyTankVoltage = 0;
|
||||||
CONFIGB(fuelLevelFullTankVoltage) = 5;
|
boardConfiguration->fuelLevelFullTankVoltage = 5;
|
||||||
|
|
||||||
engineConfiguration->hipOutputChannel = EFI_ADC_NONE;
|
engineConfiguration->hipOutputChannel = EFI_ADC_NONE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* this is RPM. 10000 rpm is only 166Hz, 800 rpm is 13Hz
|
* this is RPM. 10000 rpm is only 166Hz, 800 rpm is 13Hz
|
||||||
*/
|
*/
|
||||||
CONFIGB(triggerSimulatorFrequency) = 1200;
|
boardConfiguration->triggerSimulatorFrequency = 1200;
|
||||||
|
|
||||||
CONFIGB(triggerErrorPin) = GPIO_UNASSIGNED;
|
boardConfiguration->triggerErrorPin = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
CONFIGB(max31855spiDevice) = SPI_NONE;
|
boardConfiguration->max31855spiDevice = SPI_NONE;
|
||||||
for (int i = 0; i < EGT_CHANNEL_COUNT; i++) {
|
for (int i = 0; i < EGT_CHANNEL_COUNT; i++) {
|
||||||
CONFIGB(max31855_cs)[i] = GPIO_UNASSIGNED;
|
boardConfiguration->max31855_cs[i] = GPIO_UNASSIGNED;
|
||||||
}
|
}
|
||||||
|
|
||||||
engineConfiguration->alternatorPwmFrequency = 300;
|
engineConfiguration->alternatorPwmFrequency = 300;
|
||||||
|
@ -981,13 +979,13 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
|
|
||||||
setDefaultSerialParameters(PASS_ENGINE_PARAMETER_SIGNATURE);
|
setDefaultSerialParameters(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
CONFIGB(triggerSimulatorPins)[0] = GPIOD_1;
|
boardConfiguration->triggerSimulatorPins[0] = GPIOD_1;
|
||||||
CONFIGB(triggerSimulatorPins)[1] = GPIOD_2;
|
boardConfiguration->triggerSimulatorPins[1] = GPIOD_2;
|
||||||
CONFIGB(triggerSimulatorPins)[2] = GPIO_UNASSIGNED;
|
boardConfiguration->triggerSimulatorPins[2] = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
CONFIGB(triggerSimulatorPinModes)[0] = OM_DEFAULT;
|
boardConfiguration->triggerSimulatorPinModes[0] = OM_DEFAULT;
|
||||||
CONFIGB(triggerSimulatorPinModes)[1] = OM_DEFAULT;
|
boardConfiguration->triggerSimulatorPinModes[1] = OM_DEFAULT;
|
||||||
CONFIGB(triggerSimulatorPinModes)[2] = OM_DEFAULT;
|
boardConfiguration->triggerSimulatorPinModes[2] = OM_DEFAULT;
|
||||||
|
|
||||||
|
|
||||||
strcpy(config->timingMultiplier, "1");
|
strcpy(config->timingMultiplier, "1");
|
||||||
|
@ -1000,62 +998,62 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
|
|
||||||
engineConfiguration->isAlternatorControlEnabled = true;
|
engineConfiguration->isAlternatorControlEnabled = true;
|
||||||
|
|
||||||
// CONFIGB(gps_rx_pin) = GPIOB_7;
|
// boardConfiguration->gps_rx_pin = GPIOB_7;
|
||||||
// CONFIGB(gps_tx_pin) = GPIOB_6;
|
// boardConfiguration->gps_tx_pin = GPIOB_6;
|
||||||
|
|
||||||
CONFIGB(triggerInputPins)[0] = GPIOC_6;
|
boardConfiguration->triggerInputPins[0] = GPIOC_6;
|
||||||
CONFIGB(triggerInputPins)[1] = GPIOA_5;
|
boardConfiguration->triggerInputPins[1] = GPIOA_5;
|
||||||
CONFIGB(logicAnalyzerPins)[0] = GPIO_UNASSIGNED;
|
boardConfiguration->logicAnalyzerPins[0] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(logicAnalyzerPins)[1] = GPIO_UNASSIGNED; // GPIOE_5 is a popular option (if available)
|
boardConfiguration->logicAnalyzerPins[1] = GPIO_UNASSIGNED; // GPIOE_5 is a popular option (if available)
|
||||||
CONFIGB(logicAnalyzerPins)[2] = GPIO_UNASSIGNED;
|
boardConfiguration->logicAnalyzerPins[2] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(logicAnalyzerPins)[3] = GPIO_UNASSIGNED;
|
boardConfiguration->logicAnalyzerPins[3] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(vehicleSpeedSensorInputPin) = GPIO_UNASSIGNED;
|
boardConfiguration->vehicleSpeedSensorInputPin = GPIO_UNASSIGNED;
|
||||||
engineConfiguration->vehicleSpeedCoef = 1.0f;
|
engineConfiguration->vehicleSpeedCoef = 1.0f;
|
||||||
|
|
||||||
CONFIGB(logicAnalyzerMode)[0] = false;
|
boardConfiguration->logicAnalyzerMode[0] = false;
|
||||||
CONFIGB(logicAnalyzerMode)[1] = false;
|
boardConfiguration->logicAnalyzerMode[1] = false;
|
||||||
|
|
||||||
engineConfiguration->mapErrorDetectionTooLow = 5;
|
engineConfiguration->mapErrorDetectionTooLow = 5;
|
||||||
engineConfiguration->mapErrorDetectionTooHigh = 250;
|
engineConfiguration->mapErrorDetectionTooHigh = 250;
|
||||||
|
|
||||||
CONFIGB(idleThreadPeriod) = 100;
|
boardConfiguration->idleThreadPeriod = 100;
|
||||||
CONFIGB(consoleLoopPeriod) = 200;
|
boardConfiguration->consoleLoopPeriod = 200;
|
||||||
CONFIGB(lcdThreadPeriod) = 300;
|
boardConfiguration->lcdThreadPeriod = 300;
|
||||||
CONFIGB(generalPeriodicThreadPeriod) = 50;
|
boardConfiguration->generalPeriodicThreadPeriod = 50;
|
||||||
CONFIGB(useLcdScreen) = true;
|
boardConfiguration->useLcdScreen = true;
|
||||||
|
|
||||||
CONFIGB(boardTestModeJumperPin) = GPIOB_0;
|
boardConfiguration->boardTestModeJumperPin = GPIOB_0;
|
||||||
|
|
||||||
setCanDefaults(PASS_ENGINE_PARAMETER_SIGNATURE);
|
setCanDefaults(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
|
|
||||||
// set this to SPI_DEVICE_3 to enable stimulation
|
// set this to SPI_DEVICE_3 to enable stimulation
|
||||||
CONFIGB(digitalPotentiometerSpiDevice) = SPI_NONE;
|
boardConfiguration->digitalPotentiometerSpiDevice = SPI_NONE;
|
||||||
CONFIGB(digitalPotentiometerChipSelect)[0] = GPIOD_7;
|
boardConfiguration->digitalPotentiometerChipSelect[0] = GPIOD_7;
|
||||||
CONFIGB(digitalPotentiometerChipSelect)[1] = GPIO_UNASSIGNED;
|
boardConfiguration->digitalPotentiometerChipSelect[1] = GPIO_UNASSIGNED;
|
||||||
CONFIGB(digitalPotentiometerChipSelect)[2] = GPIOD_5;
|
boardConfiguration->digitalPotentiometerChipSelect[2] = GPIOD_5;
|
||||||
CONFIGB(digitalPotentiometerChipSelect)[3] = GPIO_UNASSIGNED;
|
boardConfiguration->digitalPotentiometerChipSelect[3] = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
CONFIGB(is_enabled_spi_1) = false;
|
boardConfiguration->is_enabled_spi_1 = false;
|
||||||
CONFIGB(is_enabled_spi_2) = false;
|
boardConfiguration->is_enabled_spi_2 = false;
|
||||||
CONFIGB(is_enabled_spi_3) = true;
|
boardConfiguration->is_enabled_spi_3 = true;
|
||||||
|
|
||||||
CONFIGB(spi1mosiPin) = GPIOB_5;
|
boardConfiguration->spi1mosiPin = GPIOB_5;
|
||||||
CONFIGB(spi1misoPin) = GPIOB_4;
|
boardConfiguration->spi1misoPin = GPIOB_4;
|
||||||
CONFIGB(spi1sckPin) = GPIOB_3; // please note that this pin is also SWO/SWD - Single Wire debug Output
|
boardConfiguration->spi1sckPin = GPIOB_3; // please note that this pin is also SWO/SWD - Single Wire debug Output
|
||||||
|
|
||||||
#if EFI_MEMS || defined(__DOXYGEN__)
|
#if EFI_MEMS || defined(__DOXYGEN__)
|
||||||
// this would override some values from above
|
// this would override some values from above
|
||||||
configureAccelerometerPins(PASS_ENGINE_PARAMETER_SIGNATURE);
|
configureAccelerometerPins(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CONFIGB(spi2mosiPin) = GPIOB_15;
|
boardConfiguration->spi2mosiPin = GPIOB_15;
|
||||||
CONFIGB(spi2misoPin) = GPIOB_14;
|
boardConfiguration->spi2misoPin = GPIOB_14;
|
||||||
CONFIGB(spi2sckPin) = GPIOB_13;
|
boardConfiguration->spi2sckPin = GPIOB_13;
|
||||||
|
|
||||||
CONFIGB(spi3mosiPin) = GPIOB_5;
|
boardConfiguration->spi3mosiPin = GPIOB_5;
|
||||||
CONFIGB(spi3misoPin) = GPIOB_4;
|
boardConfiguration->spi3misoPin = GPIOB_4;
|
||||||
CONFIGB(spi3sckPin) = GPIOB_3;
|
boardConfiguration->spi3sckPin = GPIOB_3;
|
||||||
|
|
||||||
engineConfiguration->hip9011Gain = 1;
|
engineConfiguration->hip9011Gain = 1;
|
||||||
#if EFI_HIP_9011 || defined(__DOXYGEN__)
|
#if EFI_HIP_9011 || defined(__DOXYGEN__)
|
||||||
|
@ -1064,10 +1062,10 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
|
|
||||||
setDefaultSdCardParameters(PASS_ENGINE_PARAMETER_SIGNATURE);
|
setDefaultSdCardParameters(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
CONFIGB(isFastAdcEnabled) = true;
|
boardConfiguration->isFastAdcEnabled = true;
|
||||||
CONFIGB(isEngineControlEnabled) = true;
|
boardConfiguration->isEngineControlEnabled = true;
|
||||||
|
|
||||||
CONFIGB(isVerboseAlternator) = false;
|
boardConfiguration->isVerboseAlternator = false;
|
||||||
|
|
||||||
engineConfiguration->warmupAfrPid.offset = 1;
|
engineConfiguration->warmupAfrPid.offset = 1;
|
||||||
engineConfiguration->warmupAfrThreshold = 60;
|
engineConfiguration->warmupAfrThreshold = 60;
|
||||||
|
@ -1093,7 +1091,7 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
* <reboot ECU>
|
* <reboot ECU>
|
||||||
* fsioinfo
|
* fsioinfo
|
||||||
*/
|
*/
|
||||||
CONFIGB(fsio_setting)[0] = 5000;
|
boardConfiguration->fsio_setting[0] = 5000;
|
||||||
// simple warning light as default configuration
|
// simple warning light as default configuration
|
||||||
// set_fsio_expression 1 "rpm > fsio_setting(1)"
|
// set_fsio_expression 1 "rpm > fsio_setting(1)"
|
||||||
setFsio(0, GPIO_UNASSIGNED, RPM_ABOVE_USER_SETTING_1 PASS_ENGINE_PARAMETER_SUFFIX);
|
setFsio(0, GPIO_UNASSIGNED, RPM_ABOVE_USER_SETTING_1 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
@ -1367,23 +1365,24 @@ void setOperationMode(engine_configuration_s *engineConfiguration, operation_mod
|
||||||
engineConfiguration->operationMode = mode;
|
engineConfiguration->operationMode = mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
operation_mode_e getOperationMode(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
operation_mode_e getOperationMode(engine_configuration_s const *engineConfiguration) {
|
||||||
return engineConfiguration->operationMode;
|
return engineConfiguration->operationMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
void commonFrankensoAnalogInputs(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
void commonFrankensoAnalogInputs(engine_configuration_s *engineConfiguration) {
|
||||||
/**
|
/**
|
||||||
* VBatt
|
* VBatt
|
||||||
*/
|
*/
|
||||||
engineConfiguration->vbattAdcChannel = EFI_ADC_14;
|
engineConfiguration->vbattAdcChannel = EFI_ADC_14;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setFrankenso0_1_joystick(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
void setFrankenso0_1_joystick(engine_configuration_s *engineConfiguration) {
|
||||||
CONFIGB(joystickCenterPin) = GPIOC_8;
|
board_configuration_s *boardConfiguration = &engineConfiguration->bc;
|
||||||
CONFIGB(joystickAPin) = GPIOD_10;
|
boardConfiguration->joystickCenterPin = GPIOC_8;
|
||||||
CONFIGB(joystickBPin) = GPIO_UNASSIGNED;
|
boardConfiguration->joystickAPin = GPIOD_10;
|
||||||
CONFIGB(joystickCPin) = GPIO_UNASSIGNED;
|
boardConfiguration->joystickBPin = GPIO_UNASSIGNED;
|
||||||
CONFIGB(joystickDPin) = GPIOD_11;
|
boardConfiguration->joystickCPin = GPIO_UNASSIGNED;
|
||||||
|
boardConfiguration->joystickDPin = GPIOD_11;
|
||||||
}
|
}
|
||||||
|
|
||||||
void copyTargetAfrTable(fuel_table_t const source, afr_table_t destination) {
|
void copyTargetAfrTable(fuel_table_t const source, afr_table_t destination) {
|
||||||
|
|
|
@ -72,8 +72,8 @@ void rememberCurrentConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
void incrementGlobalConfigurationVersion(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
void incrementGlobalConfigurationVersion(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
int getGlobalConfigurationVersion(void);
|
int getGlobalConfigurationVersion(void);
|
||||||
|
|
||||||
void commonFrankensoAnalogInputs(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
void commonFrankensoAnalogInputs(engine_configuration_s *engineConfiguration);
|
||||||
void setFrankenso0_1_joystick(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
void setFrankenso0_1_joystick(engine_configuration_s *engineConfiguration);
|
||||||
|
|
||||||
void copyTargetAfrTable(fuel_table_t const source, afr_table_t destination);
|
void copyTargetAfrTable(fuel_table_t const source, afr_table_t destination);
|
||||||
void copyFuelTable(fuel_table_t const source, fuel_table_t destination);
|
void copyFuelTable(fuel_table_t const source, fuel_table_t destination);
|
||||||
|
|
|
@ -73,42 +73,42 @@ void printFloatArray(const char *prefix, float array[], int size) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void printSpiState(Logging *logger, board_configuration_s *boardConfiguration) {
|
void printSpiState(Logging *logger, board_configuration_s *boardConfiguration) {
|
||||||
scheduleMsg(logger, "spi 1=%s/2=%s/3=%s", boolToString(CONFIGB(is_enabled_spi_1)),
|
scheduleMsg(logger, "spi 1=%s/2=%s/3=%s", boolToString(boardConfiguration->is_enabled_spi_1),
|
||||||
boolToString(CONFIGB(is_enabled_spi_2)), boolToString(CONFIGB(is_enabled_spi_3)));
|
boolToString(boardConfiguration->is_enabled_spi_2), boolToString(boardConfiguration->is_enabled_spi_3));
|
||||||
}
|
}
|
||||||
|
|
||||||
extern board_configuration_s *boardConfiguration;
|
extern board_configuration_s *boardConfiguration;
|
||||||
|
|
||||||
static void printOutputs(const engine_configuration_s *engineConfiguration) {
|
static void printOutputs(const engine_configuration_s *engineConfiguration) {
|
||||||
scheduleMsg(&logger, "injectionPins: mode %s", getPin_output_mode_e(CONFIGB(injectionPinMode)));
|
scheduleMsg(&logger, "injectionPins: mode %s", getPin_output_mode_e(boardConfiguration->injectionPinMode));
|
||||||
for (int i = 0; i < engineConfiguration->specs.cylindersCount; i++) {
|
for (int i = 0; i < engineConfiguration->specs.cylindersCount; i++) {
|
||||||
brain_pin_e brainPin = CONFIGB(injectionPins)[i];
|
brain_pin_e brainPin = boardConfiguration->injectionPins[i];
|
||||||
scheduleMsg(&logger, "injection #%d @ %s", (1 + i), hwPortname(brainPin));
|
scheduleMsg(&logger, "injection #%d @ %s", (1 + i), hwPortname(brainPin));
|
||||||
}
|
}
|
||||||
|
|
||||||
scheduleMsg(&logger, "ignitionPins: mode %s", getPin_output_mode_e(CONFIGB(ignitionPinMode)));
|
scheduleMsg(&logger, "ignitionPins: mode %s", getPin_output_mode_e(boardConfiguration->ignitionPinMode));
|
||||||
for (int i = 0; i < engineConfiguration->specs.cylindersCount; i++) {
|
for (int i = 0; i < engineConfiguration->specs.cylindersCount; i++) {
|
||||||
brain_pin_e brainPin = CONFIGB(ignitionPins)[i];
|
brain_pin_e brainPin = boardConfiguration->ignitionPins[i];
|
||||||
scheduleMsg(&logger, "ignition #%d @ %s", (1 + i), hwPortname(brainPin));
|
scheduleMsg(&logger, "ignition #%d @ %s", (1 + i), hwPortname(brainPin));
|
||||||
}
|
}
|
||||||
|
|
||||||
scheduleMsg(&logger, "idlePin: mode %s @ %s freq=%d", getPin_output_mode_e(CONFIGB(idle).solenoidPinMode),
|
scheduleMsg(&logger, "idlePin: mode %s @ %s freq=%d", getPin_output_mode_e(boardConfiguration->idle.solenoidPinMode),
|
||||||
hwPortname(CONFIGB(idle).solenoidPin), CONFIGB(idle).solenoidFrequency);
|
hwPortname(boardConfiguration->idle.solenoidPin), boardConfiguration->idle.solenoidFrequency);
|
||||||
scheduleMsg(&logger, "malfunctionIndicatorn: %s mode=%s", hwPortname(CONFIGB(malfunctionIndicatorPin)),
|
scheduleMsg(&logger, "malfunctionIndicatorn: %s mode=%s", hwPortname(boardConfiguration->malfunctionIndicatorPin),
|
||||||
getPin_output_mode_e(CONFIGB(malfunctionIndicatorPinMode)));
|
getPin_output_mode_e(boardConfiguration->malfunctionIndicatorPinMode));
|
||||||
|
|
||||||
scheduleMsg(&logger, "fuelPumpPin: mode %s @ %s", getPin_output_mode_e(CONFIGB(fuelPumpPinMode)),
|
scheduleMsg(&logger, "fuelPumpPin: mode %s @ %s", getPin_output_mode_e(boardConfiguration->fuelPumpPinMode),
|
||||||
hwPortname(CONFIGB(fuelPumpPin)));
|
hwPortname(boardConfiguration->fuelPumpPin));
|
||||||
|
|
||||||
scheduleMsg(&logger, "fanPin: mode %s @ %s", getPin_output_mode_e(CONFIGB(fanPinMode)),
|
scheduleMsg(&logger, "fanPin: mode %s @ %s", getPin_output_mode_e(boardConfiguration->fanPinMode),
|
||||||
hwPortname(CONFIGB(fanPin)));
|
hwPortname(boardConfiguration->fanPin));
|
||||||
|
|
||||||
scheduleMsg(&logger, "mainRelay: mode %s @ %s", getPin_output_mode_e(CONFIGB(mainRelayPinMode)),
|
scheduleMsg(&logger, "mainRelay: mode %s @ %s", getPin_output_mode_e(boardConfiguration->mainRelayPinMode),
|
||||||
hwPortname(CONFIGB(mainRelayPin)));
|
hwPortname(boardConfiguration->mainRelayPin));
|
||||||
|
|
||||||
scheduleMsg(&logger, "alternator field: mode %s @ %s",
|
scheduleMsg(&logger, "alternator field: mode %s @ %s",
|
||||||
getPin_output_mode_e(CONFIGB(alternatorControlPinMode)),
|
getPin_output_mode_e(boardConfiguration->alternatorControlPinMode),
|
||||||
hwPortname(CONFIGB(alternatorControlPin)));
|
hwPortname(boardConfiguration->alternatorControlPin));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -265,25 +265,25 @@ void printConfiguration(const engine_configuration_s *engineConfiguration) {
|
||||||
boolToString(engineConfiguration->isMapAveragingEnabled),
|
boolToString(engineConfiguration->isMapAveragingEnabled),
|
||||||
boolToString(engineConfiguration->isTunerStudioEnabled),
|
boolToString(engineConfiguration->isTunerStudioEnabled),
|
||||||
boolToString(engineConfiguration->isWaveAnalyzerEnabled),
|
boolToString(engineConfiguration->isWaveAnalyzerEnabled),
|
||||||
boolToString(CONFIGB(isFastAdcEnabled)));
|
boolToString(boardConfiguration->isFastAdcEnabled));
|
||||||
|
|
||||||
scheduleMsg(&logger, "isManualSpinningMode=%s/isCylinderCleanupEnabled=%s",
|
scheduleMsg(&logger, "isManualSpinningMode=%s/isCylinderCleanupEnabled=%s",
|
||||||
boolToString(engineConfiguration->isManualSpinningMode),
|
boolToString(engineConfiguration->isManualSpinningMode),
|
||||||
boolToString(engineConfiguration->isCylinderCleanupEnabled));
|
boolToString(engineConfiguration->isCylinderCleanupEnabled));
|
||||||
|
|
||||||
scheduleMsg(&logger, "clutchUp@%s: %s", hwPortname(CONFIGB(clutchUpPin)),
|
scheduleMsg(&logger, "clutchUp@%s: %s", hwPortname(boardConfiguration->clutchUpPin),
|
||||||
boolToString(engine->clutchUpState));
|
boolToString(engine->clutchUpState));
|
||||||
scheduleMsg(&logger, "clutchDown@%s: %s", hwPortname(CONFIGB(clutchDownPin)),
|
scheduleMsg(&logger, "clutchDown@%s: %s", hwPortname(boardConfiguration->clutchDownPin),
|
||||||
boolToString(engine->clutchDownState));
|
boolToString(engine->clutchDownState));
|
||||||
|
|
||||||
scheduleMsg(&logger, "boardTestModeJumperPin: %s/nesting=%d",
|
scheduleMsg(&logger, "boardTestModeJumperPin: %s/nesting=%d",
|
||||||
hwPortname(CONFIGB(boardTestModeJumperPin)), maxNesting);
|
hwPortname(boardConfiguration->boardTestModeJumperPin), maxNesting);
|
||||||
|
|
||||||
scheduleMsg(&logger, "digitalPotentiometerSpiDevice %d", CONFIGB(digitalPotentiometerSpiDevice));
|
scheduleMsg(&logger, "digitalPotentiometerSpiDevice %d", boardConfiguration->digitalPotentiometerSpiDevice);
|
||||||
|
|
||||||
for (int i = 0; i < DIGIPOT_COUNT; i++) {
|
for (int i = 0; i < DIGIPOT_COUNT; i++) {
|
||||||
scheduleMsg(&logger, "digitalPotentiometer CS%d %s", i,
|
scheduleMsg(&logger, "digitalPotentiometer CS%d %s", i,
|
||||||
hwPortname(CONFIGB(digitalPotentiometerChipSelect)[i]));
|
hwPortname(boardConfiguration->digitalPotentiometerChipSelect[i]));
|
||||||
}
|
}
|
||||||
#if EFI_PROD_CODE
|
#if EFI_PROD_CODE
|
||||||
|
|
||||||
|
@ -327,22 +327,22 @@ void setEngineType(int value) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setIdleSolenoidFrequency(int value) {
|
static void setIdleSolenoidFrequency(int value) {
|
||||||
CONFIGB(idle).solenoidFrequency = value;
|
boardConfiguration->idle.solenoidFrequency = value;
|
||||||
incrementGlobalConfigurationVersion();
|
incrementGlobalConfigurationVersion();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setInjectionPinMode(int value) {
|
static void setInjectionPinMode(int value) {
|
||||||
CONFIGB(injectionPinMode) = (pin_output_mode_e) value;
|
boardConfiguration->injectionPinMode = (pin_output_mode_e) value;
|
||||||
doPrintConfiguration();
|
doPrintConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setIgnitionPinMode(int value) {
|
static void setIgnitionPinMode(int value) {
|
||||||
CONFIGB(ignitionPinMode) = (pin_output_mode_e) value;
|
boardConfiguration->ignitionPinMode = (pin_output_mode_e) value;
|
||||||
doPrintConfiguration();
|
doPrintConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setIdlePinMode(int value) {
|
static void setIdlePinMode(int value) {
|
||||||
CONFIGB(idle).solenoidPinMode = (pin_output_mode_e) value;
|
boardConfiguration->idle.solenoidPinMode = (pin_output_mode_e) value;
|
||||||
doPrintConfiguration();
|
doPrintConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -359,17 +359,17 @@ static void setIgnitionOffset(float value) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setFuelPumpPinMode(int value) {
|
static void setFuelPumpPinMode(int value) {
|
||||||
CONFIGB(fuelPumpPinMode) = (pin_output_mode_e) value;
|
boardConfiguration->fuelPumpPinMode = (pin_output_mode_e) value;
|
||||||
doPrintConfiguration();
|
doPrintConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setMalfunctionIndicatorPinMode(int value) {
|
static void setMalfunctionIndicatorPinMode(int value) {
|
||||||
CONFIGB(malfunctionIndicatorPinMode) = (pin_output_mode_e) value;
|
boardConfiguration->malfunctionIndicatorPinMode = (pin_output_mode_e) value;
|
||||||
doPrintConfiguration();
|
doPrintConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setSensorChartMode(int value) {
|
static void setSensorChartMode(int value) {
|
||||||
CONFIGB(sensorChartMode) = (sensor_chart_e) value;
|
boardConfiguration->sensorChartMode = (sensor_chart_e) value;
|
||||||
doPrintConfiguration();
|
doPrintConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -431,12 +431,12 @@ static void printTemperatureInfo(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
scheduleMsg(&logger, "fan=%s @ %s", boolToString(enginePins.fanRelay.getLogicValue()),
|
scheduleMsg(&logger, "fan=%s @ %s", boolToString(enginePins.fanRelay.getLogicValue()),
|
||||||
hwPortname(CONFIGB(fanPin)));
|
hwPortname(boardConfiguration->fanPin));
|
||||||
|
|
||||||
scheduleMsg(&logger, "A/C relay=%s @ %s", boolToString(enginePins.acRelay.getLogicValue()),
|
scheduleMsg(&logger, "A/C relay=%s @ %s", boolToString(enginePins.acRelay.getLogicValue()),
|
||||||
hwPortname(CONFIGB(acRelayPin)));
|
hwPortname(boardConfiguration->acRelayPin));
|
||||||
|
|
||||||
scheduleMsg(&logger, "warmupPID=%d corr=%.2f", CONFIGB(useWarmupPidAfr),
|
scheduleMsg(&logger, "warmupPID=%d corr=%.2f", boardConfiguration->useWarmupPidAfr,
|
||||||
engine->engineState.cltFuelCorrection);
|
engine->engineState.cltFuelCorrection);
|
||||||
|
|
||||||
#endif /* EFI_ANALOG_SENSORS */
|
#endif /* EFI_ANALOG_SENSORS */
|
||||||
|
@ -636,11 +636,11 @@ static void setWholeFuelMapCmd(float value) {
|
||||||
#if EFI_PROD_CODE
|
#if EFI_PROD_CODE
|
||||||
|
|
||||||
static void setEgtSpi(int spi) {
|
static void setEgtSpi(int spi) {
|
||||||
CONFIGB(max31855spiDevice) = (spi_device_e) spi;
|
boardConfiguration->max31855spiDevice = (spi_device_e) spi;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setPotSpi(int spi) {
|
static void setPotSpi(int spi) {
|
||||||
CONFIGB(digitalPotentiometerSpiDevice) = (spi_device_e) spi;
|
boardConfiguration->digitalPotentiometerSpiDevice = (spi_device_e) spi;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setIgnitionPin(const char *indexStr, const char *pinName) {
|
static void setIgnitionPin(const char *indexStr, const char *pinName) {
|
||||||
|
@ -654,7 +654,7 @@ static void setIgnitionPin(const char *indexStr, const char *pinName) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
scheduleMsg(&logger, "setting ignition pin[%d] to %s please save&restart", index, hwPortname(pin));
|
scheduleMsg(&logger, "setting ignition pin[%d] to %s please save&restart", index, hwPortname(pin));
|
||||||
CONFIGB(ignitionPins)[index] = pin;
|
boardConfiguration->ignitionPins[index] = pin;
|
||||||
incrementGlobalConfigurationVersion(PASS_ENGINE_PARAMETER_SIGNATURE);
|
incrementGlobalConfigurationVersion(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -671,23 +671,23 @@ static void setIndividualPin(const char *pinName, brain_pin_e *targetPin, const
|
||||||
|
|
||||||
// set_idle_pin none
|
// set_idle_pin none
|
||||||
static void setIdlePin(const char *pinName) {
|
static void setIdlePin(const char *pinName) {
|
||||||
setIndividualPin(pinName, &CONFIGB(idle).solenoidPin, "idle");
|
setIndividualPin(pinName, &boardConfiguration->idle.solenoidPin, "idle");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setMainRelayPin(const char *pinName) {
|
static void setMainRelayPin(const char *pinName) {
|
||||||
setIndividualPin(pinName, &CONFIGB(mainRelayPin), "main relay");
|
setIndividualPin(pinName, &boardConfiguration->mainRelayPin, "main relay");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setAlternatorPin(const char *pinName) {
|
static void setAlternatorPin(const char *pinName) {
|
||||||
setIndividualPin(pinName, &CONFIGB(alternatorControlPin), "alternator");
|
setIndividualPin(pinName, &boardConfiguration->alternatorControlPin, "alternator");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setACPin(const char *pinName) {
|
static void setACPin(const char *pinName) {
|
||||||
setIndividualPin(pinName, &CONFIGB(acRelayPin), "A/C");
|
setIndividualPin(pinName, &boardConfiguration->acRelayPin, "A/C");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setFuelPumpPin(const char *pinName) {
|
static void setFuelPumpPin(const char *pinName) {
|
||||||
setIndividualPin(pinName, &CONFIGB(fuelPumpPin), "fuelPump");
|
setIndividualPin(pinName, &boardConfiguration->fuelPumpPin, "fuelPump");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setInjectionPin(const char *indexStr, const char *pinName) {
|
static void setInjectionPin(const char *indexStr, const char *pinName) {
|
||||||
|
@ -701,7 +701,7 @@ static void setInjectionPin(const char *indexStr, const char *pinName) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
scheduleMsg(&logger, "setting injection pin[%d] to %s please save&restart", index, hwPortname(pin));
|
scheduleMsg(&logger, "setting injection pin[%d] to %s please save&restart", index, hwPortname(pin));
|
||||||
CONFIGB(injectionPins)[index] = pin;
|
boardConfiguration->injectionPins[index] = pin;
|
||||||
incrementGlobalConfigurationVersion(PASS_ENGINE_PARAMETER_SIGNATURE);
|
incrementGlobalConfigurationVersion(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -716,7 +716,7 @@ static void setTriggerInputPin(const char *indexStr, const char *pinName) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
scheduleMsg(&logger, "setting trigger pin[%d] to %s please save&restart", index, hwPortname(pin));
|
scheduleMsg(&logger, "setting trigger pin[%d] to %s please save&restart", index, hwPortname(pin));
|
||||||
CONFIGB(triggerInputPins)[index] = pin;
|
boardConfiguration->triggerInputPins[index] = pin;
|
||||||
incrementGlobalConfigurationVersion(PASS_ENGINE_PARAMETER_SIGNATURE);
|
incrementGlobalConfigurationVersion(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -729,7 +729,7 @@ static void setTriggerSimulatorMode(const char *indexStr, const char *modeCode)
|
||||||
if (absI(mode) == ERROR_CODE) {
|
if (absI(mode) == ERROR_CODE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
CONFIGB(triggerSimulatorPinModes)[index] = (pin_output_mode_e) mode;
|
boardConfiguration->triggerSimulatorPinModes[index] = (pin_output_mode_e) mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setEgtCSPin(const char *indexStr, const char *pinName) {
|
static void setEgtCSPin(const char *indexStr, const char *pinName) {
|
||||||
|
@ -742,7 +742,7 @@ static void setEgtCSPin(const char *indexStr, const char *pinName) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
scheduleMsg(&logger, "setting EGT CS pin[%d] to %s please save&restart", index, hwPortname(pin));
|
scheduleMsg(&logger, "setting EGT CS pin[%d] to %s please save&restart", index, hwPortname(pin));
|
||||||
CONFIGB(max31855_cs)[index] = pin;
|
boardConfiguration->max31855_cs[index] = pin;
|
||||||
incrementGlobalConfigurationVersion(PASS_ENGINE_PARAMETER_SIGNATURE);
|
incrementGlobalConfigurationVersion(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -756,7 +756,7 @@ static void setTriggerSimulatorPin(const char *indexStr, const char *pinName) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
scheduleMsg(&logger, "setting trigger simulator pin[%d] to %s please save&restart", index, hwPortname(pin));
|
scheduleMsg(&logger, "setting trigger simulator pin[%d] to %s please save&restart", index, hwPortname(pin));
|
||||||
CONFIGB(triggerSimulatorPins)[index] = pin;
|
boardConfiguration->triggerSimulatorPins[index] = pin;
|
||||||
incrementGlobalConfigurationVersion(PASS_ENGINE_PARAMETER_SIGNATURE);
|
incrementGlobalConfigurationVersion(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -800,7 +800,7 @@ static void setLogicInputPin(const char *indexStr, const char *pinName) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
scheduleMsg(&logger, "setting logic input pin[%d] to %s please save&restart", index, hwPortname(pin));
|
scheduleMsg(&logger, "setting logic input pin[%d] to %s please save&restart", index, hwPortname(pin));
|
||||||
CONFIGB(logicAnalyzerPins)[index] = pin;
|
boardConfiguration->logicAnalyzerPins[index] = pin;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void showPinFunction(const char *pinName) {
|
static void showPinFunction(const char *pinName) {
|
||||||
|
@ -845,13 +845,13 @@ static void setFuelMap(const char * rpmStr, const char *loadStr, const char *val
|
||||||
static void setSpiMode(int index, bool mode) {
|
static void setSpiMode(int index, bool mode) {
|
||||||
switch (index) {
|
switch (index) {
|
||||||
case 1:
|
case 1:
|
||||||
CONFIGB(is_enabled_spi_1) = mode;
|
boardConfiguration->is_enabled_spi_1 = mode;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
CONFIGB(is_enabled_spi_2) = mode;
|
boardConfiguration->is_enabled_spi_2 = mode;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
CONFIGB(is_enabled_spi_3) = mode;
|
boardConfiguration->is_enabled_spi_3 = mode;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
scheduleMsg(&logger, "invalid spi index %d", index);
|
scheduleMsg(&logger, "invalid spi index %d", index);
|
||||||
|
@ -862,19 +862,19 @@ static void setSpiMode(int index, bool mode) {
|
||||||
|
|
||||||
static void enableOrDisable(const char *param, bool isEnabled) {
|
static void enableOrDisable(const char *param, bool isEnabled) {
|
||||||
if (strEqualCaseInsensitive(param, "fastadc")) {
|
if (strEqualCaseInsensitive(param, "fastadc")) {
|
||||||
CONFIGB(isFastAdcEnabled) = isEnabled;
|
boardConfiguration->isFastAdcEnabled = isEnabled;
|
||||||
} else if (strEqualCaseInsensitive(param, "etb_auto")) {
|
} else if (strEqualCaseInsensitive(param, "etb_auto")) {
|
||||||
engine->etbAutoTune = isEnabled;
|
engine->etbAutoTune = isEnabled;
|
||||||
} else if (strEqualCaseInsensitive(param, "constant_dwell")) {
|
} else if (strEqualCaseInsensitive(param, "constant_dwell")) {
|
||||||
engineConfiguration->useConstantDwellDuringCranking = isEnabled;
|
engineConfiguration->useConstantDwellDuringCranking = isEnabled;
|
||||||
} else if (strEqualCaseInsensitive(param, "binary_mode_console")) {
|
} else if (strEqualCaseInsensitive(param, "binary_mode_console")) {
|
||||||
CONFIGB(startConsoleInBinaryMode) = isEnabled;
|
boardConfiguration->startConsoleInBinaryMode = isEnabled;
|
||||||
} else if (strEqualCaseInsensitive(param, "cj125")) {
|
} else if (strEqualCaseInsensitive(param, "cj125")) {
|
||||||
CONFIGB(isCJ125Enabled) = isEnabled;
|
boardConfiguration->isCJ125Enabled = isEnabled;
|
||||||
} else if (strEqualCaseInsensitive(param, "engine_sniffer")) {
|
} else if (strEqualCaseInsensitive(param, "engine_sniffer")) {
|
||||||
engineConfiguration->isEngineChartEnabled = isEnabled;
|
engineConfiguration->isEngineChartEnabled = isEnabled;
|
||||||
} else if (strEqualCaseInsensitive(param, "step1limimter")) {
|
} else if (strEqualCaseInsensitive(param, "step1limimter")) {
|
||||||
CONFIGB(enabledStep1Limiter) = isEnabled;
|
boardConfiguration->enabledStep1Limiter = isEnabled;
|
||||||
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
||||||
} else if (strEqualCaseInsensitive(param, "auto_idle")) {
|
} else if (strEqualCaseInsensitive(param, "auto_idle")) {
|
||||||
#if EFI_IDLE_CONTROL || defined(__DOXYGEN__)
|
#if EFI_IDLE_CONTROL || defined(__DOXYGEN__)
|
||||||
|
@ -882,9 +882,9 @@ static void enableOrDisable(const char *param, bool isEnabled) {
|
||||||
#endif /* EFI_IDLE_CONTROL */
|
#endif /* EFI_IDLE_CONTROL */
|
||||||
#endif /* EFI_PROD_CODE */
|
#endif /* EFI_PROD_CODE */
|
||||||
} else if (strEqualCaseInsensitive(param, "serial")) {
|
} else if (strEqualCaseInsensitive(param, "serial")) {
|
||||||
CONFIGB(useSerialPort) = isEnabled;
|
boardConfiguration->useSerialPort = isEnabled;
|
||||||
} else if (strEqualCaseInsensitive(param, "stepperidle")) {
|
} else if (strEqualCaseInsensitive(param, "stepperidle")) {
|
||||||
CONFIGB(useStepperIdle) = isEnabled;
|
boardConfiguration->useStepperIdle = isEnabled;
|
||||||
} else if (strEqualCaseInsensitive(param, "trigger_only_front")) {
|
} else if (strEqualCaseInsensitive(param, "trigger_only_front")) {
|
||||||
engineConfiguration->useOnlyRisingEdgeForTrigger = isEnabled;
|
engineConfiguration->useOnlyRisingEdgeForTrigger = isEnabled;
|
||||||
incrementGlobalConfigurationVersion(PASS_ENGINE_PARAMETER_SIGNATURE);
|
incrementGlobalConfigurationVersion(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
@ -898,7 +898,7 @@ static void enableOrDisable(const char *param, bool isEnabled) {
|
||||||
engineConfiguration->twoWireBatchIgnition = isEnabled;
|
engineConfiguration->twoWireBatchIgnition = isEnabled;
|
||||||
incrementGlobalConfigurationVersion(PASS_ENGINE_PARAMETER_SIGNATURE);
|
incrementGlobalConfigurationVersion(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
} else if (strEqualCaseInsensitive(param, "HIP9011")) {
|
} else if (strEqualCaseInsensitive(param, "HIP9011")) {
|
||||||
CONFIGB(isHip9011Enabled) = isEnabled;
|
boardConfiguration->isHip9011Enabled = isEnabled;
|
||||||
} else if (strEqualCaseInsensitive(param, "verbose_etb")) {
|
} else if (strEqualCaseInsensitive(param, "verbose_etb")) {
|
||||||
engineConfiguration->isVerboseETB = isEnabled;
|
engineConfiguration->isVerboseETB = isEnabled;
|
||||||
} else if (strEqualCaseInsensitive(param, "verbose_idle")) {
|
} else if (strEqualCaseInsensitive(param, "verbose_idle")) {
|
||||||
|
@ -912,15 +912,15 @@ static void enableOrDisable(const char *param, bool isEnabled) {
|
||||||
} else if (strEqualCaseInsensitive(param, "auxdebug4")) {
|
} else if (strEqualCaseInsensitive(param, "auxdebug4")) {
|
||||||
engineConfiguration->isVerboseAuxPid4 = isEnabled;
|
engineConfiguration->isVerboseAuxPid4 = isEnabled;
|
||||||
} else if (strEqualCaseInsensitive(param, "altdebug")) {
|
} else if (strEqualCaseInsensitive(param, "altdebug")) {
|
||||||
CONFIGB(isVerboseAlternator) = isEnabled;
|
boardConfiguration->isVerboseAlternator = isEnabled;
|
||||||
} else if (strEqualCaseInsensitive(param, "tpic_advanced_mode")) {
|
} else if (strEqualCaseInsensitive(param, "tpic_advanced_mode")) {
|
||||||
CONFIGB(useTpicAdvancedMode) = isEnabled;
|
boardConfiguration->useTpicAdvancedMode = isEnabled;
|
||||||
} else if (strEqualCaseInsensitive(param, "knockdebug")) {
|
} else if (strEqualCaseInsensitive(param, "knockdebug")) {
|
||||||
engine->knockDebug = isEnabled;
|
engine->knockDebug = isEnabled;
|
||||||
} else if (strEqualCaseInsensitive(param, "altcontrol")) {
|
} else if (strEqualCaseInsensitive(param, "altcontrol")) {
|
||||||
engineConfiguration->isAlternatorControlEnabled = isEnabled;
|
engineConfiguration->isAlternatorControlEnabled = isEnabled;
|
||||||
} else if (strEqualCaseInsensitive(param, "sd")) {
|
} else if (strEqualCaseInsensitive(param, "sd")) {
|
||||||
CONFIGB(isSdCardEnabled) = isEnabled;
|
boardConfiguration->isSdCardEnabled = isEnabled;
|
||||||
} else if (strEqualCaseInsensitive(param, "test_mode")) {
|
} else if (strEqualCaseInsensitive(param, "test_mode")) {
|
||||||
engine->isTestMode = isEnabled;
|
engine->isTestMode = isEnabled;
|
||||||
} else if (strEqualCaseInsensitive(param, "can_read")) {
|
} else if (strEqualCaseInsensitive(param, "can_read")) {
|
||||||
|
@ -936,7 +936,7 @@ static void enableOrDisable(const char *param, bool isEnabled) {
|
||||||
} else if (strEqualCaseInsensitive(param, "self_stimulation")) {
|
} else if (strEqualCaseInsensitive(param, "self_stimulation")) {
|
||||||
engineConfiguration->directSelfStimulation = isEnabled;
|
engineConfiguration->directSelfStimulation = isEnabled;
|
||||||
} else if (strEqualCaseInsensitive(param, "engine_control")) {
|
} else if (strEqualCaseInsensitive(param, "engine_control")) {
|
||||||
CONFIGB(isEngineControlEnabled) = isEnabled;
|
boardConfiguration->isEngineControlEnabled = isEnabled;
|
||||||
} else if (strEqualCaseInsensitive(param, "map_avg")) {
|
} else if (strEqualCaseInsensitive(param, "map_avg")) {
|
||||||
engineConfiguration->isMapAveragingEnabled = isEnabled;
|
engineConfiguration->isMapAveragingEnabled = isEnabled;
|
||||||
} else if (strEqualCaseInsensitive(param, "tunerstudio")) {
|
} else if (strEqualCaseInsensitive(param, "tunerstudio")) {
|
||||||
|
@ -1049,7 +1049,7 @@ const plain_get_integer_s getI_plain[] = {
|
||||||
|
|
||||||
const plain_get_float_s getF_plain[] = {
|
const plain_get_float_s getF_plain[] = {
|
||||||
{"cranking_dwell", &engineConfiguration->ignitionDwellForCrankingMs},
|
{"cranking_dwell", &engineConfiguration->ignitionDwellForCrankingMs},
|
||||||
{"idle_position", &CONFIGB(manIdlePosition)},
|
{"idle_position", &boardConfiguration->manIdlePosition},
|
||||||
{"ignition_offset", &engineConfiguration->ignitionOffset},
|
{"ignition_offset", &engineConfiguration->ignitionOffset},
|
||||||
{"injection_offset", &engineConfiguration->extraInjectionOffset},
|
{"injection_offset", &engineConfiguration->extraInjectionOffset},
|
||||||
{"global_trigger_offset_angle", &engineConfiguration->globalTriggerAngleOffset},
|
{"global_trigger_offset_angle", &engineConfiguration->globalTriggerAngleOffset},
|
||||||
|
@ -1089,7 +1089,7 @@ static void getValue(const char *paramStr) {
|
||||||
|
|
||||||
|
|
||||||
if (strEqualCaseInsensitive(paramStr, "isCJ125Enabled")) {
|
if (strEqualCaseInsensitive(paramStr, "isCJ125Enabled")) {
|
||||||
scheduleMsg(&logger, "isCJ125Enabled=%d", CONFIGB(isCJ125Enabled));
|
scheduleMsg(&logger, "isCJ125Enabled=%d", boardConfiguration->isCJ125Enabled);
|
||||||
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
||||||
} else if (strEqualCaseInsensitive(paramStr, "bor")) {
|
} else if (strEqualCaseInsensitive(paramStr, "bor")) {
|
||||||
showBor();
|
showBor();
|
||||||
|
@ -1099,7 +1099,7 @@ static void getValue(const char *paramStr) {
|
||||||
} else if (strEqualCaseInsensitive(paramStr, "global_trigger_offset_angle")) {
|
} else if (strEqualCaseInsensitive(paramStr, "global_trigger_offset_angle")) {
|
||||||
scheduleMsg(&logger, "global_trigger_offset=%.2f", engineConfiguration->globalTriggerAngleOffset);
|
scheduleMsg(&logger, "global_trigger_offset=%.2f", engineConfiguration->globalTriggerAngleOffset);
|
||||||
} else if (strEqualCaseInsensitive(paramStr, "isHip9011Enabled")) {
|
} else if (strEqualCaseInsensitive(paramStr, "isHip9011Enabled")) {
|
||||||
scheduleMsg(&logger, "isHip9011Enabled=%d", CONFIGB(isHip9011Enabled));
|
scheduleMsg(&logger, "isHip9011Enabled=%d", boardConfiguration->isHip9011Enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if EFI_RTC || defined(__DOXYGEN__)
|
#if EFI_RTC || defined(__DOXYGEN__)
|
||||||
|
|
Loading…
Reference in New Issue