fix: rename max_geo_range to ADC scale, and make it so its not user configurable.

fix: change max_geo_range_enum to geo_range with two options (normal and sensitive)
This commit is contained in:
2026-04-19 18:15:23 -04:00
parent b23cf4bb50
commit aa28495a43
6 changed files with 24 additions and 53 deletions
+2 -8
View File
@@ -289,8 +289,8 @@ def _serialise_compliance_config(cc: Optional["ComplianceConfig"]) -> Optional[d
"sample_rate": cc.sample_rate,
"trigger_level_geo": cc.trigger_level_geo,
"alarm_level_geo": cc.alarm_level_geo,
"max_range_geo": cc.max_range_geo, # hw constant 6.206053 — informational only, do not write
"max_range_geo_enum": cc.max_range_geo_enum, # 0x01=Normal 10in/s, 0x00=Extended 1.25in/s (unconfirmed)
"geo_adc_scale": cc.geo_adc_scale, # hw scale factor (in/s)/V — informational only, do not write
"geo_range": cc.geo_range, # range selector: 0x01=Normal 10in/s, 0x00=Sensitive 1.25in/s (unconfirmed)
"setup_name": cc.setup_name,
"project": cc.project,
"client": cc.client,
@@ -843,10 +843,6 @@ class DeviceConfigBody(BaseModel):
------------------------------------------------
trigger_level_geo : Trigger threshold in in/s (e.g. 0.5).
alarm_level_geo : Alarm threshold in in/s (e.g. 1.0).
max_range_geo : DEPRECATED — was misidentified as the max range; it is actually a
hardware/firmware constant (6.206053) the same on all units and
must not be written. Passing this field is a no-op (ignored with warning).
Project / operator strings (max 41 ASCII characters each)
----------------------------
project : Project description.
@@ -861,7 +857,6 @@ class DeviceConfigBody(BaseModel):
# Threshold parameters
trigger_level_geo: Optional[float] = None
alarm_level_geo: Optional[float] = None
max_range_geo: Optional[float] = None
# Project / operator strings
project: Optional[str] = None
client_name: Optional[str] = None
@@ -920,7 +915,6 @@ def device_config(
record_time=body.record_time,
trigger_level_geo=body.trigger_level_geo,
alarm_level_geo=body.alarm_level_geo,
max_range_geo=body.max_range_geo,
project=body.project,
client_name=body.client_name,
operator=body.operator,