mirror of
https://github.com/brendanhaines/ECEN5458_Project.git
synced 2024-11-09 21:14:47 -07:00
WIP: still hoping
This commit is contained in:
parent
e518fc4903
commit
e5e1fb54a3
|
@ -60,16 +60,16 @@ def update_plot(attrname=None, old=None, new=None):
|
||||||
brightness = [get_normalized_reflectivity(c) for c in range(8)]
|
brightness = [get_normalized_reflectivity(c) for c in range(8)]
|
||||||
global plt_data
|
global plt_data
|
||||||
plt_data = dict(x=brightness_idx, y=brightness)
|
plt_data = dict(x=brightness_idx, y=brightness)
|
||||||
# plt_source.data = plt_data
|
plt_source.data = plt_data
|
||||||
|
|
||||||
def cal_white(attrname=None, old=None, new=None):
|
def cal_white(attrname=None, old=None, new=None):
|
||||||
global white_cal
|
global white_cal
|
||||||
white_cal = [get_reflectivity(c) for c in range(8)]
|
white_cal = brightness.copy()
|
||||||
update_plot()
|
update_plot()
|
||||||
|
|
||||||
def cal_black(attrname=None, old=None, new=None):
|
def cal_black(attrname=None, old=None, new=None):
|
||||||
global black_cal
|
global black_cal
|
||||||
black_cal = [get_reflectivity(c) for c in range(8)]
|
black_cal = brightness.copy()
|
||||||
update_plot()
|
update_plot()
|
||||||
|
|
||||||
cal_white_button = Button(label="Cal White")
|
cal_white_button = Button(label="Cal White")
|
||||||
|
@ -80,8 +80,7 @@ cal_black_button.on_click(cal_black)
|
||||||
controls = column(cal_white_button, cal_black_button)
|
controls = column(cal_white_button, cal_black_button)
|
||||||
|
|
||||||
curdoc().add_root(row(controls, plot, width=800))
|
curdoc().add_root(row(controls, plot, width=800))
|
||||||
# curdoc().add_root(row(plot, width=800))
|
curdoc().title = "TriangleBot Control Panel"
|
||||||
curdoc().title = "test"
|
|
||||||
|
|
||||||
def control_thread():
|
def control_thread():
|
||||||
ii = 0
|
ii = 0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user