[fix](trx-frontend): rework cw auto and tone picker behavior
Co-authored-by: OpenAI Codex <codex@openai.com> Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
@@ -2302,10 +2302,20 @@ function render(update) {
|
||||
if (cwToneEl && typeof update.cw_tone_hz === "number") {
|
||||
cwToneEl.value = update.cw_tone_hz;
|
||||
}
|
||||
if (cwWpmEl && typeof update.cw_auto === "boolean") {
|
||||
if ((cwWpmEl || cwToneEl) && typeof update.cw_auto === "boolean") {
|
||||
const disabled = update.cw_auto;
|
||||
cwWpmEl.disabled = disabled;
|
||||
cwWpmEl.readOnly = disabled;
|
||||
if (typeof window.applyCwAutoUi === "function") {
|
||||
window.applyCwAutoUi(disabled);
|
||||
} else {
|
||||
if (cwWpmEl) {
|
||||
cwWpmEl.disabled = disabled;
|
||||
cwWpmEl.readOnly = disabled;
|
||||
}
|
||||
if (cwToneEl) {
|
||||
cwToneEl.disabled = disabled;
|
||||
cwToneEl.readOnly = disabled;
|
||||
}
|
||||
}
|
||||
}
|
||||
let activeFreqColor = "var(--accent-green)";
|
||||
if (update.status && update.status.vfo && Array.isArray(update.status.vfo.entries)) {
|
||||
|
||||
Reference in New Issue
Block a user