diff --git a/omotion/config.py b/omotion/config.py index 862367f3..4fc8ed89 100644 --- a/omotion/config.py +++ b/omotion/config.py @@ -403,6 +403,9 @@ def merge_trigger_config(*overrides) -> dict: # Console running on its built-in default config because no valid stored # record was found (console-fw CFW-03). Cleared by writing a config. TRIG_INTERLOCK_CONFIG: int = 0x08 +# 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 TRIG_START_TIMER_FAILED: int = 0x80 _TRIG_REFUSAL_REASONS = ( @@ -410,6 +413,7 @@ def merge_trigger_config(*overrides) -> dict: (TRIG_INTERLOCK_LASER_SAFETY, "laser-safety fault latched (EE/OPT safety FPGA)"), (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_START_TIMER_FAILED, "FSYNC timer failed to start"), ) diff --git a/tests/test_trigger_limits.py b/tests/test_trigger_limits.py index 333d5d18..91f3a37e 100644 --- a/tests/test_trigger_limits.py +++ b/tests/test_trigger_limits.py @@ -22,6 +22,7 @@ OW_RESP, TRIG_INTERLOCK_CONFIG, TRIG_INTERLOCK_LASER_SAFETY, + TRIG_INTERLOCK_SAFETY_UNKNOWN, TRIG_INTERLOCK_TEC, TRIG_START_TIMER_FAILED, TRIGGER_JSON_MAX, @@ -124,7 +125,8 @@ def test_describe_trigger_refusal(): assert "timer" in describe_trigger_refusal(TRIG_START_TIMER_FAILED) 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 "0x10" in describe_trigger_refusal(0x10) + assert "unreadable" in describe_trigger_refusal(TRIG_INTERLOCK_SAFETY_UNKNOWN) + assert "0x20" in describe_trigger_refusal(0x20) assert "no status byte" in describe_trigger_refusal(None)