script settings need names!

This commit is contained in:
rusefillc 2021-11-13 23:10:38 -05:00
parent 1e8d8f9691
commit 6210eaacf7
3 changed files with 4 additions and 4 deletions

View File

@ -207,7 +207,7 @@ FsioResult LECalculator::processElement(const LEElement *element DECLARE_ENGINE_
float humanIndex = pop(LE_METHOD_FSIO_SETTING);
int index = (int) humanIndex - 1;
if (index >= 0 && index < FSIO_COMMAND_COUNT) {
return CONFIG(fsio_setting)[index];
return CONFIG(scriptSetting)[index];
} else {
return unexpected;
}

View File

@ -538,7 +538,7 @@ static void showFsioInfo(void) {
}
}
for (int i = 0; i < FSIO_COMMAND_COUNT; i++) {
float v = CONFIG(fsio_setting)[i];
float v = CONFIG(scriptSetting)[i];
if (!cisnan(v)) {
efiPrintf("user property #%d: %.2f", i + 1, v);
}
@ -562,7 +562,7 @@ static void setFsioSetting(float humanIndexF, float value) {
efiPrintf("invalid FSIO index: %d", (int)humanIndexF);
return;
}
engineConfiguration->fsio_setting[index] = value;
engineConfiguration->scriptSetting[index] = value;
showFsioInfo();
#endif
}

View File

@ -556,7 +556,7 @@ void onTriggerEventSparkLogic(bool limitedSpark, uint32_t trgEventIndex, int rpm
if (event->dwellPosition.triggerEventIndex != trgEventIndex)
continue;
if (i == 0 && CONFIG(artificialTestMisfire) && (getRevolutionCounter() % ((int)engineConfiguration->fsio_setting[5]) == 0)) {
if (i == 0 && CONFIG(artificialTestMisfire) && (getRevolutionCounter() % ((int)engineConfiguration->scriptSetting[5]) == 0)) {
// artificial misfire on cylinder #1 for testing purposes
// enable artificialMisfire
// set_fsio_setting 6 20