Ejemplo n.º 1
0
 def _rotational_button_click(self) -> None:
     try:
         self._subroutine_runner.execute_rotational_movement(self._angle.get(),
                                                             CommandCallback(self._button_click_done))
         self._progress.start()
     except BlockingIOError:
         messagebox.showerror(title="Impossible to comply", message="Already taking over the world.")
Ejemplo n.º 2
0
 def _discharge_click(self) -> None:
     try:
         self._subroutine_runner.execute_discharge_magnet(
             CommandCallback(self._button_click_done))
         self._progress.start()
     except BlockingIOError:
         messagebox.showerror(title="Impossible to comply",
                              message="Already taking over the world.")
Ejemplo n.º 3
0
 def _button_click(self) -> None:
     try:
         self._subroutine_runner.execute_championship_subroutine(
             CommandCallback(self._button_click_done))
         self._progress.start()
         self._time_service.reset()
         self._time_service.start()
     except BlockingIOError:
         messagebox.showerror(title="Impossible to comply",
                              message="Already taking over the world.")
Ejemplo n.º 4
0
 def _button_click(self) -> None:
     if self._zone_target.get() == "":
         messagebox.showwarning(title="No selection", message="Please make a selection")
         return
     try:
         self._subroutine_runner.execute_drop_subroutine(self._zone_target.get(),
                                                         CommandCallback(self._button_click_done))
         self._progress.start()
     except BlockingIOError:
         messagebox.showerror(title="Impossible to comply", message="Already taking over the world.")
Ejemplo n.º 5
0
    def _directional_button_click(self) -> None:
        direction = self._directional_input.get()
        speed = self._speed_input.get()
        if direction == "" or speed == "":
            messagebox.showwarning(title="No selection", message="Please make a selection")
            return

        try:
            self._subroutine_runner.execute_directional_movement(direction, speed, self._distance.get(),
                                                                 CommandCallback(self._button_click_done))
            self._progress.start()
        except BlockingIOError:
            messagebox.showerror(title="Impossible to comply", message="Already taking over the world.")