diff --git a/omotion/config.py b/omotion/config.py index 4fc8ed89..17f6f58d 100644 --- a/omotion/config.py +++ b/omotion/config.py @@ -406,6 +406,10 @@ def merge_trigger_config(*overrides) -> dict: # EE or OPT safety FPGA STATUS could not be read for several polls in a row # (console-fw CFW-04). Clears once both read again with no fault. TRIG_INTERLOCK_SAFETY_UNKNOWN: int = 0x10 +# A safety limit named in the stored config was not loaded and verified: out of +# range, not a settable register, write failed or read back wrong (console-fw +# CFW-10). Cleared by the next config apply that succeeds. +TRIG_INTERLOCK_LIMITS: int = 0x20 TRIG_START_TIMER_FAILED: int = 0x80 _TRIG_REFUSAL_REASONS = ( @@ -414,6 +418,7 @@ def merge_trigger_config(*overrides) -> dict: (TRIG_INTERLOCK_TEC, "TEC thermal trip (clears about 5 s after the TEC recovers)"), (TRIG_INTERLOCK_CONFIG, "console user config invalid or missing; running on defaults until a config is written"), (TRIG_INTERLOCK_SAFETY_UNKNOWN, "laser-safety FPGA status unreadable (EE/OPT not responding)"), + (TRIG_INTERLOCK_LIMITS, "a safety limit in the console config was not applied (out of range or failed read-back)"), (TRIG_START_TIMER_FAILED, "FSYNC timer failed to start"), ) diff --git a/tests/test_trigger_limits.py b/tests/test_trigger_limits.py index 91f3a37e..a39b126f 100644 --- a/tests/test_trigger_limits.py +++ b/tests/test_trigger_limits.py @@ -23,6 +23,7 @@ TRIG_INTERLOCK_CONFIG, TRIG_INTERLOCK_LASER_SAFETY, TRIG_INTERLOCK_SAFETY_UNKNOWN, + TRIG_INTERLOCK_LIMITS, TRIG_INTERLOCK_TEC, TRIG_START_TIMER_FAILED, TRIGGER_JSON_MAX, @@ -126,7 +127,8 @@ def test_describe_trigger_refusal(): assert "config invalid or missing" in describe_trigger_refusal(TRIG_INTERLOCK_CONFIG) assert "unknown" not in describe_trigger_refusal(TRIG_INTERLOCK_CONFIG | TRIG_INTERLOCK_TEC) assert "unreadable" in describe_trigger_refusal(TRIG_INTERLOCK_SAFETY_UNKNOWN) - assert "0x20" in describe_trigger_refusal(0x20) + assert "safety limit" in describe_trigger_refusal(TRIG_INTERLOCK_LIMITS) + assert "0x40" in describe_trigger_refusal(0x40) assert "no status byte" in describe_trigger_refusal(None)