[fix](trx-backend-soapysdr,trx-frontend-http): preserve raw rds ps text
Co-authored-by: Codex <codex@openai.com> Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
@@ -3182,10 +3182,9 @@ function clearSpectrumCanvas() {
|
||||
}
|
||||
|
||||
function formatOverlayPs(ps) {
|
||||
const padded = String(ps ?? "")
|
||||
return String(ps ?? "")
|
||||
.slice(0, 8)
|
||||
.padEnd(8, " ");
|
||||
return padded.replaceAll(" ", "_");
|
||||
.padEnd(8, "_");
|
||||
}
|
||||
|
||||
function formatOverlayPi(pi) {
|
||||
@@ -3199,8 +3198,8 @@ function formatOverlayPty(pty) {
|
||||
}
|
||||
|
||||
async function copyRdsPsToClipboard() {
|
||||
const ps = lastSpectrumData?.rds?.program_service?.trim();
|
||||
if (!ps) {
|
||||
const ps = lastSpectrumData?.rds?.program_service;
|
||||
if (!ps || ps.length === 0) {
|
||||
showHint("No RDS PS", 1200);
|
||||
return;
|
||||
}
|
||||
@@ -3223,8 +3222,8 @@ if (rdsPsValueEl) {
|
||||
function updateRdsPsOverlay(rds) {
|
||||
// Overview strip overlay
|
||||
if (rdsPsOverlay) {
|
||||
const ps = rds?.program_service?.trim();
|
||||
if (ps) {
|
||||
const ps = rds?.program_service;
|
||||
if (ps && ps.length > 0) {
|
||||
rdsPsOverlay.innerHTML =
|
||||
`<span class="rds-ps-main">${escapeMapHtml(formatOverlayPs(ps))}</span>` +
|
||||
`<span class="rds-ps-meta">${escapeMapHtml(formatOverlayPi(rds?.pi))} · ${escapeMapHtml(formatOverlayPty(rds?.pty))}</span>`;
|
||||
|
||||
@@ -476,9 +476,6 @@ impl RigCat for SoapySdrRig {
|
||||
.channel_dsps
|
||||
.get(self.primary_channel_idx)
|
||||
.and_then(|dsp| dsp.lock().ok().and_then(|d| d.rds_data()));
|
||||
if let Some(ref r) = rds {
|
||||
tracing::debug!("RDS: pi={:?} ps={:?} pty={:?}({})", r.pi, r.program_service, r.pty, r.pty_name.as_deref().unwrap_or("?"));
|
||||
}
|
||||
Some(SpectrumData {
|
||||
bins,
|
||||
center_hz: self.center_hz.max(0) as u64,
|
||||
|
||||
Reference in New Issue
Block a user