AUTOLASE - observe global _SETTINGS for coordinates

This commit is contained in:
Applevangelist 2022-07-27 19:28:27 +02:00
parent f9ace54fab
commit 88e7b3fb47
2 changed files with 14 additions and 2 deletions

View File

@ -239,6 +239,7 @@ do -- MENU_BASE
function MENU_BASE:GetMenu( MenuText )
return self.Menus[MenuText]
end
--- Sets a menu stamp for later prevention of menu removal.
-- @param #MENU_BASE self
-- @param MenuStamp
@ -276,6 +277,7 @@ do -- MENU_BASE
end
end
do -- MENU_COMMAND_BASE
--- @type MENU_COMMAND_BASE
-- @field #function MenuCallHandler
@ -813,6 +815,7 @@ do
end
end
--- Refreshes a new radio item for a group and submenus
-- @param #MENU_GROUP self
-- @return #MENU_GROUP

View File

@ -109,7 +109,7 @@ AUTOLASE = {
--- AUTOLASE class version.
-- @field #string version
AUTOLASE.version = "0.0.11"
AUTOLASE.version = "0.0.12"
-------------------------------------------------------------------
-- Begin Functional.Autolase.lua
@ -832,7 +832,16 @@ function AUTOLASE:onafterMonitor(From, Event, To)
local code = self:GetLaserCode(reccename)
local spot = SPOT:New(recce)
spot:LaseOn(unit,code,self.LaseDuration)
local locationstring = unit:GetCoordinate():ToStringLLDDM()
local locationstring = unit:GetCoordinate():ToStringLLDDM()
if _SETTINGS:IsA2G_MGRS() then
local precision = _SETTINGS:GetMGRS_Accuracy()
local settings = {}
settings.MGRS_Accuracy = precision
locationstring = unit:GetCoordinate():ToStringMGRS(settings)
elseif _SETTINGS:IsA2G_LL_DMS() then
locationstring = unit:GetCoordinate():ToStringLLDMS()
end
local laserspot = { -- #AUTOLASE.LaserSpot
laserspot = spot,
lasedunit = unit,