Skip to content

Commit

Permalink
Modification for Volanti 4.4
Browse files Browse the repository at this point in the history
SW-61
  • Loading branch information
loki077 committed Apr 8, 2024
1 parent f321017 commit 02da659
Showing 1 changed file with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

local SCRIPT_NAME = 'CX_BIT'
local CX_SANITY_SCRIPT_VERSION = 1.0 -- Script Version
local CX_PILOT_MIN_FW_VERSION = 5.0 -- Minimum Firmware Version Supported e.g CxPilot 5.0.0 should be mentioned as 5.0
local CX_PILOT_MIN_FW_VERSION = 4.4 -- Minimum Firmware Version Supported e.g Volanti 4.4.0 should be mentioned as 4.0


-------- MAVLINK/AUTOPILOT 'CONSTANTS' --------
Expand Down Expand Up @@ -111,7 +111,7 @@ local function pre_arm_check_init()
local version = cx_version:match("(%d+%.%d+)")

-- check if firmware has CxPilot or Volanti or Ottano
if cx_version:find("CxPilot") or cx_version:find("Volanti") or cx_version:find("Ottano") then
if cx_version:find("CxPilot") or cx_version:find("ArduPlane") or cx_version:find("Volanti") or cx_version:find("Ottano") then
version = tonumber(version)
if CX_PILOT_MIN_FW_VERSION > version then
arming:set_aux_auth_failed(auth_id, string.format('%s Requires: %.1f. Found Version: %s', SCRIPT_NAME, CX_PILOT_MIN_FW_VERSION, version))
Expand Down Expand Up @@ -194,16 +194,15 @@ local last_fail_msg_time = 0
local telem_failure = false

local function during_arm_check_loop()
--check ESC Telemetry is done in pre_arm_check_loop
vtol_failure_check()
if arming:is_armed() then
--check ESC Telemetry is done in pre_arm_check_loop
vtol_failure_check()
end
end

local function update()
pre_arm_check_loop()

if arming:is_armed() then
during_arm_check_loop()
end
during_arm_check_loop()
end

-- wrapper around update(). This calls update() and if update faults
Expand Down

0 comments on commit 02da659

Please sign in to comment.