File tree 2 files changed +6
-5
lines changed
2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -237,7 +237,7 @@ def main_cli():
237
237
238
238
if not ports :
239
239
print ("No device found" )
240
- gui .popup (args . gui , "No device found" )
240
+ gui .popup ("No device found" , gui = args . gui )
241
241
sys .exit (1 )
242
242
elif args .serial_dev is not None :
243
243
filtered_devs = [
@@ -250,10 +250,10 @@ def main_cli():
250
250
dev = ports [0 ]
251
251
elif len (ports ) >= 1 and not args .gui :
252
252
gui .popup (
253
- args .gui ,
254
253
"More than 1 compatibles devices found. Please choose from the commandline with --serial-dev COMX.\n Connected ports:\n - {}" .format (
255
254
"\n - " .join ([port .device for port in ports ])
256
255
),
256
+ gui = args .gui ,
257
257
)
258
258
print (
259
259
"More than 1 compatible device found. Please choose with --serial-dev ..."
@@ -268,7 +268,7 @@ def main_cli():
268
268
269
269
if not args .gui and dev is None :
270
270
print ("No device selected" )
271
- gui .popup (args . gui , "No device selected" )
271
+ gui .popup ("No device selected" , gui = args . gui )
272
272
sys .exit (1 )
273
273
274
274
if args .bootloader :
Original file line number Diff line number Diff line change @@ -44,8 +44,9 @@ def update_brightness_slider(devices):
44
44
if average_brightness :
45
45
brightness_scale .set (average_brightness )
46
46
47
- def popup (message ):
48
- messagebox .showinfo ("Framework Laptop 16 LED Matrix" , message )
47
+ def popup (message , gui = True ):
48
+ if gui :
49
+ messagebox .showinfo ("Framework Laptop 16 LED Matrix" , message )
49
50
50
51
def run_gui (devices ):
51
52
root = tk .Tk ()
You can’t perform that action at this time.
0 commit comments