Skip to content

Commit

Permalink
AP_Scripting: DJI mount debug -- do not merge
Browse files Browse the repository at this point in the history
  • Loading branch information
rmackay9 committed Dec 4, 2023
1 parent 5c7fc34 commit 85e2a52
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions libraries/AP_Scripting/drivers/mount-djirs2-driver.lua
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,9 @@ function parse_byte(b)

-- parse attitude reply message
if (expected_reply == REPLY_TYPE.ATTITUDE) and (parse_length >= ATTITUDE_PACKET_LEN.LEGACY) then
if DJIR_DEBUG:get() > 0 then
gcs:send_text(MAV_SEVERITY.INFO, string.format("DJIR: att len:%d", parse_length))
end
-- default to legacy format but also handle latest format
local ret_code_field = 13
local yaw_field = 15
Expand Down Expand Up @@ -688,6 +691,9 @@ function parse_byte(b)

-- parse position control reply message
if (expected_reply == REPLY_TYPE.POSITION_CONTROL) and (parse_length >= POSITION_CONTROL_PACKET_LEN.LEGACY) then
if DJIR_DEBUG:get() > 0 then
gcs:send_text(MAV_SEVERITY.INFO, string.format("DJIR: poscontrol len:%d", parse_length))
end
-- default to legacy format but also handle latest format
local ret_code_field = 13
if (parse_length >= POSITION_CONTROL_PACKET_LEN.LATEST) then
Expand All @@ -701,6 +707,9 @@ function parse_byte(b)

-- parse speed control reply message
if (expected_reply == REPLY_TYPE.SPEED_CONTROL) and (parse_length >= SPEED_CONTROL_PACKET_LEN.LEGACY) then
if DJIR_DEBUG:get() > 0 then
gcs:send_text(MAV_SEVERITY.INFO, string.format("DJIR: speedcontrol len:%d", parse_length))
end
-- default to legacy format but also handle latest format
local ret_code_field = 13
if (parse_length >= SPEED_CONTROL_PACKET_LEN.LATEST) then
Expand Down

0 comments on commit 85e2a52

Please sign in to comment.