mirror of
https://github.com/cjfranko/NTP-Timeturner.git
synced 2025-11-08 18:32:02 +00:00
Merge pull request #29 from cjfranko/non-fractional-mismatch-tc
fixed some sync issues, fractional still an issue at 29.97 NDF Drift issues with all fractionals, 29.97NDF has a system clock sync issue
This commit is contained in:
commit
69569c0a01
28 changed files with 141 additions and 42 deletions
|
|
@ -24,6 +24,7 @@ pub struct LtcFrame {
|
|||
pub minutes: u32,
|
||||
pub seconds: u32,
|
||||
pub frames: u32,
|
||||
pub is_drop_frame: bool,
|
||||
pub frame_rate: Ratio<i64>,
|
||||
pub timestamp: DateTime<Utc>, // arrival stamp
|
||||
}
|
||||
|
|
@ -35,8 +36,9 @@ impl LtcFrame {
|
|||
hours: caps[2].parse().ok()?,
|
||||
minutes: caps[3].parse().ok()?,
|
||||
seconds: caps[4].parse().ok()?,
|
||||
frames: caps[5].parse().ok()?,
|
||||
frame_rate: get_frame_rate_ratio(&caps[6])?,
|
||||
is_drop_frame: &caps[5] == ";",
|
||||
frames: caps[6].parse().ok()?,
|
||||
frame_rate: get_frame_rate_ratio(&caps[7])?,
|
||||
timestamp,
|
||||
})
|
||||
}
|
||||
|
|
@ -205,6 +207,7 @@ mod tests {
|
|||
minutes: m,
|
||||
seconds: s,
|
||||
frames: 0,
|
||||
is_drop_frame: false,
|
||||
frame_rate: Ratio::new(25, 1),
|
||||
timestamp: Utc::now(),
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue