mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
EPLRS - give group ID only if ground
This commit is contained in:
parent
cd178d6a8c
commit
90096163ee
@ -899,10 +899,14 @@ function CONTROLLABLE:CommandEPLRS( SwitchOnOff, Delay )
|
|||||||
id = 'EPLRS',
|
id = 'EPLRS',
|
||||||
params = {
|
params = {
|
||||||
value = SwitchOnOff,
|
value = SwitchOnOff,
|
||||||
groupId = self:GetID(),
|
groupId = nil,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if self:IsGround() then
|
||||||
|
CommandEPLRS.params.groupId = self:GetID()
|
||||||
|
end
|
||||||
|
|
||||||
if Delay and Delay > 0 then
|
if Delay and Delay > 0 then
|
||||||
SCHEDULER:New( nil, self.CommandEPLRS, { self, SwitchOnOff }, Delay )
|
SCHEDULER:New( nil, self.CommandEPLRS, { self, SwitchOnOff }, Delay )
|
||||||
else
|
else
|
||||||
@ -1006,9 +1010,12 @@ function CONTROLLABLE:TaskEPLRS( SwitchOnOff, idx )
|
|||||||
id = 'EPLRS',
|
id = 'EPLRS',
|
||||||
params = {
|
params = {
|
||||||
value = SwitchOnOff,
|
value = SwitchOnOff,
|
||||||
groupId = self:GetID(),
|
groupId = nil,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
if self:IsGround() then
|
||||||
|
CommandEPLRS.params.groupId = self:GetID()
|
||||||
|
end
|
||||||
|
|
||||||
return self:TaskWrappedAction( CommandEPLRS, idx or 1 )
|
return self:TaskWrappedAction( CommandEPLRS, idx or 1 )
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user