Skip to content

Commit

Permalink
fix: trust the timestamp got
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeromos Kovács committed Jan 26, 2025
1 parent 2ba7ed2 commit 6f5c2e7
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/fit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ impl Fit {
wp
}
/// Called for each record message as it is being processed.
// TODO: don't panic
fn callback(
timestamp: u32,
global_message_num: u16,
Expand All @@ -134,11 +133,7 @@ impl Fit {
if global_message_num == fit_file::GLOBAL_MSG_NUM_RECORD {
let mut msg = FitRecordMsg::new(fields);

if let Some(ts) = msg.timestamp {
assert_eq!(timestamp, ts);
} else {
msg.timestamp = Some(timestamp);
}
msg.timestamp = Some(timestamp);

let wp = Self::frm_to_gwp(msg);
data.track_segment.points.push(wp);
Expand Down

0 comments on commit 6f5c2e7

Please sign in to comment.