Merge pull request #28 from cjfranko/build_fix_error
Some checks failed
Build for Raspberry Pi / Build for aarch64 (push) Failing after 20s

fix build on native
This commit is contained in:
Chris Frankland-Wright 2025-08-03 13:28:46 +01:00 committed by GitHub
commit bda4d4e6f5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 4 deletions

View file

@ -60,6 +60,7 @@ mod tests {
use super::*; use super::*;
use std::sync::mpsc; use std::sync::mpsc;
use crate::sync_logic::LtcState; use crate::sync_logic::LtcState;
use num_rational::Ratio;
use regex::Regex; use regex::Regex;
fn get_ltc_regex() -> Regex { fn get_ltc_regex() -> Regex {
@ -119,7 +120,7 @@ mod tests {
assert_eq!(st.free_count, 1); assert_eq!(st.free_count, 1);
let received_frame = rx.try_recv().unwrap(); let received_frame = rx.try_recv().unwrap();
assert_eq!(received_frame.status, "FREE"); 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] #[test]

View file

@ -173,9 +173,9 @@ impl LtcState {
pub fn get_sync_status(delta_ms: i64, config: &Config) -> &'static str { pub fn get_sync_status(delta_ms: i64, config: &Config) -> &'static str {
if config.timeturner_offset.is_active() { if config.timeturner_offset.is_active() {
"TIMETURNING" "TIMETURNING"
} else if delta_ms.abs() <= 1 { } else if delta_ms.abs() <= 8 {
"IN SYNC" "IN SYNC"
} else if delta_ms > 2 { } else if delta_ms > 10 {
"CLOCK AHEAD" "CLOCK AHEAD"
} else { } else {
"CLOCK BEHIND" "CLOCK BEHIND"

View file

@ -1,6 +1,6 @@
use crate::config::Config; use crate::config::Config;
use crate::sync_logic::LtcFrame; 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 num_rational::Ratio;
use std::process::Command; use std::process::Command;