Lua refresh rate transparency/logic etc #5939

hopefully not too much profiling
This commit is contained in:
rusefillc 2024-02-15 12:50:10 -05:00
parent 68b888f30a
commit 712a3f973e
5 changed files with 9 additions and 2 deletions

View File

@ -56,6 +56,7 @@ void processLuaCan(const size_t busIndex, const CANRxFrame& frame) {
}
static void handleCanFrame(LuaHandle& ls, CanFrameData* data) {
ScopePerf perf(PE::LuaOneCanRxCallback);
if (data->Callback == NO_CALLBACK) {
// No callback, use catch-all function
lua_getglobal(ls, "onCanRx");

View File

@ -168,6 +168,7 @@ static int validateCanChannelAndConvertFromHumanIntoZeroIndex(lua_State* l) {
}
static int lua_txCan(lua_State* l) {
ScopePerf perf(PE::LuaOneCanTxFunction);
int bus;
int id;
int ext;

View File

@ -70,7 +70,9 @@ enum class PE : uint8_t {
LogTriggerTooth,
LuaTickFunction,
LuaOneCanRxFunction,
LuaAllCanRxFunction
LuaAllCanRxFunction,
LuaOneCanRxCallback,
LuaOneCanTxFunction,
// enum_end_tag
// The tag above is consumed by PerfTraceTool.java
// please note that the tool requires a comma at the end of last value

0
firmware/gen_perf_trace_enum.sh Normal file → Executable file
View File

View File

@ -1,5 +1,5 @@
package com.rusefi.tracing;
// generated Thu Feb 15 09:37:27 EST 2024 by class com.rusefi.PerfTraceEnumGenerator
// generated Thu Feb 15 09:45:57 EST 2024 by class com.rusefi.PerfTraceEnumGenerator
public class EnumNames {
public static final String[] TypeNames = {
"INVALID",
@ -54,5 +54,8 @@ public class EnumNames {
"LogTriggerTooth",
"LuaTickFunction",
"LuaOneCanRxFunction",
"LuaAllCanRxFunction",
"LuaOneCanRxCallback",
"LuaOneCanTxFunction",
};
}