From ca8082eaf78d16fbc26f5f060c19e7edaeea7a93 Mon Sep 17 00:00:00 2001 From: Wesley Maa Date: Mon, 25 Nov 2024 13:57:01 -0800 Subject: [PATCH] fix deserialize --- kos_core/src/services/krec_logger.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kos_core/src/services/krec_logger.rs b/kos_core/src/services/krec_logger.rs index db18979..0956cd0 100644 --- a/kos_core/src/services/krec_logger.rs +++ b/kos_core/src/services/krec_logger.rs @@ -176,6 +176,9 @@ impl TelemetryLogger { match serde_json::from_slice::(&payload) { Ok(command_data) => { frame.inference_step = command_data.inference_step; + frame.video_timestamp = command_data.video_timestamp; + frame.frame_number = command_data.frame_number; + for item in command_data.data { frame.actuator_commands.push(ActuatorCommand { actuator_id: item.actuator_id, @@ -197,6 +200,7 @@ impl TelemetryLogger { if frame.inference_step > *current { // Add frame to KRec let mut krec = krec_clone.lock().await; + krec.add_frame(frame.clone()); // Save every 500 frames