From 51a0242ad14cc8ebb60744da2a05a63ce17509bc Mon Sep 17 00:00:00 2001 From: Kenneth Yang Date: Wed, 24 Jul 2024 13:45:06 -0700 Subject: [PATCH] Move log to EndMovement function (is also called on error) --- .../InsertionSelectionPanelHandler.cs | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/Assets/Scripts/Pinpoint/UI/EphysCopilot/InsertionSelectionPanelHandler.cs b/Assets/Scripts/Pinpoint/UI/EphysCopilot/InsertionSelectionPanelHandler.cs index 76bfeaf4..392c1e26 100644 --- a/Assets/Scripts/Pinpoint/UI/EphysCopilot/InsertionSelectionPanelHandler.cs +++ b/Assets/Scripts/Pinpoint/UI/EphysCopilot/InsertionSelectionPanelHandler.cs @@ -538,20 +538,6 @@ private void MoveToTargetInsertion() // Complete movement EndMovement(); _moveButton.interactable = false; - - // Log movement finish. - OutputLog.Log( - new[] - { - "Copilot", - DateTime.Now.ToString(CultureInfo.InvariantCulture), - "MoveToTargetInsertion", - ProbeManager - .ManipulatorBehaviorController - .ManipulatorID, - "Finish" - } - ); }, error => { @@ -579,6 +565,18 @@ void EndMovement() { _isMoving = false; _moveButtonText.text = MOVE_TO_TARGET_INSERTION_STR; + + // Log movement finish. + OutputLog.Log( + new[] + { + "Copilot", + DateTime.Now.ToString(CultureInfo.InvariantCulture), + "MoveToTargetInsertion", + ProbeManager.ManipulatorBehaviorController.ManipulatorID, + "Finish" + } + ); } }