refactor: convert scheduler to typed module

This commit is contained in:
sjg
2026-08-01 13:23:30 +02:00
parent c7994347e9
commit 0338c8b8d2
11 changed files with 1747 additions and 1533 deletions
@@ -24,8 +24,9 @@
centerHz: document.getElementById("scheduler-sat-center-hz")
};
let editIdx = null;
let eventsWired = false;
function getBridge() {
return satSchedulerWindow.schedulerBridge ?? null;
return satSchedulerWindow.trx?.modules?.scheduler ?? null;
}
function getConfig() {
const b = getBridge();
@@ -230,6 +231,8 @@
if (dom.norad) dom.norad.value = parts[1] || "";
}
function wireEvents() {
if (eventsWired) return;
eventsWired = true;
if (dom.enabled) {
const enabledInput = dom.enabled;
dom.enabled.addEventListener("change", function() {
@@ -255,5 +258,9 @@
renderPassStatus,
collectSatelliteConfig
};
if (getBridge()) {
wireEvents();
renderSection();
}
})();
})();