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