switch save and cancel, make recipes available through menu, remove calibration tools in mock

This commit is contained in:
Jannes Magnusson
2026-03-17 08:38:34 +01:00
parent 74b1aa0706
commit befe9f0a9e
4 changed files with 25 additions and 9 deletions

View File

@@ -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)