auto-sync
This commit is contained in:
parent
fa4d1f07e3
commit
730995a6c1
|
@ -21,7 +21,16 @@ void setBmwE43(engine_configuration_s *engineConfiguration) {
|
||||||
engineConfiguration->triggerConfig.triggerType = TT_TOOTHED_WHEEL_60_2;
|
engineConfiguration->triggerConfig.triggerType = TT_TOOTHED_WHEEL_60_2;
|
||||||
engineConfiguration->cylindersCount = 6;
|
engineConfiguration->cylindersCount = 6;
|
||||||
engineConfiguration->firingOrder = FO_1_THEN_5_THEN_3_THEN_6_THEN_2_THEN_4;
|
engineConfiguration->firingOrder = FO_1_THEN_5_THEN_3_THEN_6_THEN_2_THEN_4;
|
||||||
engineConfiguration->injectionMode = IM_BATCH;
|
engineConfiguration->injectionMode = IM_SIMULTANEOUS;
|
||||||
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
|
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
|
||||||
|
|
||||||
|
board_configuration_s *bc = &engineConfiguration->bc;
|
||||||
|
|
||||||
|
bc->ignitionPins[0] = GPIOC_7; // #1
|
||||||
|
bc->ignitionPins[1] = GPIO_NONE; // #2
|
||||||
|
bc->ignitionPins[2] = GPIOE_4; // #3
|
||||||
|
bc->ignitionPins[3] = GPIO_NONE; // #4
|
||||||
|
bc->ignitionPins[4] = GPIOC_9; // #5
|
||||||
|
bc->ignitionPins[5] = GPIO_NONE; // #6
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -142,13 +142,13 @@ void printConfiguration(engine_configuration_s *engineConfiguration, engine_conf
|
||||||
for (int i = 0; i < engineConfiguration->cylindersCount; i++) {
|
for (int i = 0; i < engineConfiguration->cylindersCount; i++) {
|
||||||
brain_pin_e brainPin = boardConfiguration->injectionPins[i];
|
brain_pin_e brainPin = boardConfiguration->injectionPins[i];
|
||||||
|
|
||||||
scheduleMsg(&logger, "injection %d @ %s", i, hwPortname(brainPin));
|
scheduleMsg(&logger, "injection #%d @ %s", (1 + i), hwPortname(brainPin));
|
||||||
}
|
}
|
||||||
|
|
||||||
scheduleMsg(&logger, "ignitionPins: mode %s", pinModeToString(boardConfiguration->ignitionPinMode));
|
scheduleMsg(&logger, "ignitionPins: mode %s", pinModeToString(boardConfiguration->ignitionPinMode));
|
||||||
for (int i = 0; i < engineConfiguration->cylindersCount; i++) {
|
for (int i = 0; i < engineConfiguration->cylindersCount; i++) {
|
||||||
brain_pin_e brainPin = boardConfiguration->ignitionPins[i];
|
brain_pin_e brainPin = boardConfiguration->ignitionPins[i];
|
||||||
scheduleMsg(&logger, "ignition %d @ %s", i, hwPortname(brainPin));
|
scheduleMsg(&logger, "ignition #%d @ %s", (1 + i), hwPortname(brainPin));
|
||||||
}
|
}
|
||||||
|
|
||||||
scheduleMsg(&logger, "boardTestModeJumperPin: %s", hwPortname(boardConfiguration->boardTestModeJumperPin));
|
scheduleMsg(&logger, "boardTestModeJumperPin: %s", hwPortname(boardConfiguration->boardTestModeJumperPin));
|
||||||
|
@ -446,7 +446,7 @@ static void setPotSpi(int spi) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setIgnitionPin(const char *indexStr, const char *pinName) {
|
static void setIgnitionPin(const char *indexStr, const char *pinName) {
|
||||||
int index = atoi(indexStr);
|
int index = atoi(indexStr) - 1; // convert from human index into software index
|
||||||
if (index < 0 || index > IGNITION_PIN_COUNT)
|
if (index < 0 || index > IGNITION_PIN_COUNT)
|
||||||
return;
|
return;
|
||||||
brain_pin_e pin = parseBrainPin(pinName);
|
brain_pin_e pin = parseBrainPin(pinName);
|
||||||
|
@ -482,7 +482,7 @@ static void setFuelPumpPin(const char *pinName) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setInjectionPin(const char *indexStr, const char *pinName) {
|
static void setInjectionPin(const char *indexStr, const char *pinName) {
|
||||||
int index = atoi(indexStr);
|
int index = atoi(indexStr) - 1; // convert from human index into software index
|
||||||
if (index < 0 || index > INJECTION_PIN_COUNT)
|
if (index < 0 || index > INJECTION_PIN_COUNT)
|
||||||
return;
|
return;
|
||||||
brain_pin_e pin = parseBrainPin(pinName);
|
brain_pin_e pin = parseBrainPin(pinName);
|
||||||
|
|
Loading…
Reference in New Issue