mirror of
https://github.com/brendanhaines/ECEN5458_Project.git
synced 2024-12-27 03:17:06 -07:00
WIP: try using builtin periodic callbacks
This commit is contained in:
parent
5ab95f2696
commit
0c9c437258
|
@ -92,6 +92,7 @@ controls = column(cal_white_button, cal_black_button, update_button)
|
||||||
|
|
||||||
curdoc().add_root(row(controls, plot, width=800))
|
curdoc().add_root(row(controls, plot, width=800))
|
||||||
curdoc().title = "TriangleBot Control Panel"
|
curdoc().title = "TriangleBot Control Panel"
|
||||||
|
curdoc().add_periodic_callback(update_plot, 500)
|
||||||
|
|
||||||
def control_thread():
|
def control_thread():
|
||||||
global brightness
|
global brightness
|
||||||
|
@ -106,8 +107,8 @@ def control_thread():
|
||||||
ii += 1
|
ii += 1
|
||||||
if ii == 10:
|
if ii == 10:
|
||||||
ii = 0
|
ii = 0
|
||||||
if ii == 0:
|
# if ii == 0:
|
||||||
update_plot()
|
# update_plot()
|
||||||
|
|
||||||
|
|
||||||
t = threading.Thread(target=control_thread)
|
t = threading.Thread(target=control_thread)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user