From c73fa82d079df27ed68e47e0be15c6020bfbd02c Mon Sep 17 00:00:00 2001 From: Stephen Dade Date: Fri, 30 Jun 2023 11:31:00 +1000 Subject: [PATCH] AP_Scripting: Add SET_MODE support for Rockblock lua script and mavlink example --- libraries/AP_Scripting/applets/RockBlock.lua | 10 ++++++++-- libraries/AP_Scripting/examples/MAVLinkHL.lua | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/libraries/AP_Scripting/applets/RockBlock.lua b/libraries/AP_Scripting/applets/RockBlock.lua index be1cb8cadc318..1d105ecb8677e 100644 --- a/libraries/AP_Scripting/applets/RockBlock.lua +++ b/libraries/AP_Scripting/applets/RockBlock.lua @@ -99,7 +99,8 @@ local function MAVLinkProcessor() COMMAND_LONG = 76, COMMAND_INT = 75, HIGH_LATENCY2 = 235, - MISSION_ITEM_INT = 73 + MISSION_ITEM_INT = 73, + SET_MODE = 11 } -- private fields @@ -117,6 +118,7 @@ local function MAVLinkProcessor() _crc_extra[76] = 0x98 _crc_extra[235] = 0xb3 _crc_extra[73] = 0x26 + _crc_extra[11] = 0x59 local _messages = {} _messages[75] = { -- COMMAND_INT @@ -149,7 +151,9 @@ local function MAVLinkProcessor() {"command", "