switch save and cancel, make recipes available through menu, remove calibration tools in mock
This commit is contained in:
@@ -18,6 +18,7 @@ class MainView(tk.Frame, ButtonInterface):
|
||||
def __init__(self, parent,
|
||||
tare_command=None,
|
||||
calibrate_command=None,
|
||||
is_mock=False,
|
||||
bt_connected_getter=None,
|
||||
bt_start_pairing_command=None,
|
||||
bt_stop_pairing_command=None,
|
||||
@@ -34,8 +35,9 @@ class MainView(tk.Frame, ButtonInterface):
|
||||
|
||||
self.actions = Frame(self)
|
||||
self.actions.pack()
|
||||
self.calibrate_button = ttk.Button(self.actions, text="Calibrate", command=calibrate_command)
|
||||
self.calibrate_button.pack()
|
||||
if not is_mock:
|
||||
self.calibrate_button = ttk.Button(self.actions, text="Calibrate", command=calibrate_command)
|
||||
self.calibrate_button.pack()
|
||||
|
||||
self.im_size = (168, 144)
|
||||
self.center = (168 // 2, 144 // 2)
|
||||
@@ -133,6 +135,7 @@ class MainView(tk.Frame, ButtonInterface):
|
||||
self.buttons.current_view = MenuView(self,
|
||||
self.im_size, self.center,
|
||||
bluetooth_pair_command=self.start_bluetooth_pairing,
|
||||
recipes_command=self.enter_recipe_selection,
|
||||
deactivate_command=self.enter_main_mode)
|
||||
self.refresh(0.0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user