[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) {
|
function formatOverlayPs(ps) {
|
||||||
const padded = String(ps ?? "")
|
return String(ps ?? "")
|
||||||
.slice(0, 8)
|
.slice(0, 8)
|
||||||
.padEnd(8, " ");
|
.padEnd(8, "_");
|
||||||
return padded.replaceAll(" ", "_");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatOverlayPi(pi) {
|
function formatOverlayPi(pi) {
|
||||||
@@ -3199,8 +3198,8 @@ function formatOverlayPty(pty) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function copyRdsPsToClipboard() {
|
async function copyRdsPsToClipboard() {
|
||||||
const ps = lastSpectrumData?.rds?.program_service?.trim();
|
const ps = lastSpectrumData?.rds?.program_service;
|
||||||
if (!ps) {
|
if (!ps || ps.length === 0) {
|
||||||
showHint("No RDS PS", 1200);
|
showHint("No RDS PS", 1200);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -3223,8 +3222,8 @@ if (rdsPsValueEl) {
|
|||||||
function updateRdsPsOverlay(rds) {
|
function updateRdsPsOverlay(rds) {
|
||||||
// Overview strip overlay
|
// Overview strip overlay
|
||||||
if (rdsPsOverlay) {
|
if (rdsPsOverlay) {
|
||||||
const ps = rds?.program_service?.trim();
|
const ps = rds?.program_service;
|
||||||
if (ps) {
|
if (ps && ps.length > 0) {
|
||||||
rdsPsOverlay.innerHTML =
|
rdsPsOverlay.innerHTML =
|
||||||
`<span class="rds-ps-main">${escapeMapHtml(formatOverlayPs(ps))}</span>` +
|
`<span class="rds-ps-main">${escapeMapHtml(formatOverlayPs(ps))}</span>` +
|
||||||
`<span class="rds-ps-meta">${escapeMapHtml(formatOverlayPi(rds?.pi))} · ${escapeMapHtml(formatOverlayPty(rds?.pty))}</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
|
.channel_dsps
|
||||||
.get(self.primary_channel_idx)
|
.get(self.primary_channel_idx)
|
||||||
.and_then(|dsp| dsp.lock().ok().and_then(|d| d.rds_data()));
|
.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 {
|
Some(SpectrumData {
|
||||||
bins,
|
bins,
|
||||||
center_hz: self.center_hz.max(0) as u64,
|
center_hz: self.center_hz.max(0) as u64,
|
||||||
|
|||||||
Reference in New Issue
Block a user