diff --git a/pykirdy/kirdy_qt.py b/pykirdy/kirdy_qt.py index aa4417d..c8e71d0 100644 --- a/pykirdy/kirdy_qt.py +++ b/pykirdy/kirdy_qt.py @@ -563,15 +563,15 @@ class MainWindow(QtWidgets.QMainWindow): ) self.menu_action_about_gui.triggered.connect(about_gui) - @pyqtSlot(bool) - def dfu_mode(_): - self.kirdy.task_dispatcher(self.kirdy.device.dfu()) + @asyncSlot(bool) + async def dfu_mode(_): + await self.kirdy.device.dfu() self.kirdy_handler.end_session() self.menu_action_dfu_mode.triggered.connect(dfu_mode) - @pyqtSlot(bool) - def reset_kirdy(_): - self.kirdy.task_dispatcher(self.kirdy.device.hard_reset()) + @asyncSlot(bool) + async def reset_kirdy(_): + await self.kirdy.device.hard_reset() self.kirdy_handler.end_session() self.menu_action_hard_reset.triggered.connect(reset_kirdy)