fix: add thor specific ascii parser.
This commit is contained in:
+12
-5
@@ -2285,13 +2285,16 @@ let sessLoaded = false;
|
||||
const _unitSerials = new Set();
|
||||
|
||||
function _ppvClass(v) {
|
||||
if (v == null) return '';
|
||||
if (v >= 2.0) return 'ppv-high';
|
||||
if (v >= 0.5) return 'ppv-warn';
|
||||
const n = (v == null) ? null : Number(v);
|
||||
if (n == null || !isFinite(n)) return '';
|
||||
if (n >= 2.0) return 'ppv-high';
|
||||
if (n >= 0.5) return 'ppv-warn';
|
||||
return 'ppv-ok';
|
||||
}
|
||||
function _ppvFmt(v) {
|
||||
return v != null ? v.toFixed(5) : '—';
|
||||
if (v == null) return '—';
|
||||
const n = typeof v === 'number' ? v : Number(v);
|
||||
return isFinite(n) ? n.toFixed(5) : String(v);
|
||||
}
|
||||
function _fmtTs(ts) {
|
||||
if (!ts) return '—';
|
||||
@@ -2386,7 +2389,11 @@ async function loadHistory() {
|
||||
<td class="${_ppvClass(ev.vert_ppv)}">${_ppvFmt(ev.vert_ppv)}</td>
|
||||
<td class="${_ppvClass(ev.long_ppv)}">${_ppvFmt(ev.long_ppv)}</td>
|
||||
<td class="${_ppvClass(pvs)}">${_ppvFmt(pvs)}</td>
|
||||
<td class="td-dim">${ev.mic_ppv != null && ev.mic_ppv > 0 ? (20 * Math.log10(ev.mic_ppv / DBL_REF)).toFixed(1) + ' dBL' : '—'}</td>
|
||||
<td class="td-dim">${(() => {
|
||||
const m = ev.mic_ppv == null ? null : Number(ev.mic_ppv);
|
||||
if (m == null || !isFinite(m) || m <= 0) return '—';
|
||||
return (20 * Math.log10(m / DBL_REF)).toFixed(1) + ' dBL';
|
||||
})()}</td>
|
||||
<td class="td-text">${ev.project ?? '—'}</td>
|
||||
<td class="td-text">${ev.client ?? '—'}</td>
|
||||
<td class="td-dim">${ev.record_type ?? '—'}</td>
|
||||
|
||||
Reference in New Issue
Block a user