v0.19.0 - minimate compatability + family separation #22
+18
-4
@@ -2392,6 +2392,11 @@ async function loadHistory() {
|
|||||||
<td class="td-dim">${(() => {
|
<td class="td-dim">${(() => {
|
||||||
const m = ev.mic_ppv == null ? null : Number(ev.mic_ppv);
|
const m = ev.mic_ppv == null ? null : Number(ev.mic_ppv);
|
||||||
if (m == null || !isFinite(m) || m <= 0) return '—';
|
if (m == null || !isFinite(m) || m <= 0) return '—';
|
||||||
|
// BW (.AB0*/.N00) stores mic_ppv as psi → convert to dBL.
|
||||||
|
// Thor IDF (.IDFH/.IDFW) already stores dBL → display directly.
|
||||||
|
const fn = (ev.blastware_filename || '').toUpperCase();
|
||||||
|
const isThor = fn.endsWith('.IDFH') || fn.endsWith('.IDFW');
|
||||||
|
if (isThor) return m.toFixed(1) + ' dBL';
|
||||||
return (20 * Math.log10(m / DBL_REF)).toFixed(1) + ' dBL';
|
return (20 * Math.log10(m / DBL_REF)).toFixed(1) + ' dBL';
|
||||||
})()}</td>
|
})()}</td>
|
||||||
<td class="td-text">${ev.project ?? '—'}</td>
|
<td class="td-text">${ev.project ?? '—'}</td>
|
||||||
@@ -2454,11 +2459,20 @@ function _renderSidecar(data) {
|
|||||||
|
|
||||||
document.getElementById('sc-title').textContent = `Event — ${bw.filename || ev.waveform_key || 'unknown'}`;
|
document.getElementById('sc-title').textContent = `Event — ${bw.filename || ev.waveform_key || 'unknown'}`;
|
||||||
|
|
||||||
const fmtPpv = v => (v == null ? '—' : Number(v).toFixed(5) + ' in/s');
|
const fmtPpv = v => {
|
||||||
|
if (v == null) return '—';
|
||||||
|
const n = Number(v);
|
||||||
|
return isFinite(n) ? n.toFixed(5) + ' in/s' : String(v);
|
||||||
|
};
|
||||||
const fmtMic = v => {
|
const fmtMic = v => {
|
||||||
if (v == null || v <= 0) return '—';
|
if (v == null) return '—';
|
||||||
const dbl = 20 * Math.log10(v / DBL_REF);
|
const n = Number(v);
|
||||||
return `${dbl.toFixed(1)} dBL (${v.toExponential(2)} psi)`;
|
if (!isFinite(n) || n <= 0) return '—';
|
||||||
|
// Source-aware: Thor IDF imports store mic as dB(L); BW imports store
|
||||||
|
// it as psi. `src` is in the outer scope from _renderSidecar().
|
||||||
|
if ((src.kind || '') === 'idf-import') return `${n.toFixed(1)} dBL`;
|
||||||
|
const dbl = 20 * Math.log10(n / DBL_REF);
|
||||||
|
return `${dbl.toFixed(1)} dBL (${n.toExponential(2)} psi)`;
|
||||||
};
|
};
|
||||||
|
|
||||||
document.getElementById('sc-f-serial').textContent = ev.serial || '—';
|
document.getElementById('sc-f-serial').textContent = ev.serial || '—';
|
||||||
|
|||||||
Reference in New Issue
Block a user