mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
#PLAYERTASK
* Fix to avoid double failed messages
This commit is contained in:
parent
14e8b2ef17
commit
ae5fd91cd4
@ -79,7 +79,7 @@ PLAYERTASK = {
|
|||||||
|
|
||||||
--- PLAYERTASK class version.
|
--- PLAYERTASK class version.
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
PLAYERTASK.version="0.0.9"
|
PLAYERTASK.version="0.1.0"
|
||||||
|
|
||||||
--- Generic task condition.
|
--- Generic task condition.
|
||||||
-- @type PLAYERTASK.Condition
|
-- @type PLAYERTASK.Condition
|
||||||
@ -147,7 +147,7 @@ function PLAYERTASK:New(Type, Target, Repeat, Times, TTSType)
|
|||||||
self:AddTransition("*", "Cancel", "Done") -- Command to cancel the Task.
|
self:AddTransition("*", "Cancel", "Done") -- Command to cancel the Task.
|
||||||
self:AddTransition("*", "Success", "Done")
|
self:AddTransition("*", "Success", "Done")
|
||||||
self:AddTransition("*", "ClientAborted", "*")
|
self:AddTransition("*", "ClientAborted", "*")
|
||||||
self:AddTransition("*", "Failed", "*") -- Done or repeat --> PLANNED
|
self:AddTransition("*", "Failed", "Failed") -- Done or repeat --> PLANNED
|
||||||
self:AddTransition("*", "Status", "*")
|
self:AddTransition("*", "Status", "*")
|
||||||
self:AddTransition("*", "Stop", "Stopped")
|
self:AddTransition("*", "Stop", "Stopped")
|
||||||
|
|
||||||
@ -505,7 +505,7 @@ function PLAYERTASK:onafterStatus(From, Event, To)
|
|||||||
-- Any failure condition true?
|
-- Any failure condition true?
|
||||||
local failureCondition=self:_EvalConditionsAny(self.conditionFailure)
|
local failureCondition=self:_EvalConditionsAny(self.conditionFailure)
|
||||||
|
|
||||||
if failureCondition then
|
if failureCondition and status ~= "Failed" then
|
||||||
self:__Failed(-2)
|
self:__Failed(-2)
|
||||||
status = "Failed"
|
status = "Failed"
|
||||||
elseif successCondition then
|
elseif successCondition then
|
||||||
@ -875,9 +875,9 @@ do
|
|||||||
-- PILOTSTTS = ". Pilot(s): ",
|
-- PILOTSTTS = ". Pilot(s): ",
|
||||||
-- YES = "Yes",
|
-- YES = "Yes",
|
||||||
-- NO = "No",
|
-- NO = "No",
|
||||||
-- POINTEROVERTARGET = "%s, %s, pointer over target for task %03d, lasing!",
|
-- POINTEROVERTARGET = "%s, %s, pointer in reach for task %03d, lasing!",
|
||||||
-- POINTERTARGETREPORT = "\nPointer over target: %s\nLasing: %s",
|
-- POINTERTARGETREPORT = "\nPointer in reach: %s\nLasing: %s",
|
||||||
-- POINTERTARGETLASINGTTS = ". Pointer over target and lasing.",
|
-- POINTERTARGETLASINGTTS = ". Pointer in reach and lasing.",
|
||||||
-- },
|
-- },
|
||||||
--
|
--
|
||||||
-- e.g.
|
-- e.g.
|
||||||
@ -1067,9 +1067,9 @@ PLAYERTASKCONTROLLER.Messages = {
|
|||||||
PILOTSTTS = ". Pilot(s): ",
|
PILOTSTTS = ". Pilot(s): ",
|
||||||
YES = "Yes",
|
YES = "Yes",
|
||||||
NO = "No",
|
NO = "No",
|
||||||
POINTEROVERTARGET = "%s, %s, pointer over target for task %03d, lasing!",
|
POINTEROVERTARGET = "%s, %s, pointer in reach for task %03d, lasing!",
|
||||||
POINTERTARGETREPORT = "\nPointer over target: %s\nLasing: %s",
|
POINTERTARGETREPORT = "\nPointer in reach: %s\nLasing: %s",
|
||||||
POINTERTARGETLASINGTTS = ". Pointer over target and lasing.",
|
POINTERTARGETLASINGTTS = ". Pointer in reach and lasing.",
|
||||||
},
|
},
|
||||||
DE = {
|
DE = {
|
||||||
TASKABORT = "Auftrag abgebrochen!",
|
TASKABORT = "Auftrag abgebrochen!",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user