From 0790999fd845fcbf904e7009caff20a89ff542a1 Mon Sep 17 00:00:00 2001 From: Brendan Haines Date: Mon, 2 Mar 2020 22:02:50 -0700 Subject: [PATCH] add update of brightness plot when controller is disabled --- Software/python/hwtest.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Software/python/hwtest.py b/Software/python/hwtest.py index 23acfa7..9a03b12 100644 --- a/Software/python/hwtest.py +++ b/Software/python/hwtest.py @@ -146,8 +146,13 @@ def update_plots(attrname=None, old=None, new=None): global brightness global time_data global brightness_plot_source - brightness_plot_source.data = dict(sensor=brightness_idx, brightness=brightness) - time_plot_source.data = dict(t=time_data[:,0], e=time_data[:,1], c=time_data[:,2]) + global control_thread_run + if control_thread_run: + brightness_plot_source.data = dict(sensor=brightness_idx, brightness=brightness) + time_plot_source.data = dict(t=time_data[:,0], e=time_data[:,1], c=time_data[:,2]) + else: + brightness = np.clip([get_normalized_reflectivity(c) for c in range(8)], 0, 1) + brightness_plot_source.data = dict(sensor=brightness_idx, brightness=brightness) def cal_white(attrname=None, old=None, new=None): global white_cal