feat: implement geophone sensitivity and recording mode settings in compliance config
This commit is contained in:
+18
-3
@@ -856,6 +856,16 @@
|
||||
<div class="hint">Alarm flagged when any geo channel exceeds this level</div>
|
||||
</div>
|
||||
|
||||
<div class="cfg-field">
|
||||
<label>Maximum Range — Geo</label>
|
||||
<select id="cfg-geo-range">
|
||||
<option value="">— unchanged —</option>
|
||||
<option value="0">Normal — 10.000 in/s</option>
|
||||
<option value="1">Sensitive — 1.250 in/s</option>
|
||||
</select>
|
||||
<div class="hint">Geophone sensitivity (applies to Tran / Vert / Long channels)</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Project / operator strings -->
|
||||
@@ -1354,6 +1364,7 @@ function populateDeviceTab() {
|
||||
['Record Time', cc.record_time != null ? `${cc.record_time.toFixed(2)} s` : '—'],
|
||||
['Trigger Level (geo)', cc.trigger_level_geo != null ? `${cc.trigger_level_geo.toFixed(4)} in/s` : '—'],
|
||||
['Alarm Level (geo)', cc.alarm_level_geo != null ? `${cc.alarm_level_geo.toFixed(4)} in/s` : '—'],
|
||||
['Max Range (geo)', cc.geo_range != null ? (cc.geo_range === 0 ? 'Normal — 10.000 in/s' : cc.geo_range === 1 ? 'Sensitive — 1.250 in/s' : `0x${cc.geo_range.toString(16).padStart(2,'0')}`) : '—'],
|
||||
['ADC Scale Factor (geo)', cc.geo_adc_scale != null ? `${cc.geo_adc_scale.toFixed(4)} in/s` : '—'],
|
||||
['Setup Name', cc.setup_name || '—'],
|
||||
];
|
||||
@@ -1389,8 +1400,9 @@ function populateConfigFromDeviceInfo() {
|
||||
if (cc.sample_rate) qs('cfg-sample-rate', String(cc.sample_rate));
|
||||
if (cc.histogram_interval_sec != null) qs('cfg-histogram-interval', String(cc.histogram_interval_sec));
|
||||
if (cc.record_time != null) qs('cfg-record-time', cc.record_time.toFixed(1));
|
||||
if (cc.trigger_level_geo != null) qs('cfg-trigger', cc.trigger_level_geo.toFixed(4));
|
||||
if (cc.alarm_level_geo != null) qs('cfg-alarm', cc.alarm_level_geo.toFixed(4));
|
||||
if (cc.trigger_level_geo != null) qs('cfg-trigger', cc.trigger_level_geo.toFixed(4));
|
||||
if (cc.alarm_level_geo != null) qs('cfg-alarm', cc.alarm_level_geo.toFixed(4));
|
||||
if (cc.geo_range != null) qs('cfg-geo-range', String(cc.geo_range));
|
||||
if (cc.project) qs('cfg-project', cc.project);
|
||||
if (cc.client) qs('cfg-client', cc.client);
|
||||
if (cc.operator) qs('cfg-operator', cc.operator);
|
||||
@@ -1400,7 +1412,8 @@ function populateConfigFromDeviceInfo() {
|
||||
|
||||
function clearConfigForm() {
|
||||
['cfg-sample-rate','cfg-record-time','cfg-trigger','cfg-alarm',
|
||||
'cfg-project','cfg-client','cfg-operator','cfg-seis-loc','cfg-notes']
|
||||
'cfg-project','cfg-client','cfg-operator','cfg-seis-loc','cfg-notes',
|
||||
'cfg-recording-mode','cfg-histogram-interval','cfg-geo-range']
|
||||
.forEach(id => { const el = qs(id); el.tagName === 'SELECT' ? el.selectedIndex = 0 : el.value = ''; });
|
||||
setCfgStatus('');
|
||||
}
|
||||
@@ -1441,6 +1454,8 @@ async function writeConfig() {
|
||||
if (trig) body.trigger_level_geo = parseFloat(trig);
|
||||
const alarm = qs('cfg-alarm').value;
|
||||
if (alarm) body.alarm_level_geo = parseFloat(alarm);
|
||||
const gr = qs('cfg-geo-range').value;
|
||||
if (gr !== '') body.geo_range = parseInt(gr, 10);
|
||||
const proj = qs('cfg-project').value.trim();
|
||||
if (proj) body.project = proj;
|
||||
const cli = qs('cfg-client').value.trim();
|
||||
|
||||
Reference in New Issue
Block a user