BUG: FSIO logic requires a pin to calculate fix #933

This commit is contained in:
rusefi 2019-09-18 22:07:02 -04:00
parent f48f60bb36
commit ddbd96ba72
1 changed files with 6 additions and 12 deletions

View File

@ -257,19 +257,13 @@ void setFsio(int index, brain_pin_e pin, const char * exp DECLARE_CONFIG_PARAMET
void applyFsioConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
userPool.reset();
for (int i = 0; i < FSIO_COMMAND_COUNT; i++) {
brain_pin_e brainPin = CONFIGB(fsioOutputPins)[i];
if (brainPin != GPIO_UNASSIGNED) {
const char *formula = config->fsioFormulas[i];
LEElement *logic = userPool.parseExpression(formula);
if (logic == NULL) {
warning(CUSTOM_FSIO_PARSING, "parsing [%s]", formula);
}
state.fsioLogics[i] = logic;
} else {
scheduleMsg(logger, "No pin - no value! %d", i);
const char *formula = config->fsioFormulas[i];
LEElement *logic = userPool.parseExpression(formula);
if (logic == NULL) {
warning(CUSTOM_FSIO_PARSING, "parsing [%s]", formula);
}
state.fsioLogics[i] = logic;
}
}