Skip to content

Commit

Permalink
fix deserialize
Browse files Browse the repository at this point in the history
  • Loading branch information
WT-MM committed Nov 25, 2024
1 parent 30ed686 commit ca8082e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kos_core/src/services/krec_logger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,9 @@ impl TelemetryLogger {
match serde_json::from_slice::<ActuatorCommandData>(&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,
Expand All @@ -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
Expand Down

0 comments on commit ca8082e

Please sign in to comment.