Skip to content

Commit

Permalink
checks if duckypad is busy before trying to connect
Browse files Browse the repository at this point in the history
  • Loading branch information
dekuNukem committed Oct 12, 2023
1 parent c13eb21 commit 7cb1eea
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions pc_software/duckypad_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,13 @@
1.5.1 2023 09 20
STRINGLN_BLOCK and STRING_BLOCK now preserves empty lines and white spaces
1.6.0 2023 10 10
1.6.1 2023 10 10
automatically expands MOUSE_MOVE is value is more than 127
checks if duckypad is busy before trying to connect
"""

THIS_VERSION_NUMBER = '1.6.0'
THIS_VERSION_NUMBER = '1.6.1'
MIN_DUCKYPAD_FIRMWARE_VERSION = "1.1.2"
MAX_DUCKYPAD_FIRMWARE_VERSION = "1.10.10"

Expand Down Expand Up @@ -352,6 +353,10 @@ def connect_button_click():
hid_op.duckypad_hid_close()
try:
hid_op.duckypad_hid_init()
is_dp_ready, comment = hid_op.is_dp_ready()
if is_dp_ready is False:
messagebox.showerror("Error", comment)
return
fw_str = get_fw_str_hid()
fw_status = check_fw_support(fw_str)
if fw_status != FW_OK:
Expand Down
Binary file modified pc_software/duckypad_config_latest_source.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion pc_software/hid_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def is_dp_ready():
return False, 'duckyPad not Found!'
if dp_info[2] == 0:
return True, 'All good!'
return False, 'duckyPad is busy!'
return False, 'duckyPad is busy!\n\nMake sure no script is running.'

def duckypad_hid_resume():
pc_to_duckypad_buf = [0] * PC_TO_DUCKYPAD_HID_BUF_SIZE
Expand Down

0 comments on commit 7cb1eea

Please sign in to comment.