From 1aef649f36a64cf6831bcf4bd64629d4e5bafae1 Mon Sep 17 00:00:00 2001 From: Jan David Mol <mol@astron.nl> Date: Fri, 29 Apr 2022 16:16:19 +0200 Subject: [PATCH] L2SS-769: Only accept valid clock settings --- tangostationcontrol/tangostationcontrol/devices/sdp/sdp.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tangostationcontrol/tangostationcontrol/devices/sdp/sdp.py b/tangostationcontrol/tangostationcontrol/devices/sdp/sdp.py index 1aa8804d8..ac5bdc07a 100644 --- a/tangostationcontrol/tangostationcontrol/devices/sdp/sdp.py +++ b/tangostationcontrol/tangostationcontrol/devices/sdp/sdp.py @@ -213,6 +213,9 @@ class SDP(opcua_device): #raise ValueError(f"Could not determine Nyquist zone for antenna type {self.AntennaType} clock {self._clock}") def write_clock_RW(self, clock): + if clock not in (160*1000000, 200*1000000): + raise ValueError(f"Unsupported clock frequency: {clock}") + # Tell all FPGAs to use this clock self.proxy.FPGA_pps_expected_cnt_RW = [clock] * self.N_pn -- GitLab