mirror of
https://github.com/cjfranko/NTP-Timeturner.git
synced 2025-11-08 10:22:02 +00:00
Merge pull request #28 from cjfranko/build_fix_error
Some checks failed
Build for Raspberry Pi / Build for aarch64 (push) Failing after 20s
Some checks failed
Build for Raspberry Pi / Build for aarch64 (push) Failing after 20s
fix build on native
This commit is contained in:
commit
bda4d4e6f5
3 changed files with 5 additions and 4 deletions
|
|
@ -60,6 +60,7 @@ mod tests {
|
|||
use super::*;
|
||||
use std::sync::mpsc;
|
||||
use crate::sync_logic::LtcState;
|
||||
use num_rational::Ratio;
|
||||
use regex::Regex;
|
||||
|
||||
fn get_ltc_regex() -> Regex {
|
||||
|
|
@ -119,7 +120,7 @@ mod tests {
|
|||
assert_eq!(st.free_count, 1);
|
||||
let received_frame = rx.try_recv().unwrap();
|
||||
assert_eq!(received_frame.status, "FREE");
|
||||
assert_eq!(received_frame.frame_rate, 29.97);
|
||||
assert_eq!(received_frame.frame_rate, Ratio::new(30000, 1001));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
|||
|
|
@ -173,9 +173,9 @@ impl LtcState {
|
|||
pub fn get_sync_status(delta_ms: i64, config: &Config) -> &'static str {
|
||||
if config.timeturner_offset.is_active() {
|
||||
"TIMETURNING"
|
||||
} else if delta_ms.abs() <= 1 {
|
||||
} else if delta_ms.abs() <= 8 {
|
||||
"IN SYNC"
|
||||
} else if delta_ms > 2 {
|
||||
} else if delta_ms > 10 {
|
||||
"CLOCK AHEAD"
|
||||
} else {
|
||||
"CLOCK BEHIND"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use crate::config::Config;
|
||||
use crate::sync_logic::LtcFrame;
|
||||
use chrono::{DateTime, Duration as ChronoDuration, Local, NaiveTime, TimeZone};
|
||||
use chrono::{DateTime, Duration as ChronoDuration, Local, TimeZone};
|
||||
use num_rational::Ratio;
|
||||
use std::process::Command;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue