From 7bcd35854bf18831437830e5ad0feede4a0a2f11 Mon Sep 17 00:00:00 2001 From: dutchie031 Date: Tue, 18 Aug 2026 20:19:33 +0200 Subject: [PATCH 1/2] Updated max distance to be configurable --- config.lua | 5 +++++ src/classes/configuration/CapConfig.lua | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/config.lua b/config.lua index cc7da67..db4f7aa 100644 --- a/config.lua +++ b/config.lua @@ -29,6 +29,11 @@ SpearheadConfig = { -- unit: feet maxAlt = 28000, -- default 28000 + --The "maxDistance" that's set on the CAP tasking for the aircraft to commit to a target. + --This is the distance from the aircraft to the target that the aircraft will commit to engaging + --This is shared for CAP, Intercept and Sweep missions for now. + maxCommitRange = 35, -- default 35 + -- DELAYS. -- Delays work as follow. -- When an aircraft lands alive and well it will be rearmed and ready to go. diff --git a/src/classes/configuration/CapConfig.lua b/src/classes/configuration/CapConfig.lua index 076cbe9..cd81a3f 100644 --- a/src/classes/configuration/CapConfig.lua +++ b/src/classes/configuration/CapConfig.lua @@ -34,7 +34,7 @@ function CapConfig.new() self._minDurationOnStation = 1200 self._maxDurationOnStation = 2700 - self._maxDeviationRange = 35 * 1852 -- in meters + self._maxDeviationRange = (tonumber(SpearheadConfig.CapConfig.maxCommitRange) or 35) * 1852 -- in meters self._rearmDelay = tonumber(SpearheadConfig.CapConfig.rearmDelay) or 600 self._repairDelay = tonumber(SpearheadConfig.CapConfig.repairDelay) or 600 self._deathDelay = tonumber(SpearheadConfig.CapConfig.deathDelay) or 1800 -- 2.54.0 From e067845bc879f1e5295d33f48dfa4f99172b417b Mon Sep 17 00:00:00 2001 From: dutchie031 Date: Tue, 18 Aug 2026 20:22:35 +0200 Subject: [PATCH 2/2] updated release notes --- RELEASENOTES.md | 4 ++++ config.lua | 1 + 2 files changed, 5 insertions(+) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 1ed1885..f8860f7 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -24,6 +24,10 @@ PR #28 - Fixed Pre-Activated stages not always drawing or pre-activating correctly. PR #28 +- Addressed #24 + CAP max commit range is now configurable in the config.lua file. + Issue remains open in order to apply further fine grained tuning. + PR #29 ## [0.12.0] 2026-06 diff --git a/config.lua b/config.lua index db4f7aa..6dad272 100644 --- a/config.lua +++ b/config.lua @@ -32,6 +32,7 @@ SpearheadConfig = { --The "maxDistance" that's set on the CAP tasking for the aircraft to commit to a target. --This is the distance from the aircraft to the target that the aircraft will commit to engaging --This is shared for CAP, Intercept and Sweep missions for now. + -- unit: nautical miles maxCommitRange = 35, -- default 35 -- DELAYS. -- 2.54.0