fsio_setting to use human indexes #369

This commit is contained in:
rusefi 2017-03-12 15:22:07 -04:00
parent d7cea7471e
commit 98c077a26c
1 changed files with 5 additions and 5 deletions

View File

@ -432,14 +432,14 @@ static void showFsioInfo(void) {
/**
* set_fsio_setting 1 0.11
*/
static void setFsioSetting(float indexF, float value) {
static void setFsioSetting(float humanIndexF, float value) {
#if EFI_PROD_CODE || EFI_SIMULATOR
int humanIndex = (int)indexF;
if (humanIndex < 1 || humanIndex > LE_COMMAND_COUNT) {
scheduleMsg(logger, "invalid FSIO index: %d", humanIndex);
int index = (int)humanIndexF - 1;
if (index < 0 || index >= LE_COMMAND_COUNT) {
scheduleMsg(logger, "invalid FSIO index: %d", (int)humanIndexF);
return;
}
engineConfiguration->bc.fsio_setting[humanIndex] = value;
engineConfiguration->bc.fsio_setting[index] = value;
showFsioInfo();
#endif
}