Lua is new FSIO
This commit is contained in:
parent
0b74e9db49
commit
3e6bc71e99
|
@ -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();
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue