From 0c9c437258e9e6931a3aa2918456834b39fcc56b Mon Sep 17 00:00:00 2001 From: Brendan Haines Date: Mon, 2 Mar 2020 16:40:06 -0700 Subject: [PATCH] WIP: try using builtin periodic callbacks --- Software/python/hwtest.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Software/python/hwtest.py b/Software/python/hwtest.py index 7acdf77..0ac4d63 100644 --- a/Software/python/hwtest.py +++ b/Software/python/hwtest.py @@ -92,6 +92,7 @@ controls = column(cal_white_button, cal_black_button, update_button) curdoc().add_root(row(controls, plot, width=800)) curdoc().title = "TriangleBot Control Panel" +curdoc().add_periodic_callback(update_plot, 500) def control_thread(): global brightness @@ -106,8 +107,8 @@ def control_thread(): ii += 1 if ii == 10: ii = 0 - if ii == 0: - update_plot() + # if ii == 0: + # update_plot() t = threading.Thread(target=control_thread)