From 68db8bdaf4a2feb796b46f92b18183ccdc887ded Mon Sep 17 00:00:00 2001 From: dirac Date: Wed, 13 Jul 2022 14:52:41 -0400 Subject: [PATCH] change the unit for update from ms to sec --- .gitignore | 2 ++ IsegHVController.py | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7631a5d --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.csv +*.dat diff --git a/IsegHVController.py b/IsegHVController.py index 20b1fde..c4736f4 100755 --- a/IsegHVController.py +++ b/IsegHVController.py @@ -150,13 +150,13 @@ outVList = GetAllOutputHV() outIList = GetAllLC() nChannel = len(chList) -updateTime = 5000 +updateTime = 5 #sec fileName = '' layout = [ [ - sg.Text("refresh period [ms] :", size = 25, justification = "right"), + sg.Text("refresh period [sec] :", size = 27, justification = "right"), sg.Input(updateTime, size = 8, justification = "right", enable_events=True, key=("-Refresh-")) ], [ @@ -195,7 +195,7 @@ for i in range(0, nChannel): # Event Loop to process "events" and get the "values" of the inputs while True: - event, values = window.read(timeout = updateTime, timeout_key = "_TIMEOUT_") ## this pause for 20 sec and wait for event + event, values = window.read(timeout = updateTime * 1000, timeout_key = "_TIMEOUT_") ## this pause for 20 sec and wait for event #print(event) #print(values) #print(datetime.datetime.now())