Epic: Remove FSIO #2928
This commit is contained in:
parent
0a9682c553
commit
a85d1bb064
|
@ -347,7 +347,7 @@ void setTle8888TestConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
// SF PF11
|
||||
#if defined(STM32_HAS_GPIOF) && STM32_HAS_GPIOF
|
||||
#if EFI_FSIO
|
||||
setFsio(14, GPIOF_13, "1" PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
// todo lua setFsio(14, GPIOF_13, "1" PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
#endif /* EFI_FSIO */
|
||||
CONFIG(etbIo[0].directionPin1) = GPIOF_15;
|
||||
CONFIG(etbIo[0].directionPin2) = GPIOF_14;
|
||||
|
@ -363,7 +363,7 @@ void setTle8888TestConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
// IN2 PE4
|
||||
// SF PE3
|
||||
#if EFI_FSIO
|
||||
setFsio(15, GPIOE_6, "1" PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
// todo lua setFsio(15, GPIOE_6, "1" PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
#endif
|
||||
CONFIG(etbIo[0].directionPin1) = GPIOE_2;
|
||||
CONFIG(etbIo[0].directionPin2) = GPIOE_4;
|
||||
|
@ -584,13 +584,6 @@ void mreBCM(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->consumeObdSensors = true;
|
||||
|
||||
|
||||
engineConfiguration->scriptSetting[0] = 1500;
|
||||
// simple warning light as default configuration
|
||||
// set_fsio_expression 1 "rpm > fsio_setting(1)"
|
||||
setFsio(0, GPIO_UNASSIGNED, RPM_ABOVE_USER_SETTING_1 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
|
||||
engineConfiguration->scriptSetting[2] = 1500;
|
||||
setFsio(2, GPIO_UNASSIGNED, RPM_BELOW_USER_SETTING_3 PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
|
||||
|
||||
#if (BOARD_TLE8888_COUNT > 0)
|
||||
|
|
|
@ -144,7 +144,7 @@ void vag_18_Turbo(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->isHip9011Enabled = false;
|
||||
|
||||
#if EFI_FSIO
|
||||
setFsio (15, GPIOE_6, "1" PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
// todo lua setFsio (15, GPIOE_6, "1" PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
#endif
|
||||
CONFIG(etbIo[1].directionPin1) = GPIOE_2;
|
||||
CONFIG(etbIo[1].directionPin2) = GPIOE_4;
|
||||
|
|
|
@ -238,23 +238,6 @@ static void setFsioOutputPin(const char *indexStr, const char *pinName) {
|
|||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* index is between zero and LE_COMMAND_LENGTH-1
|
||||
*/
|
||||
void setFsioExt(int index, brain_pin_e pin, const char * formula, int pwmFrequency DECLARE_CONFIG_PARAMETER_SUFFIX) {
|
||||
CONFIG(fsioOutputPins)[index] = pin;
|
||||
int len = strlen(formula);
|
||||
if (len >= LE_COMMAND_LENGTH) {
|
||||
return;
|
||||
}
|
||||
strcpy(config->fsioFormulas[index], formula);
|
||||
CONFIG(fsioFrequency)[index] = pwmFrequency;
|
||||
}
|
||||
|
||||
void setFsio(int index, brain_pin_e pin, const char * exp DECLARE_CONFIG_PARAMETER_SUFFIX) {
|
||||
setFsioExt(index, pin, exp, NO_PWM PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
}
|
||||
|
||||
void applyFsioConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||
userPool.reset();
|
||||
for (int i = 0; i < FSIO_COMMAND_COUNT; i++) {
|
||||
|
@ -660,44 +643,6 @@ void initFsioImpl(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
if (isBrainPinValid(CONFIG(starterRelayDisablePin)))
|
||||
starterRelayDisableLogic = sysPool.parseExpression(STARTER_RELAY_LOGIC);
|
||||
|
||||
#if EFI_PROD_CODE
|
||||
for (int i = 0; i < FSIO_COMMAND_COUNT; i++) {
|
||||
brain_pin_e brainPin = CONFIG(fsioOutputPins)[i];
|
||||
|
||||
if (isBrainPinValid(brainPin)) {
|
||||
int frequency = CONFIG(fsioFrequency)[i];
|
||||
if (frequency == 0) {
|
||||
enginePins.fsioOutputs[i].initPin(getGpioPinName(i), CONFIG(fsioOutputPins)[i]);
|
||||
} else {
|
||||
startSimplePwmExt(&fsioPwm[i], "FSIOpwm",
|
||||
&engine->executor,
|
||||
brainPin, &enginePins.fsioOutputs[i], frequency, 0.5f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < FSIO_COMMAND_COUNT; i++) {
|
||||
brain_pin_e inputPin = CONFIG(fsioDigitalInputs)[i];
|
||||
|
||||
if (isBrainPinValid(inputPin)) {
|
||||
efiSetPadMode("FSIO input", inputPin, getInputMode(engineConfiguration->fsioInputModes[i]));
|
||||
}
|
||||
}
|
||||
|
||||
addConsoleActionSS("set_fsio_pid_output_pin", (VoidCharPtrCharPtr) setFsioPidOutputPin);
|
||||
addConsoleActionSS("set_fsio_output_pin", (VoidCharPtrCharPtr) setFsioOutputPin);
|
||||
addConsoleActionII("set_fsio_output_frequency", (VoidIntInt) setFsioFrequency);
|
||||
addConsoleActionSS("set_fsio_digital_input_pin", (VoidCharPtrCharPtr) setFsioDigitalInputPin);
|
||||
addConsoleActionSS("set_fsio_analog_input_pin", (VoidCharPtrCharPtr) setFsioAnalogInputPin);
|
||||
|
||||
#endif /* EFI_PROD_CODE */
|
||||
|
||||
#if EFI_PROD_CODE || EFI_SIMULATOR
|
||||
addConsoleActionSS("set_rpn_expression", applyFsioExpression);
|
||||
addConsoleActionFF("set_fsio_setting", setFsioSetting);
|
||||
addConsoleAction("fsioinfo", showFsioInfo);
|
||||
#endif /* EFI_PROD_CODE || EFI_SIMULATOR */
|
||||
|
||||
fsioTable1.init(config->fsioTable1, config->fsioTable1LoadBins,
|
||||
config->fsioTable1RpmBins);
|
||||
fsioTable2.init(config->fsioTable2, config->fsioTable2LoadBins,
|
||||
|
|
|
@ -22,13 +22,6 @@ typedef Map3D<FSIO_TABLE_8, FSIO_TABLE_8, uint8_t, float, float> fsio8_Map3D_u8t
|
|||
|
||||
expected<float> getEngineValue(le_action_e action DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||
|
||||
/**
|
||||
* set_fsio_output_pin 7 PE3
|
||||
* set_rpn_expression 1 "rpm 0 fsio_setting <"
|
||||
*/
|
||||
void setFsio(int index, brain_pin_e pin, const char * exp DECLARE_CONFIG_PARAMETER_SUFFIX);
|
||||
void setFsioExt(int index, brain_pin_e pin, const char * exp, int pwmFrequency DECLARE_CONFIG_PARAMETER_SUFFIX);
|
||||
|
||||
void initFsioImpl(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
void runFsio(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
void setFsioExpression(const char *indexStr, const char *quotedLine DECLARE_CONFIG_PARAMETER_SUFFIX);
|
||||
|
|
|
@ -98,34 +98,3 @@ TEST(fuelCut, coasting) {
|
|||
assertEqualsM("inj dur#7 cut", 0.0f, ENGINE(injectionDuration));
|
||||
}
|
||||
|
||||
|
||||
TEST(fuelCut, criticalEngineTemperature) {
|
||||
WITH_ENGINE_TEST_HELPER(TEST_ENGINE);
|
||||
|
||||
setupSimpleTestEngineWithMafAndTT_ONE_trigger(ð);
|
||||
|
||||
engineConfiguration->useFSIO5ForCriticalIssueEngineStop = true;
|
||||
setFsio(MAGIC_OFFSET_FOR_CRITICAL_ENGINE - 1, GPIOD_7, TOO_HOT_LOGIC PASS_CONFIG_PARAMETER_SUFFIX);
|
||||
applyFsioConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
|
||||
// we need some non-zero time as getTimeNow() which would become stopEngineRequestTimeNt
|
||||
eth.moveTimeForwardUs(1000);
|
||||
|
||||
engine->rpmCalculator.mockRpm = 2000;
|
||||
eth.engine.periodicFastCallback(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
eth.engine.periodicSlowCallback(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
ASSERT_EQ(engine->stopEngineRequestTimeNt, 0);
|
||||
|
||||
ASSERT_FALSE(engine->stopEngineRequestTimeNt > 0);
|
||||
|
||||
Sensor::setMockValue(SensorType::Clt, 200);
|
||||
eth.engine.periodicFastCallback(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
eth.engine.periodicSlowCallback(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
|
||||
ASSERT_TRUE(engine->stopEngineRequestTimeNt > 0);
|
||||
}
|
||||
|
||||
TEST(fuel, injectorFlowCorrection) {
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue