gui: await for hard rst and dfu action
This commit is contained in:
parent
0d64d62fb0
commit
76f7875e3a
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue