From 3deaece3b7b795fd2cba6cd90f157d8aed792d49 Mon Sep 17 00:00:00 2001
From: Iampete1 <iampete@hotmail.co.uk>
Date: Tue, 14 Feb 2023 02:44:36 +0000
Subject: [PATCH] AP_Scripting: applets: ignore luacheck warnings

---
 .../applets/Aerobatics/FixedWing/RateBased/sport_aerobatics.lua | 1 +
 .../applets/Aerobatics/FixedWing/plane_aerobatics.lua           | 1 +
 libraries/AP_Scripting/applets/Heli_IM_COL_Tune.lua             | 1 +
 libraries/AP_Scripting/applets/Hexsoon LEDs.lua                 | 1 +
 libraries/AP_Scripting/applets/MissionSelector.lua              | 1 +
 libraries/AP_Scripting/applets/Script_Controller.lua            | 1 +
 libraries/AP_Scripting/applets/VTOL-quicktune.lua               | 2 ++
 .../AP_Scripting/applets/forward_flight_motor_shutdown.lua      | 2 ++
 libraries/AP_Scripting/applets/plane_package_place.lua          | 2 ++
 libraries/AP_Scripting/applets/plane_ship_landing.lua           | 1 +
 libraries/AP_Scripting/applets/runcam_on_arm.lua                | 2 ++
 11 files changed, 15 insertions(+)

diff --git a/libraries/AP_Scripting/applets/Aerobatics/FixedWing/RateBased/sport_aerobatics.lua b/libraries/AP_Scripting/applets/Aerobatics/FixedWing/RateBased/sport_aerobatics.lua
index 2078aa44c1..9991fb3b3e 100644
--- a/libraries/AP_Scripting/applets/Aerobatics/FixedWing/RateBased/sport_aerobatics.lua
+++ b/libraries/AP_Scripting/applets/Aerobatics/FixedWing/RateBased/sport_aerobatics.lua
@@ -5,6 +5,7 @@ cmd = 3: rolling circle, arg1 = yaw rate, arg2 = roll rate
 cmd = 4: knife edge at any angle, arg1 = roll angle to hold, arg2 = duration
 cmd = 5: pause, holding heading and alt to allow stabilization after a move, arg1 = duration in seconds
 ]]--
+-- luacheck: only 0
 
 DO_JUMP = 177
 k_throttle = 70
diff --git a/libraries/AP_Scripting/applets/Aerobatics/FixedWing/plane_aerobatics.lua b/libraries/AP_Scripting/applets/Aerobatics/FixedWing/plane_aerobatics.lua
index 4b079402e3..d0d68e2d73 100644
--- a/libraries/AP_Scripting/applets/Aerobatics/FixedWing/plane_aerobatics.lua
+++ b/libraries/AP_Scripting/applets/Aerobatics/FixedWing/plane_aerobatics.lua
@@ -4,6 +4,7 @@
    Written by Matthew Hampsey, Andy Palmer and Andrew Tridgell, with controller
    assistance from Paul Riseborough, testing by Henry Wurzburg
 ]]--
+-- luacheck: only 0
 
 -- setup param block for aerobatics, reserving 30 params beginning with AERO_
 local PARAM_TABLE_KEY = 70
diff --git a/libraries/AP_Scripting/applets/Heli_IM_COL_Tune.lua b/libraries/AP_Scripting/applets/Heli_IM_COL_Tune.lua
index e54275c005..84d2343f0e 100644
--- a/libraries/AP_Scripting/applets/Heli_IM_COL_Tune.lua
+++ b/libraries/AP_Scripting/applets/Heli_IM_COL_Tune.lua
@@ -4,6 +4,7 @@
 -- this pot to adjust the sensitivity of the collective about the collective midstick.  The 2nd Pot then controls
 -- the value of the 50% point on the curve.  This can be used to set the collective position to aid with hovering 
 -- at the midstick.
+-- luacheck: only 0
 
 -- Tested and working as of 25th Aug 2020 (Copter Dev)
 
diff --git a/libraries/AP_Scripting/applets/Hexsoon LEDs.lua b/libraries/AP_Scripting/applets/Hexsoon LEDs.lua
index 8ac5b25af5..142e1e49b7 100644
--- a/libraries/AP_Scripting/applets/Hexsoon LEDs.lua	
+++ b/libraries/AP_Scripting/applets/Hexsoon LEDs.lua	
@@ -25,6 +25,7 @@ LEDs should now work!, if not try swapping AUX 5 and 6, either by physically swa
 To get colours to match either change the ordering in "local led_map ="  below or swap headers round on the LED distribution board
 If using 6 les add two extra colours to "local led_map =" e.g:  "local led_map = {red, red, red, green, green, green}"
 --]]
