From e45d22ad35eaf517fc39e1f0cebd78cf6eff517e Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Thu, 31 Oct 2024 16:05:03 +0100 Subject: [PATCH] xx --- .../Moose/Wrapper/Controllable.lua | 21 ++++++++++--------- Moose Development/Moose/Wrapper/Group.lua | 14 ++++++------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/Moose Development/Moose/Wrapper/Controllable.lua b/Moose Development/Moose/Wrapper/Controllable.lua index 9ee8844be..d298cece5 100644 --- a/Moose Development/Moose/Wrapper/Controllable.lua +++ b/Moose Development/Moose/Wrapper/Controllable.lua @@ -899,13 +899,13 @@ function CONTROLLABLE:CommandEPLRS( SwitchOnOff, Delay ) id = 'EPLRS', params = { value = SwitchOnOff, - groupId = nil, + groupId = self:GetID(), }, } - if self:IsGround() then - CommandEPLRS.params.groupId = self:GetID() - end + --if self:IsGround() then + --CommandEPLRS.params.groupId = self:GetID() + --end if Delay and Delay > 0 then SCHEDULER:New( nil, self.CommandEPLRS, { self, SwitchOnOff }, Delay ) @@ -941,7 +941,7 @@ function CONTROLLABLE:CommandSetUnlimitedFuel(OnOff, Delay) end ---- Set radio frequency. See [DCS command EPLRS](https://wiki.hoggitworld.com/view/DCS_command_setFrequency) +--- Set radio frequency. See [DCS command SetFrequency](https://wiki.hoggitworld.com/view/DCS_command_setFrequency) -- @param #CONTROLLABLE self -- @param #number Frequency Radio frequency in MHz. -- @param #number Modulation Radio modulation. Default `radio.modulation.AM`. @@ -968,7 +968,7 @@ function CONTROLLABLE:CommandSetFrequency( Frequency, Modulation, Power, Delay ) return self end ---- [AIR] Set radio frequency. See [DCS command EPLRS](https://wiki.hoggitworld.com/view/DCS_command_setFrequencyForUnit) +--- [AIR] Set radio frequency. See [DCS command SetFrequencyForUnit](https://wiki.hoggitworld.com/view/DCS_command_setFrequencyForUnit) -- @param #CONTROLLABLE self -- @param #number Frequency Radio frequency in MHz. -- @param #number Modulation Radio modulation. Default `radio.modulation.AM`. @@ -1010,12 +1010,13 @@ function CONTROLLABLE:TaskEPLRS( SwitchOnOff, idx ) id = 'EPLRS', params = { value = SwitchOnOff, - groupId = nil, + groupId = self:GetID(), }, } - if self:IsGround() then - CommandEPLRS.params.groupId = self:GetID() - end + + --if self:IsGround() then + --CommandEPLRS.params.groupId = self:GetID() + --end return self:TaskWrappedAction( CommandEPLRS, idx or 1 ) end diff --git a/Moose Development/Moose/Wrapper/Group.lua b/Moose Development/Moose/Wrapper/Group.lua index bd4170a3e..bb0bf80f1 100644 --- a/Moose Development/Moose/Wrapper/Group.lua +++ b/Moose Development/Moose/Wrapper/Group.lua @@ -360,7 +360,7 @@ end -- @return DCS#Group The DCS Group. function GROUP:GetDCSObject() - if (not self.LastCallDCSObject) or (self.LastCallDCSObject and timer.getTime() - self.LastCallDCSObject > 1) then + --if (not self.LastCallDCSObject) or (self.LastCallDCSObject and timer.getTime() - self.LastCallDCSObject > 1) then -- Get DCS group. local DCSGroup = Group.getByName( self.GroupName ) @@ -369,14 +369,14 @@ function GROUP:GetDCSObject() self.LastCallDCSObject = timer.getTime() self.DCSObject = DCSGroup return DCSGroup - else - self.DCSObject = nil - self.LastCallDCSObject = nil + -- else + -- self.DCSObject = nil + -- self.LastCallDCSObject = nil end - else - return self.DCSObject - end + --else + --return self.DCSObject + --end --self:E(string.format("ERROR: Could not get DCS group object of group %s because DCS object could not be found!", tostring(self.GroupName))) return nil