mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-11-09 16:41:21 +08:00
AP_Scripting: Add a debug level param
This commit is contained in:
1 parent
200870e7a0
commit
d7e71f85b8
4 files changed
+15
-6
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user