mirror of
https://github.com/cjfranko/NTP-Timeturner.git
synced 2025-11-08 18:32:02 +00:00
feat: Allow millisecond offset for timeturner
Co-authored-by: aider (gemini/gemini-2.5-pro-preview-05-06) <aider@aider.chat>
This commit is contained in:
parent
a12ee88b9b
commit
c712014bb9
6 changed files with 25 additions and 8 deletions
|
|
@ -50,7 +50,7 @@
|
|||
<input type="number" id="hw-offset" name="hw-offset">
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label>Timeturner Offset:, HH:MM:SS:f</label>
|
||||
<label>Timeturner Offset: HH:MM:SS:f.ms</label>
|
||||
<input type="number" id="offset-h" placeholder="H">
|
||||
<label>:</label>
|
||||
<input type="number" id="offset-m" placeholder="M">
|
||||
|
|
@ -58,6 +58,8 @@
|
|||
<input type="number" id="offset-s" placeholder="S">
|
||||
<label>.</label>
|
||||
<input type="number" id="offset-f" placeholder="F">
|
||||
<label>.</label>
|
||||
<input type="number" id="offset-ms" placeholder="ms">
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<button id="save-config">Save Config</button>
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
m: document.getElementById('offset-m'),
|
||||
s: document.getElementById('offset-s'),
|
||||
f: document.getElementById('offset-f'),
|
||||
ms: document.getElementById('offset-ms'),
|
||||
};
|
||||
const saveConfigButton = document.getElementById('save-config');
|
||||
const manualSyncButton = document.getElementById('manual-sync');
|
||||
|
|
@ -84,6 +85,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
offsetInputs.m.value = data.timeturnerOffset.minutes;
|
||||
offsetInputs.s.value = data.timeturnerOffset.seconds;
|
||||
offsetInputs.f.value = data.timeturnerOffset.frames;
|
||||
offsetInputs.ms.value = data.timeturnerOffset.milliseconds || 0;
|
||||
nudgeValueInput.value = data.defaultNudgeMs;
|
||||
} catch (error) {
|
||||
console.error('Error fetching config:', error);
|
||||
|
|
@ -99,6 +101,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
minutes: parseInt(offsetInputs.m.value, 10) || 0,
|
||||
seconds: parseInt(offsetInputs.s.value, 10) || 0,
|
||||
frames: parseInt(offsetInputs.f.value, 10) || 0,
|
||||
milliseconds: parseInt(offsetInputs.ms.value, 10) || 0,
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue