fix: continue to debug and fix strt amd waveform weirdness
This commit is contained in:
+1
-1
@@ -1028,7 +1028,7 @@ def db_event_waveform(event_id: str) -> dict:
|
||||
waveform viewer can consume either source without modification:
|
||||
- total_samples, pretrig_samples, rectime_seconds, samples_decoded
|
||||
- sample_rate
|
||||
- peak_values (tran, vert, long, micl_psi, peak_vector_sum)
|
||||
- peak_values (tran_in_s, vert_in_s, long_in_s, micl_psi, peak_vector_sum)
|
||||
- channels ({"Tran": [...], "Vert": [...], "Long": [...], "Mic": [...]})
|
||||
|
||||
Returns 404 if the event doesn't exist, 422 if the event exists but has no
|
||||
|
||||
@@ -507,11 +507,13 @@
|
||||
const micPeakPsi = data.peak_values?.micl_psi ?? null;
|
||||
const DBL_REF_PSI = 2.9e-9; // 20 µPa in psi
|
||||
|
||||
// 0C record peak values (device-computed, authoritative) per channel
|
||||
// 0C record peak values (device-computed, authoritative) per channel.
|
||||
// Keys: live-device endpoint uses tran_in_s/vert_in_s/long_in_s;
|
||||
// DB blobs created before 2026-04-14 used tran/vert/long — fall back for compat.
|
||||
const peakValues0C = {
|
||||
Tran: data.peak_values?.tran_in_s ?? null,
|
||||
Vert: data.peak_values?.vert_in_s ?? null,
|
||||
Long: data.peak_values?.long_in_s ?? null,
|
||||
Tran: data.peak_values?.tran_in_s ?? data.peak_values?.tran ?? null,
|
||||
Vert: data.peak_values?.vert_in_s ?? data.peak_values?.vert ?? null,
|
||||
Long: data.peak_values?.long_in_s ?? data.peak_values?.long ?? null,
|
||||
};
|
||||
|
||||
for (const [ch, color] of Object.entries(CHANNEL_COLORS)) {
|
||||
|
||||
Reference in New Issue
Block a user