diff --git a/sfm/sfm_webapp.html b/sfm/sfm_webapp.html index b7c251f..3141c17 100644 --- a/sfm/sfm_webapp.html +++ b/sfm/sfm_webapp.html @@ -916,6 +916,14 @@ Memory free — +
+ @@ -1929,6 +1937,15 @@ function updateMonitorPanel(s) { const kb = (bytes, k) => bytes != null ? Math.round(bytes / 1024) : k; const totalKb = kb(s.memory_total_bytes, s.memory_total_kb); const freeKb = kb(s.memory_free_bytes, s.memory_free_kb); + // The unit's clock and event count come only in the shared shape (serial + // mode); Series 3 reports both as null. + const shared = 'monitoring' in s; + for (const [id, v] of [['mon-time', s.device_time ? s.device_time.replace('T', ' ') : '—'], + ['mon-events', s.event_count ?? '—']]) { + const el = document.getElementById(id); + if (shared) el.textContent = v; + el.parentElement.style.display = shared ? '' : 'none'; + } if (volts != null) batEl.textContent = `${volts.toFixed(2)} V`; if (totalKb != null) memTEl.textContent = `${totalKb} KB`; if (freeKb != null) memFEl.textContent = `${freeKb} KB`;