diff --git a/src/isar/script.py b/src/isar/script.py index e8521b2a..ec023c86 100644 --- a/src/isar/script.py +++ b/src/isar/script.py @@ -109,10 +109,10 @@ def start(): if settings.UPLOAD_INSPECTIONS_ASYNC: - def inspections_callback(inspection: Inspection): + def inspections_callback(inspection: Inspection, mission: Mission): message: Tuple[Inspection, Mission] = ( inspection, - state_machine.current_mission, + mission, ) state_machine.queues.upload_queue.put(message) diff --git a/src/robot_interface/robot_interface.py b/src/robot_interface/robot_interface.py index 4f42bbf6..f10083ba 100644 --- a/src/robot_interface/robot_interface.py +++ b/src/robot_interface/robot_interface.py @@ -182,14 +182,14 @@ def get_inspection(self, task: InspectionTask) -> Inspection: @abstractmethod def register_inspection_callback( - self, callback_function: Callable[[Inspection], None] + self, callback_function: Callable[[Inspection, Mission], None] ) -> None: """Register a function which should be run when inspection data is received asynchronously. This function should expect to receive an Inspection from. Parameters ---------- - callback_function : Callable[[Inspection] + callback_function : Callable[[Inspection, Mission], None] Returns ------- diff --git a/tests/mocks/robot_interface.py b/tests/mocks/robot_interface.py index de6f0dd2..10dd5811 100644 --- a/tests/mocks/robot_interface.py +++ b/tests/mocks/robot_interface.py @@ -63,7 +63,7 @@ def get_inspection(self, task: InspectionTask) -> Inspection: return image def register_inspection_callback( - self, callback_function: Callable[[Inspection], None] + self, callback_function: Callable[[Inspection, Mission], None] ) -> None: return