From 40498f8524b6202ff49a807d3e0703b015733338 Mon Sep 17 00:00:00 2001 From: rusefillc <48498823+rusefillc@users.noreply.github.com> Date: Thu, 14 Jul 2022 07:29:53 -0400 Subject: [PATCH 1/2] Updated Lua Scripting (markdown) --- Lua-Scripting.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Lua-Scripting.md b/Lua-Scripting.md index f043da2b..e80561cc 100644 --- a/Lua-Scripting.md +++ b/Lua-Scripting.md @@ -419,6 +419,9 @@ tps = getSensor("Tps1") dutyCycle = table3d(tableIndex, TurbochargerSpeed, tps) +sparkCutCurve = findCurveIndex("sparkcut") +sparkCutByTorque = curve(sparkCutCurve, torque) + ``` From 49ea09510acf04a5ec14bd56bbee1cb183110b7e Mon Sep 17 00:00:00 2001 From: rusefillc <48498823+rusefillc@users.noreply.github.com> Date: Thu, 14 Jul 2022 07:31:10 -0400 Subject: [PATCH 2/2] Updated Lua Scripting (markdown) --- Lua-Scripting.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Lua-Scripting.md b/Lua-Scripting.md index e80561cc..17d1c2fd 100644 --- a/Lua-Scripting.md +++ b/Lua-Scripting.md @@ -153,6 +153,9 @@ Sets the rate at which rusEFI calls your `onTick` and `onCanRx` functions, in hz Stops MCU. +### `findTableIndex(name)` +Find table index by specified human-readable name. + ### `table3d(tableIdx, x, y)` Looks up a value from the specified Script Table. @@ -164,6 +167,9 @@ Looks up a value from the specified Script Table. - Returns - A number representing the value looked up from the table. +### `findCurveIndex(name)` +Finds curve index by specific curve name + ### `curve(curveIdx, x)` Looks up a value from the specified Script Curve.