mirror of
https://github.com/cjfranko/NTP-Timeturner.git
synced 2025-11-08 18:32:02 +00:00
fix: Do not pause auto-sync with active timeturner
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
parent
d99b57a98a
commit
4cdead5aa4
2 changed files with 1 additions and 6 deletions
|
|
@ -65,9 +65,6 @@ impl Config {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn is_auto_sync_paused(&self) -> bool {
|
|
||||||
self.timeturner_offset.is_active()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for Config {
|
impl Default for Config {
|
||||||
|
|
|
||||||
|
|
@ -248,9 +248,7 @@ async fn main() {
|
||||||
let state = sync_state.lock().unwrap();
|
let state = sync_state.lock().unwrap();
|
||||||
let config = sync_config.lock().unwrap();
|
let config = sync_config.lock().unwrap();
|
||||||
|
|
||||||
if config.is_auto_sync_paused() {
|
if config.auto_sync_enabled && state.latest.is_some() {
|
||||||
log::info!("Auto-sync is temporarily paused.");
|
|
||||||
} else if config.auto_sync_enabled && state.latest.is_some() {
|
|
||||||
let delta = state.get_ewma_clock_delta();
|
let delta = state.get_ewma_clock_delta();
|
||||||
let frame = state.latest.as_ref().unwrap();
|
let frame = state.latest.as_ref().unwrap();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue