Stop scan planner plots erroring if there are no secondary locations

This commit is contained in:
Julian Stirling 2025-11-28 10:13:19 +00:00
parent 90be139575
commit dfe7fb6c42
2 changed files with 5 additions and 2 deletions

View file

@ -504,7 +504,7 @@ class SmartSpiral(ScanPlanner):
"""Sort the remaining positions based on the current location."""
# Defined rather than use a lambda for readability
def sort_key(pos: FutureScanLocation) -> tuple[float, float, float]:
def sort_key(pos: FutureScanLocation) -> tuple[bool, float, float, float]:
return (
self._is_primary_location(pos), # False sorts low
self.moves_between(current_pos, pos),