Epic: Remove FSIO #2928
This commit is contained in:
parent
991d0c5001
commit
eb1af46655
|
@ -147,7 +147,6 @@ GPIOA_6
|
|||
*/
|
||||
|
||||
|
||||
CONFIG(fsioOutputPins)[7] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->fuelPumpPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->idle.solenoidPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->fanPin = GPIO_UNASSIGNED;
|
||||
|
|
|
@ -559,15 +559,6 @@ void proteusBoardTest(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->ignitionPins[10] = PROTEUS_IGN_1;
|
||||
engineConfiguration->ignitionPins[11] = PROTEUS_IGN_12;
|
||||
|
||||
engineConfiguration->fsioOutputPins[0] = GPIOE_2;// "Lowside 16" # pin 23/black35
|
||||
engineConfiguration->fsioOutputPins[1] = GPIOG_14;// "Lowside 7"
|
||||
engineConfiguration->fsioOutputPins[2] = GPIOE_0;// "Lowside 14" # pin 11/black35
|
||||
engineConfiguration->fsioOutputPins[3] = GPIOE_1;// "Lowside 15" # pin 12/black35
|
||||
|
||||
engineConfiguration->fsioOutputPins[4] = GPIOG_3;// "Ign 11"
|
||||
engineConfiguration->fsioOutputPins[5] = GPIOA_8;// "Highside 2" # pin 1/black35
|
||||
engineConfiguration->fsioOutputPins[6] = GPIOD_14;// "Highside 4" # pin 14/black35
|
||||
engineConfiguration->fsioOutputPins[7] = GPIOG_4;// "Ign 10"
|
||||
|
||||
#endif // EFI_PROD_CODE
|
||||
|
||||
|
@ -583,22 +574,6 @@ void mreBCM(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->fanPin = GPIO_UNASSIGNED;
|
||||
engineConfiguration->consumeObdSensors = true;
|
||||
|
||||
|
||||
|
||||
|
||||
#if (BOARD_TLE8888_COUNT > 0)
|
||||
engineConfiguration->fsioOutputPins[0] = TLE8888_PIN_1; // "37 - Injector 1"
|
||||
engineConfiguration->fsioOutputPins[1] = TLE8888_PIN_2; // "38 - Injector 2"
|
||||
engineConfiguration->fsioOutputPins[2] = TLE8888_PIN_3; // "41 - Injector 3"
|
||||
engineConfiguration->fsioOutputPins[3] = TLE8888_PIN_4; // "42 - Injector 4"
|
||||
// engineConfiguration->fsioOutputPins[4] = TLE8888_PIN_5;
|
||||
// engineConfiguration->fsioOutputPins[5] = TLE8888_PIN_6;
|
||||
// engineConfiguration->fsioOutputPins[6] = TLE8888_PIN_21;
|
||||
engineConfiguration->fsioOutputPins[7] = TLE8888_PIN_22; // "34 - GP Out 2"
|
||||
engineConfiguration->fsioOutputPins[8] = TLE8888_PIN_23; // "33 - GP Out 3"
|
||||
engineConfiguration->fsioOutputPins[9] = TLE8888_PIN_24; // "43 - GP Out 4"
|
||||
#endif /* BOARD_TLE8888_COUNT */
|
||||
|
||||
}
|
||||
|
||||
void mreSecondaryCan(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
|
|
|
@ -408,11 +408,6 @@ void setMiataNA6_MAP_MRE(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
// TLE8888_PIN_23: "33 - GP Out 3"
|
||||
engineConfiguration->malfunctionIndicatorPin = TLE8888_PIN_23;
|
||||
|
||||
// GPIOA_15: "AUX J2 PA15"
|
||||
engineConfiguration->fsioOutputPins[0] = GPIOA_15;
|
||||
// TLE8888_PIN_24: "43 - GP Out 4"
|
||||
engineConfiguration->fsioOutputPins[1] = TLE8888_PIN_24;
|
||||
|
||||
#endif /* BOARD_TLE8888_COUNT */
|
||||
}
|
||||
|
||||
|
|
|
@ -151,8 +151,9 @@ static void doBenchTestFsio(int humanIndex, const char *delayStr, const char * o
|
|||
efiPrintf("Invalid index: %d", humanIndex);
|
||||
return;
|
||||
}
|
||||
brain_pin_e b = CONFIG(fsioOutputPins)[humanIndex - 1];
|
||||
pinbench(delayStr, onTimeStr, offTimeStr, countStr, &enginePins.fsioOutputs[humanIndex - 1], b);
|
||||
// todo: convert in lua bench test
|
||||
// brain_pin_e b = CONFIG(fsioOutputPins)[humanIndex - 1];
|
||||
// pinbench(delayStr, onTimeStr, offTimeStr, countStr, &enginePins.fsioOutputs[humanIndex - 1], b);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -161,28 +161,6 @@ FsioResult getEngineValue(le_action_e action DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
#if EFI_PROD_CODE
|
||||
|
||||
static void setFsioAnalogInputPin(const char *indexStr, const char *pinName) {
|
||||
// todo: reduce code duplication between all "set pin methods"
|
||||
int index = atoi(indexStr) - 1;
|
||||
if (index < 0 || index >= AUX_ANALOG_INPUT_COUNT) {
|
||||
efiPrintf("invalid FSIO index: %d", index);
|
||||
return;
|
||||
}
|
||||
brain_pin_e pin = parseBrainPin(pinName);
|
||||
// todo: extract method - code duplication with other 'set_xxx_pin' methods?
|
||||
if (pin == GPIO_INVALID) {
|
||||
efiPrintf("invalid pin name [%s]", pinName);
|
||||
return;
|
||||
}
|
||||
engineConfiguration->auxAnalogInputs[index] = (adc_channel_e) pin;
|
||||
efiPrintf("FSIO analog input pin #%d [%s]", (index + 1), hwPortname(pin));
|
||||
}
|
||||
|
||||
#endif /* EFI_PROD_CODE */
|
||||
|
||||
#endif
|
||||
|
||||
void onConfigurationChangeFsioCallback(engine_configuration_s *previousConfiguration DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
|
@ -339,21 +317,6 @@ static void showFsioInfo(void) {
|
|||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* set_fsio_setting 1 0.11
|
||||
*/
|
||||
static void setFsioSetting(float humanIndexF, float value) {
|
||||
#if EFI_PROD_CODE || EFI_SIMULATOR
|
||||
int index = (int)humanIndexF - 1;
|
||||
if (index < 0 || index >= FSIO_COMMAND_COUNT) {
|
||||
efiPrintf("invalid FSIO index: %d", (int)humanIndexF);
|
||||
return;
|
||||
}
|
||||
engineConfiguration->scriptSetting[index] = value;
|
||||
showFsioInfo();
|
||||
#endif
|
||||
}
|
||||
|
||||
ValueProvider3D *getFSIOTable(int index) {
|
||||
switch (index) {
|
||||
default:
|
||||
|
|
|
@ -185,10 +185,6 @@ void EnginePins::unregisterPins() {
|
|||
unregisterOutputIfPinChanged(sdCsPin, sdCardCsPin);
|
||||
unregisterOutputIfPinChanged(accelerometerCs, LIS302DLCsPin);
|
||||
|
||||
for (int i = 0;i < FSIO_COMMAND_COUNT;i++) {
|
||||
unregisterOutputIfPinChanged(fsioOutputs[i], fsioOutputPins[i]);
|
||||
}
|
||||
|
||||
RegisteredOutputPin * pin = registeredOutputHead;
|
||||
while (pin != nullptr) {
|
||||
pin->unregister();
|
||||
|
|
Loading…
Reference in New Issue