From d403cc171f6b179ddfa0fe6fe14296908142020f Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Wed, 9 Aug 2023 08:36:57 +0800 Subject: [PATCH 1/4] qmk_gui: Select correct device dev variable wasn't set, so it would be luck getting the right one. Signed-off-by: Daniel Schaefer --- qmk_gui.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qmk_gui.py b/qmk_gui.py index e209f45..065e2e9 100755 --- a/qmk_gui.py +++ b/qmk_gui.py @@ -249,9 +249,6 @@ def main(devices): # print("Selected {} devices".format(len(selected_devices))) # Updating firmware - if event == "-FLASH-" and len(selected_devices) != 1: - sg.Popup('To flash select exactly 1 device.') - continue if event == "-VERSION-": # After selecting a version, we can list the types of firmware available for this version types = list(releases[values['-VERSION-']]) @@ -260,9 +257,12 @@ def main(devices): # Once the user has selected a type, the exact firmware file is known and can be flashed window['-FLASH-'].update(disabled=False) if event == "-FLASH-": + if len(selected_devices) != 1: + sg.Popup('To flash select exactly 1 device.') + continue + dev = selected_devices[0] ver = values['-VERSION-'] t = values['-TYPE-'] - # print("Flashing", releases[ver][t]) flash_firmware(dev, releases[ver][t]) restart_hint() window['-CHECKBOX-{}-'.format(dev['path'])].update(False, disabled=True) From 6f5e6836d60062f7e2d9cffa6c10f1388c42d613 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Wed, 9 Aug 2023 08:52:39 +0800 Subject: [PATCH 2/4] qmk_gui: Condense design Signed-off-by: Daniel Schaefer --- qmk_gui.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/qmk_gui.py b/qmk_gui.py index 065e2e9..ba762b3 100755 --- a/qmk_gui.py +++ b/qmk_gui.py @@ -201,10 +201,17 @@ def main(devices): [sg.Button("Send Numlock Toggle", k='-NUMLOCK-TOGGLE-', disabled=True)], [sg.HorizontalSeparator()], - [sg.Text("BIOS Mode")], - [sg.Button("Enable", k='-BIOS-MODE-ENABLE-'), sg.Button("Disable", k='-BIOS-MODE-DISABLE-')], - [sg.Text("Factory Mode")], - [sg.Button("Enable", k='-FACTORY-MODE-ENABLE-'), sg.Button("Disable", k='-FACTORY-MODE-DISABLE-')], + [ + sg.Column([ + [sg.Text("BIOS Mode")], + [sg.Button("Enable", k='-BIOS-MODE-ENABLE-'), sg.Button("Disable", k='-BIOS-MODE-DISABLE-')], + ]), + sg.VSeperator(), + sg.Column([ + [sg.Text("Factory Mode")], + [sg.Button("Enable", k='-FACTORY-MODE-ENABLE-'), sg.Button("Disable", k='-FACTORY-MODE-DISABLE-')], + ]) + ], [sg.HorizontalSeparator()], [sg.Text("Save Settings")], From a7072a357f94591187431649dc711d0234c76534 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Wed, 9 Aug 2023 17:07:45 +0800 Subject: [PATCH 3/4] qmk_gui: Skip false positives on Linux Signed-off-by: Daniel Schaefer --- qmk_gui.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/qmk_gui.py b/qmk_gui.py index ba762b3..84a5b7b 100755 --- a/qmk_gui.py +++ b/qmk_gui.py @@ -459,6 +459,11 @@ def find_devs(show, verbose): if verbose: print("Usage Page not matching") continue + # Lots of false positives, so at least skip Framework false positives + if vid == FWK_VID and pid not in [0x12, 0x13, 0x14, 0x18, 0x19]: + if verbose: + print("False positive, device is not allowed") + continue fw_ver = device_dict["release_number"] From c56526c89416ef9da0335b84a10e6d433817b1a8 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Wed, 9 Aug 2023 17:07:55 +0800 Subject: [PATCH 4/4] qmk_gui: Update to v0.1.10 Signed-off-by: Daniel Schaefer --- qmk_gui.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qmk_gui.py b/qmk_gui.py index 84a5b7b..39637ef 100755 --- a/qmk_gui.py +++ b/qmk_gui.py @@ -16,7 +16,7 @@ # - Get current values # - Set sliders to current values -PROGRAM_VERSION = "0.1.9" +PROGRAM_VERSION = "0.1.10" FWK_VID = 0x32AC DEBUG_PRINT = False