From 8be5f146c01b7aad5e2d4c89c4be51e11508cc82 Mon Sep 17 00:00:00 2001 From: rclarke0 Date: Fri, 31 May 2024 14:52:25 -0400 Subject: [PATCH] fixed temp mod total time error --- abr-testing/abr_testing/data_collection/read_robot_logs.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/abr-testing/abr_testing/data_collection/read_robot_logs.py b/abr-testing/abr_testing/data_collection/read_robot_logs.py index d18751c52c7..a41688ac8fa 100644 --- a/abr-testing/abr_testing/data_collection/read_robot_logs.py +++ b/abr-testing/abr_testing/data_collection/read_robot_logs.py @@ -216,10 +216,16 @@ def temperature_module_commands(file_results: Dict[str, Any]) -> Dict[str, Any]: for command in commandData: commandType = command["commandType"] if commandType == "temperatureModule/setTargetTemperature": + temp_time = datetime.strptime( + command.get("completedAt", ""), "%Y-%m-%dT%H:%M:%S.%f%z" + ) tm_temp = command["params"]["celsius"] tm_temp_change += 1 if commandType == "temperatureModule/waitForTemperature" and int(tm_temp) == 4: time_to_4c = command_time(command) + temp_time = datetime.strptime( + command.get("completedAt", ""), "%Y-%m-%dT%H:%M:%S.%f%z" + ) if commandType == "temperatureModule/deactivate": deactivate_time = datetime.strptime( command.get("completedAt", ""), "%Y-%m-%dT%H:%M:%S.%f%z"