From 2413c249407e22c963a268e1c8334b120923f0f5 Mon Sep 17 00:00:00 2001 From: Gijs Schoonderbeek <schoonderbeek@astron.nl> Date: Tue, 10 Jan 2023 11:25:40 +0100 Subject: [PATCH] Added PPS check --- production_apsct.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/production_apsct.py b/production_apsct.py index 66b9f32..2616d17 100644 --- a/production_apsct.py +++ b/production_apsct.py @@ -27,8 +27,8 @@ if len(sys.argv) < 2: exit() apsct = apsct_lib.ApsctClass(CLK_FREQ) - -modi = ["200MHz", "160MHz", "OFF"] +state = True +modi = ["200MHz"] # , "160MHz", "OFF"] for mode in modi: print(f"Check APSCT in {mode} mode") apsct.frequency = mode @@ -36,15 +36,14 @@ for mode in modi: apsct.pll_200.read_lock() apsct.pll_160.read_lock() apsct.sensors.apsct_sensors() - apsct.check_apsct() - + state = state & apsct.check_apsct() if READ_ALL: apsct.pll_200.read_all_regs_pll() # apsct.pll_160.read_all_regs_pll() apsct.read_IO_expanderis() -if apsct.check_apsct(): +if state: apsct_id = "APSCT-" + sys.argv[1] serial = sys.argv[2] rw_ok = apsct.eeprom.wr_rd_eeprom(apsct_id, address=0) -- GitLab