diff --git a/libraries/AP_Scripting/drivers/mount-djirs2-driver.lua b/libraries/AP_Scripting/drivers/mount-djirs2-driver.lua index 179106bb642987..8b29f289e30e6b 100644 --- a/libraries/AP_Scripting/drivers/mount-djirs2-driver.lua +++ b/libraries/AP_Scripting/drivers/mount-djirs2-driver.lua @@ -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 @@ -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 @@ -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