mirror of
https://github.com/cjfranko/NTP-Timeturner.git
synced 2025-11-09 02:42:02 +00:00
feat: Integrate statime for PTP time sync
Co-authored-by: aider (gemini/gemini-2.5-pro-preview-05-06) <aider@aider.chat>
This commit is contained in:
parent
41ae37b6b7
commit
78ea1aefed
7 changed files with 200 additions and 40 deletions
|
|
@ -45,6 +45,9 @@ pub struct LtcState {
|
|||
pub offset_history: VecDeque<i64>,
|
||||
pub last_match_status: String,
|
||||
pub last_match_check: i64,
|
||||
// PTP state
|
||||
pub ptp_offset: Option<f64>,
|
||||
pub ptp_state: String,
|
||||
}
|
||||
|
||||
impl LtcState {
|
||||
|
|
@ -56,6 +59,8 @@ impl LtcState {
|
|||
offset_history: VecDeque::with_capacity(20),
|
||||
last_match_status: "UNKNOWN".into(),
|
||||
last_match_check: 0,
|
||||
ptp_offset: None,
|
||||
ptp_state: "Initializing".into(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue