AP_Scripting: Add a debug level param

This commit is contained in:
Michael du Breuil authored and WickedShell committed 2019-04-11 23:03:20 -07:00
1 parent 200870e7a0
commit d7e71f85b8
4 files changed
+15 -6

No files matched your search

+3 -1
View File
@@ -63,6 +63,8 @@ const AP_Param::GroupInfo AP_Scripting::var_info[] = {
// @RebootRequired: True
AP_GROUPINFO("HEAP_SIZE", 3, AP_Scripting, _script_heap_size, 32*1024),
AP_GROUPINFO("DEBUG_LVL", 4, AP_Scripting, _debug_level, 1),
AP_GROUPEND
};
@@ -92,7 +94,7 @@ bool AP_Scripting::init(void) {
}
void AP_Scripting::thread(void) {
lua_scripts *lua = new lua_scripts(_script_vm_exec_count, _script_heap_size);
lua_scripts *lua = new lua_scripts(_script_vm_exec_count, _script_heap_size, _debug_level);
if (lua == nullptr) {
gcs().send_text(MAV_SEVERITY_CRITICAL, "Unable to allocate scripting memory");
return;