+-- luacheck: only 0
 
 -- helper colours, red, green, blue values from 0 to 255
 local red   = {255, 0,   0}
diff --git a/libraries/AP_Scripting/applets/MissionSelector.lua b/libraries/AP_Scripting/applets/MissionSelector.lua
index a2dae6dbfd..b20c01835e 100644
--- a/libraries/AP_Scripting/applets/MissionSelector.lua
+++ b/libraries/AP_Scripting/applets/MissionSelector.lua
@@ -2,6 +2,7 @@
 -- Must have Mission Reset switch assigned, it will function normally when armed or disarmed
 -- but also on the disarm to arm transition, it will load (if file exists) a file in the root named
 -- missionH.txt, missionM.txt, or missionH.txt corresponding to the the Mission Reset switch position of High/Mid/Low
+-- luacheck: only 0
 
 local mission_loaded = false
 local rc_switch = rc:find_channel_for_option(24)  --AUX FUNC sw for mission restart
diff --git a/libraries/AP_Scripting/applets/Script_Controller.lua b/libraries/AP_Scripting/applets/Script_Controller.lua
index 1218755cf7..6957455ae3 100644
--- a/libraries/AP_Scripting/applets/Script_Controller.lua
+++ b/libraries/AP_Scripting/applets/Script_Controller.lua
@@ -2,6 +2,7 @@
    a script to select other lua scripts using an auxillary switch from
     /1 /2 or /3 subdirectories of the scripts directory
 --]]
+-- luacheck: only 0
 
 local THIS_SCRIPT = "Script_Controller.lua"
 local sel_ch = Parameter("SCR_USER6")
diff --git a/libraries/AP_Scripting/applets/VTOL-quicktune.lua b/libraries/AP_Scripting/applets/VTOL-quicktune.lua
index e07cb848b5..a59d4ba6d0 100644
--- a/libraries/AP_Scripting/applets/VTOL-quicktune.lua
+++ b/libraries/AP_Scripting/applets/VTOL-quicktune.lua
@@ -5,6 +5,8 @@
  for copters, although it will work in other VTOL modes
 
 --]]
+-- luacheck: only 0
+
 
 --[[
  - TODO:
diff --git a/libraries/AP_Scripting/applets/forward_flight_motor_shutdown.lua b/libraries/AP_Scripting/applets/forward_flight_motor_shutdown.lua
index 1b678a02bb..50f856b471 100644
--- a/libraries/AP_Scripting/applets/forward_flight_motor_shutdown.lua
+++ b/libraries/AP_Scripting/applets/forward_flight_motor_shutdown.lua
@@ -4,6 +4,8 @@
 -- Throttle thresholds also allow automatic enable and disable of stop motors
 -- slew up and down times allow to configure how fast the motors are disabled and re-enabled
 
+-- luacheck: only 0
+
 -- Config
 
 -- Motors numbers to stop
diff --git a/libraries/AP_Scripting/applets/plane_package_place.lua b/libraries/AP_Scripting/applets/plane_package_place.lua
index b5d7da1f5a..242435fc7f 100644
--- a/libraries/AP_Scripting/applets/plane_package_place.lua
+++ b/libraries/AP_Scripting/applets/plane_package_place.lua
@@ -1,6 +1,8 @@
 --[[
  support package place for quadplanes
 --]]
+-- luacheck: only 0
+
 
 local PARAM_TABLE_KEY = 9
 local PARAM_TABLE_PREFIX = "PKG_"
diff --git a/libraries/AP_Scripting/applets/plane_ship_landing.lua b/libraries/AP_Scripting/applets/plane_ship_landing.lua
index af5fa85c89..6f9fd1de30 100644
--- a/libraries/AP_Scripting/applets/plane_ship_landing.lua
+++ b/libraries/AP_Scripting/applets/plane_ship_landing.lua
@@ -1,4 +1,5 @@
 -- support takeoff and landing on moving platforms for VTOL planes
+-- luacheck: only 0
 
 local PARAM_TABLE_KEY = 7
 local PARAM_TABLE_PREFIX = "SHIP_"
diff --git a/libraries/AP_Scripting/applets/runcam_on_arm.lua b/libraries/AP_Scripting/applets/runcam_on_arm.lua
index c6934600af..8f99b0a289 100644
--- a/libraries/AP_Scripting/applets/runcam_on_arm.lua
+++ b/libraries/AP_Scripting/applets/runcam_on_arm.lua
@@ -19,6 +19,8 @@
 -- presses, I want the script to be responsive and start recording as
 -- soon as the vehicle arms, so there I use a shorter delay.
 
+-- luacheck: only 0
+
 
 -- constants
 local RC_OPTION = {RunCamControl=78}