MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / hook

Method hook

libraries/AP_Scripting/lua_scripts.cpp:64–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64void lua_scripts::hook(lua_State *L, lua_Debug *ar) {
65 lua_scripts::overtime = true;
66
67 // we need to aggressively bail out as we are over time
68 // so we will aggressively trap errors until we clear out
69 lua_sethook(L, hook, LUA_MASKCOUNT, 1);
70
71 luaL_error(L, "Exceeded CPU time");
72}
73
74void lua_scripts::print_error(MAV_SEVERITY severity) {
75 error_msg_buf_sem.take_blocking();

Callers

nothing calls this directly

Calls 2

lua_sethookFunction · 0.85
luaL_errorFunction · 0.85

Tested by

no test coverage detected