diff --git a/fishy/engine/fullautofisher/engine.py b/fishy/engine/fullautofisher/engine.py index 36fc6f9..d562068 100644 --- a/fishy/engine/fullautofisher/engine.py +++ b/fishy/engine/fullautofisher/engine.py @@ -120,9 +120,12 @@ class FullAuto(IEngine): walking_time = dist / self.calibrator.move_factor logging.debug(f"walking for {walking_time}") - kb.press(config.get("forward_key")) + + forward_key = config.get("forward_key", 'w') + kb.press(forward_key) time.sleep(walking_time) - kb.release(config.get("forward_key")) + kb.release(forward_key) + logging.debug("done") # todo: maybe check if it reached the destination before returning true? return True diff --git a/fishy/engine/fullautofisher/mode/calibrator.py b/fishy/engine/fullautofisher/mode/calibrator.py index 71feb47..93e6bbc 100644 --- a/fishy/engine/fullautofisher/mode/calibrator.py +++ b/fishy/engine/fullautofisher/mode/calibrator.py @@ -63,9 +63,11 @@ class Calibrator(IMode): x1, y1, rot1 = coords - kb.press(config.get("forward_key")) + forward_key = config.get("forward_key", 'w') + kb.press(forward_key) time.sleep(walking_time) - kb.release(config.get("forward_key")) + kb.release(forward_key) + time.sleep(0.5) coords = self.engine.get_coords() diff --git a/fishy/gui/config_top.py b/fishy/gui/config_top.py index 77a782e..a71e75b 100644 --- a/fishy/gui/config_top.py +++ b/fishy/gui/config_top.py @@ -145,7 +145,7 @@ def start_semifisher_config(gui: 'GUI'): gui._notify_check['state'] = tk.NORMAL gui._notify.set(is_subbed[0]) - ttk.Label(controls_frame, text="action Key:").grid(row=1, column=0) + ttk.Label(controls_frame, text="Action Key:").grid(row=1, column=0) action_key_entry = ttk.Entry(controls_frame, justify=tk.CENTER) action_key_entry.grid(row=1, column=1) action_key_entry.insert(0, config.get("action_key", "e"))