Add Lua getUsage() function that returns percent of already used up i… (#5313)
* Add Lua getUsage() function that returns percent of already used up instructions in current script execution cycle. It can be used to avoid script being killed when doing long lasting tasks (like telemetry logs loading and parsing) * Compilation fixes * Doc fix * Disable Lua script instructions limit in DEBUG mode
This commit is contained in:
committed by
Andre Bernet
parent
6c7e4b5597
commit
955d5775cb
@@ -151,6 +151,7 @@ extern struct our_longjmp * global_lj;
|
||||
|
||||
extern uint16_t maxLuaInterval;
|
||||
extern uint16_t maxLuaDuration;
|
||||
extern uint8_t instructionsPercent;
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#define IS_MASKABLE(key) ((key) != KEY_EXIT && (key) != KEY_ENTER && ((luaState & INTERPRETER_RUNNING_STANDALONE_SCRIPT) || (key) != KEY_PAGE))
|
||||
|
||||
Reference in New Issue
Block a user