From 3a7bf8dd7ddad9b335d122f6d15997ab7bd40134 Mon Sep 17 00:00:00 2001 From: Iampete1 Date: Tue, 7 May 2024 04:06:06 +0100 Subject: [PATCH] AP_Scripting: ignore lua language check issues resulting from https://github.com/ArduPilot/ardupilot/pull/26939 --- libraries/AP_Scripting/examples/CAN_MiniCheetah_drive.lua | 1 + libraries/AP_Scripting/examples/CAN_read.lua | 1 + libraries/AP_Scripting/examples/CAN_write.lua | 1 + libraries/AP_Scripting/examples/benewakeH30_can_rangefinder.lua | 1 + 4 files changed, 4 insertions(+) diff --git a/libraries/AP_Scripting/examples/CAN_MiniCheetah_drive.lua b/libraries/AP_Scripting/examples/CAN_MiniCheetah_drive.lua index cd5b681ec8..46a6643401 100644 --- a/libraries/AP_Scripting/examples/CAN_MiniCheetah_drive.lua +++ b/libraries/AP_Scripting/examples/CAN_MiniCheetah_drive.lua @@ -2,6 +2,7 @@ -- https://os.mbed.com/users/benkatz/code/HKC_MiniCheetah/docs/tip/CAN__com_8cpp_source.html ---@diagnostic disable: param-type-mismatch +---@diagnostic disable: need-check-nil -- Load CAN driver with a buffer size of 20 local driver = CAN:get_device(20) diff --git a/libraries/AP_Scripting/examples/CAN_read.lua b/libraries/AP_Scripting/examples/CAN_read.lua index 789f9e3200..bafaf37dae 100644 --- a/libraries/AP_Scripting/examples/CAN_read.lua +++ b/libraries/AP_Scripting/examples/CAN_read.lua @@ -1,4 +1,5 @@ -- This script is an example of reading from the CAN bus +---@diagnostic disable: need-check-nil -- Load CAN driver1. The first will attach to a protocol of 10, the 2nd to a protocol of 12 -- this allows the script to distinguish packets on two CAN interfaces diff --git a/libraries/AP_Scripting/examples/CAN_write.lua b/libraries/AP_Scripting/examples/CAN_write.lua index 3076391751..5fb551fb6b 100644 --- a/libraries/AP_Scripting/examples/CAN_write.lua +++ b/libraries/AP_Scripting/examples/CAN_write.lua @@ -1,4 +1,5 @@ -- This script is an example of writing to CAN bus +---@diagnostic disable: need-check-nil -- Load CAN driver, using the scripting protocol and with a buffer size of 5 local driver = CAN:get_device(5) diff --git a/libraries/AP_Scripting/examples/benewakeH30_can_rangefinder.lua b/libraries/AP_Scripting/examples/benewakeH30_can_rangefinder.lua index a092cf85f2..f3fe89fa9b 100644 --- a/libraries/AP_Scripting/examples/benewakeH30_can_rangefinder.lua +++ b/libraries/AP_Scripting/examples/benewakeH30_can_rangefinder.lua @@ -1,6 +1,7 @@ -- Lua Can Driver for Benewake CAN Rangefinder ---@diagnostic disable: undefined-global +---@diagnostic disable: need-check-nil -- User settable parameters local update_rate_ms = 10 -- update rate (in ms) of the driver