feat(codec): the MiniMate alarm level is writable (benched 2026-11-04)
S3_ALARM_WRITE_MEASURED = True. At the bench on BE9441, with Brian's go, the alarm went 1.0 -> 1.5 -> 1.0 in/s: each write acknowledged, read back as sent, and shown in the unit's own setup menu. The write moved exactly channel +39 of the three geophone blocks (the f32 at +38), where the event files put it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
This commit is contained in:
1 parent
9992b25fde
commit
55c7b7b5ae
2 files changed
+15
-8
No files matched your search
@@ -196,11 +196,17 @@ def test_field_not_offered_for_the_series():
|
||||
_refused(S4_BLOCK, 4, {"no_such_field": 1})
|
||||
|
||||
|
||||
def test_alarm_is_read_only_until_measured():
|
||||
assert sf.S3_ALARM_WRITE_MEASURED is False
|
||||
_refused(S3_BLOCK, 3, {"geo_alarm_ips": 1.0})
|
||||
def test_the_alarm_is_writable_since_the_bench():
|
||||
# Bench 2026-11-04, BE9441: 1.0 -> 1.5 -> 1.0, each acknowledged, read back and
|
||||
# shown in the unit's own setup menu; the write moved exactly channel +39 of the
|
||||
# three geophones (the f32 at +38).
|
||||
assert sf.S3_ALARM_WRITE_MEASURED is True
|
||||
assert check_changes(S3_BLOCK, 3, {"geo_alarm_ips": 1.5}) == {"geo_alarm_ips": 1.5}
|
||||
alarm = next(d for d in editable_fields(S3_BLOCK, 3) if d["field"] == "geo_alarm_ips")
|
||||
assert alarm["readonly"] is True
|
||||
assert alarm["readonly"] is False
|
||||
out = encode_setup(S3_BLOCK, 3, {"geo_alarm_ips": 1.5})
|
||||
assert [i for i in range(2090) if out[i] != S3_BLOCK[i] and i not in (26, 27)] == [1747, 1795, 1843]
|
||||
_refused(S4_BLOCK, 4, {"geo_alarm_ips": 1.5}) # still Series 3 only
|
||||
|
||||
|
||||
def _with_unit(block: bytes, unit: bytes) -> bytes:
|
||||
|
||||
Reference in new issue
Block a user