From ba24e4d63f67f7edc151b0e185a5b7eac17d2e16 Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Sat, 18 Dec 2021 17:21:26 -0500 Subject: better save control --- examples/lock_eit.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'examples') diff --git a/examples/lock_eit.py b/examples/lock_eit.py index 31d1e72..5ff83db 100644 --- a/examples/lock_eit.py +++ b/examples/lock_eit.py @@ -113,9 +113,11 @@ async def main(): apparatus.config['Device model'] = 'v0.1' apparatus.config['FnamePrefix'] = 'locked_magnetometer' apparatus.config['SavePath'] = '/mnt/qol_grp_data/data.VAMPIRE.HighPower' + apparatus.config['SavePath'] = './data' apparatus.gui_log = gui.QOLTimeLog(a=wp) - task_gui_log_update_loop = asyncio.create_task(apparatus.gui_log.update_loop(update_interval=5)) + apparatus.gui_log.getNextDataFile = apparatus.getNextDataFile + task_gui_log_update_loop = asyncio.create_task(apparatus.gui_log.update_loop(update_interval=10)) print("testing") rm = pyvisa.ResourceManager() @@ -155,7 +157,7 @@ async def main(): apparatus.pid.reset() apparatus.runStatus = True res = await asyncio.gather( - feedbackLoop(apparatus, nsteps=100) + feedbackLoop(apparatus, nsteps=1000) ) print('========= Long term lock ===========') @@ -187,10 +189,10 @@ def update_webpage(byWhom=None, apparatus=None): print("updating webpage") timestr = time.strftime("%a, %d %b %Y, %H:%M:%S", time.localtime()) clock_upd.text = f'Last update at {timestr}' - # try: - # status_line.text = apparatus.state - # except NameError: - # pass + try: + status_line.text = apparatus.state + except: + pass jp.run_task(wp.update()) async def update_webpage_loop(update_interval=1): -- cgit v1.2.3