Skip to content

Commit

Permalink
[mock_uss/flight_planning] Fix op intent state comparison in get_down…
Browse files Browse the repository at this point in the history
…_uss_op_intent (#349)
  • Loading branch information
mickmis authored Nov 16, 2023
1 parent eee6846 commit 05bdd30
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions monitoring/mock_uss/f3548v21/flight_planning.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ def get_down_uss_op_intent(
between the flight to be planned and the conflicting operational intent.
"""
# USS is declared as down and does not answer for details : minimum - 1
if op_intent_ref == f3548_v21.OperationalIntentState.Accepted:
if op_intent_ref.state == f3548_v21.OperationalIntentState.Accepted:
return f3548_v21.OperationalIntent(
reference=op_intent_ref,
details=f3548_v21.OperationalIntentDetails(
Expand All @@ -367,7 +367,7 @@ def get_down_uss_op_intent(
),
)

elif op_intent_ref == f3548_v21.OperationalIntentState.Activated:
elif op_intent_ref.state == f3548_v21.OperationalIntentState.Activated:
return f3548_v21.OperationalIntent(
reference=op_intent_ref,
details=f3548_v21.OperationalIntentDetails(
Expand All @@ -377,8 +377,8 @@ def get_down_uss_op_intent(
)

elif (
op_intent_ref == f3548_v21.OperationalIntentState.Contingent
or op_intent_ref == f3548_v21.OperationalIntentState.Nonconforming
op_intent_ref.state == f3548_v21.OperationalIntentState.Contingent
or op_intent_ref.state == f3548_v21.OperationalIntentState.Nonconforming
):
return f3548_v21.OperationalIntent(
reference=op_intent_ref,
Expand Down

0 comments on commit 05bdd30

Please sign in to comment.