diff --git a/firmware/controllers/bench_test.cpp b/firmware/controllers/bench_test.cpp index f0de65a72f..5ab3e4a631 100644 --- a/firmware/controllers/bench_test.cpp +++ b/firmware/controllers/bench_test.cpp @@ -170,14 +170,14 @@ static void doRunSolenoidBench(size_t humanIndex, float delay, float onTime, flo &enginePins.tcuSolenoids[humanIndex - 1], engineConfiguration->tcu_solenoid[humanIndex - 1]); } -static void doRunBenchTestLuaOutput(size_t /* humanIndex */, float /* delay */, float /* onTime */, float /* offTime */, int /* count */) { -// if (humanIndex < 1 || humanIndex > FSIO_COMMAND_COUNT) { -// efiPrintf("Invalid index: %d", humanIndex); -// return; -// } +static void doRunBenchTestLuaOutput(size_t humanIndex, float /* delay */, float /* onTime */, float /* offTime */, int /* count */) { + if (humanIndex < 1 || humanIndex > LUA_PWM_COUNT) { + efiPrintf("Invalid index: %d", humanIndex); + return; + } // todo: convert in lua bench test // pinbench(delay, onTime, offTime, count, -// &enginePins.fsioOutputs[humanIndex - 1], engineConfiguration->fsioOutputPins[humanIndex - 1]); +// &enginePins.luaOutputPins[humanIndex - 1], engineConfiguration->luaOutputPins[humanIndex - 1]); } /** @@ -222,8 +222,8 @@ static void tcuSolenoidBench(float delay, float humanIndex, float onTime, float * delay 100, channel #1, 5ms ON, 1000ms OFF, repeat 3 times * fsiobench2 100 1 5 1000 3 */ -static void fsioBench2(float delay, float humanIndex, float onTime, float offTime, float count) { - doRunBenchTestFsio((int)humanIndex, delay, onTime, offTime, (int)count); +static void luaOutBench2(float delay, float humanIndex, float onTime, float offTime, float count) { + doRunBenchTestLuaOutput((int)humanIndex, delay, onTime, offTime, (int)count); } static void fanBenchExt(float onTime) { @@ -472,7 +472,7 @@ void executeTSCommand(uint16_t subsystem, uint16_t index) { } break; - case CMD_TS_LUA_OUT_CATEGORY: + case CMD_TS_LUA_OUTPUT_CATEGORY: if (!running) { doRunBenchTestLuaOutput(index, 300.0, 4.0, engineConfiguration->benchTestOffTime, engineConfiguration->benchTestCount); @@ -570,7 +570,7 @@ void initBenchTest() { addConsoleAction(CMD_MIL_BENCH, milBench); addConsoleAction(CMD_HPFP_BENCH, hpfpValveBench); - addConsoleActionFFFFF("fsiobench2", fsioBench2); + addConsoleActionFFFFF("luabench2", luaOutBench2); instance.setPeriod(200 /*ms*/); instance.Start(); onConfigurationChangeBenchTest(); diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index 8cfccc7e1f..05cc5dfa9c 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -1938,7 +1938,7 @@ end_struct #define CMD_TS_X14 20 ! 0x16 #define CMD_TS_BENCH_CATEGORY 22 -#define CMD_TS_LUA_OUT_CATEGORY 33 +#define CMD_TS_LUA_OUTPUT_CATEGORY 33 #define CMD_TS_X31 49 #define CMD_TS_SOLENOID_CATEGORY 41