diff --git a/src/navigation/context.py b/src/navigation/context.py index 5495efa5d..8a05e3219 100644 --- a/src/navigation/context.py +++ b/src/navigation/context.py @@ -150,7 +150,7 @@ def __init__(self, ctx: Context, min_hits: int = MIN_HITS, max_hits: int = MAX_H def push_frame(self, tags: List[LongRangeTag]) -> None: """ - Loops through our current list of our stored tags and checks if the new message includes each tag or doesn't. + Loops through our current list of our stored tags and checks if the new message includes each tag or doesn't. If it does include it, we will increment our hit count for that tag id and reset the time we saw it. If it does not include it, we will decrement our hit count for that tag id, and if the hit count becomes zero, then we remove it from our stored list. If there are tag ids in the new message that we don't have stored, we will add it to our stored list. diff --git a/src/navigation/navigation.py b/src/navigation/navigation.py index c13662768..a97cb1ec5 100755 --- a/src/navigation/navigation.py +++ b/src/navigation/navigation.py @@ -60,7 +60,9 @@ def __init__(self, context: Context): ], ) self.state_machine.add_transitions(ApproachObjectState(), [DoneState(), SearchState(), RecoveryState()]) - self.state_machine.add_transitions(LongRangeState(), [ApproachPostState(), SearchState(), WaypointState(), RecoveryState()]) + self.state_machine.add_transitions( + LongRangeState(), [ApproachPostState(), SearchState(), WaypointState(), RecoveryState()] + ) self.state_machine.add_transitions(OffState(), [WaypointState(), DoneState()]) self.state_machine.configure_off_switch(OffState(), off_check) self.state_machine_server = StatePublisher(self.state_machine, "nav_structure", 1, "nav_state", 10)