3
3
It is a wrapper for u-blox's ubxfwupdate.exe. The actual updating is done by ubxfwupdate.exe.
4
4
This GUI checks which device you are trying to update before calling ubxfwupdate.exe.
5
5
This is to avoid you accidentally updating a NEO-D9S with ZED-F9P firmware and vice versa.
6
- (Don't worry if that happens. You can recover. But you need access to the SafeBoot pin to
6
+ (Don't worry if that happens. You can recover. But you may need access to the SafeBoot pin to
7
7
force the module into a safe state for re-updating.)
8
8
If you _really_ know what you are doing, you can disable this check with the "Override" option.
9
9
@@ -109,9 +109,9 @@ def __init__(self, parent: QWidget = None) -> None:
109
109
self .fis_browse_btn .setEnabled (True )
110
110
self .fis_browse_btn .pressed .connect (self .on_browse_fis_btn_pressed )
111
111
112
- # Clear ( Default FIS) Button
113
- self .clear_fis_btn = QPushButton (self .tr ('Default FIS' ))
114
- self .clear_fis_btn .clicked .connect (self .on_clear_fis_btn_pressed )
112
+ # Default FIS Button
113
+ self .default_fis_btn = QPushButton (self .tr ('Default FIS' ))
114
+ self .default_fis_btn .clicked .connect (self .on_default_fis_btn_pressed )
115
115
116
116
# Port Combobox
117
117
self .port_label = QLabel (self .tr ('COM Port:' ))
@@ -148,12 +148,13 @@ def __init__(self, parent: QWidget = None) -> None:
148
148
149
149
# Safeboot Button
150
150
self .safeboot_btn = QCheckBox (self .tr ('Enter Safeboot' ))
151
- self .safeboot_btn .setChecked (True )
151
+ self .safeboot_btn .setChecked (False )
152
152
self .safeboot_btn .toggled .connect (lambda :self .button_state (self .safeboot_btn ))
153
153
154
154
# Training Button
155
155
self .training_btn = QCheckBox (self .tr ('Training Sequence' ))
156
- self .training_btn .setChecked (True )
156
+ self .training_btn .setChecked (False )
157
+ self .training_btn .setEnabled (False )
157
158
158
159
# Reset After Button
159
160
self .reset_btn = QCheckBox (self .tr ('Reset After Update' ))
@@ -166,6 +167,7 @@ def __init__(self, parent: QWidget = None) -> None:
166
167
# No FIS Button
167
168
self .no_fis_btn = QCheckBox (self .tr ('No FIS' ))
168
169
self .no_fis_btn .setChecked (True )
170
+ self .no_fis_btn .toggled .connect (lambda :self .button_state (self .no_fis_btn ))
169
171
170
172
# Override Button
171
173
self .override_btn = QCheckBox (self .tr ('Override' ))
@@ -191,7 +193,7 @@ def __init__(self, parent: QWidget = None) -> None:
191
193
layout .addWidget (self .fis_label , 2 , 0 )
192
194
layout .addWidget (self .fisLocation_lineedit , 2 , 1 )
193
195
layout .addWidget (self .fis_browse_btn , 2 , 2 )
194
- layout .addWidget (self .clear_fis_btn , 2 , 3 )
196
+ layout .addWidget (self .default_fis_btn , 2 , 3 )
195
197
layout .addWidget (self .no_fis_btn , 2 , 4 )
196
198
197
199
layout .addWidget (self .port_label , 3 , 0 )
@@ -231,6 +233,11 @@ def button_state(self, b) -> None:
231
233
elif b .text () == "Override" :
232
234
if b .isChecked () == True :
233
235
self .show_warning_message (">>>>> Override enabled <<<<<\n Firmware version check is disabled" )
236
+ elif b .text () == "No FIS" :
237
+ if b .isChecked () == True :
238
+ self .fisLocation_lineedit .clear ()
239
+ else :
240
+ self .show_warning_message (">>> Expert users only <<<\n \" No FIS\" is recommended" )
234
241
235
242
def writeMessage (self , msg ) -> None :
236
243
self .messageBox .moveCursor (QTextCursor .End )
@@ -279,6 +286,8 @@ def _load_settings(self) -> None:
279
286
self .fisLocation_lineedit .setText (lastFile )
280
287
if self .theFisName != '' :
281
288
self .no_fis_btn .setChecked (False )
289
+ else :
290
+ self .no_fis_btn .setChecked (True )
282
291
else :
283
292
self .fisLocation_lineedit .clear ()
284
293
self .no_fis_btn .setChecked (True )
@@ -397,11 +406,13 @@ def on_browse_fis_btn_pressed(self) -> None:
397
406
if fileName :
398
407
self .fisLocation_lineedit .setText (fileName )
399
408
self .no_fis_btn .setChecked (False )
409
+ self .show_warning_message (">>> Expert users only <<<\n \" No FIS\" is recommended" )
400
410
401
- def on_clear_fis_btn_pressed (self ) -> None :
402
- """Clear the FIS filename."""
403
- self .fisLocation_lineedit .clear ( )
411
+ def on_default_fis_btn_pressed (self ) -> None :
412
+ """Set the FIS filename to Default FIS ."""
413
+ self .fisLocation_lineedit .setText ( "Default FIS" )
404
414
self .no_fis_btn .setChecked (False )
415
+ self .show_warning_message (">>> Expert users only <<<\n \" No FIS\" is recommended" )
405
416
406
417
def update_finished (self ) -> None :
407
418
"""The update QProcess has finished."""
@@ -443,10 +454,13 @@ def on_upload_btn_pressed(self) -> None:
443
454
return
444
455
f .close ()
445
456
446
- if self .theFisName != '' :
457
+ if self .no_fis_btn . isChecked () == False :
447
458
fisExists = False
459
+ filename = self .theFisName
460
+ if filename == "Default FIS" :
461
+ filename = resource_path ("flash.xml" )
448
462
try :
449
- f = open (self . theFisName )
463
+ f = open (filename )
450
464
fisExists = True
451
465
except IOError :
452
466
fisExists = False
@@ -537,7 +551,7 @@ def on_upload_btn_pressed(self) -> None:
537
551
538
552
if self .no_fis_btn .isChecked () == True :
539
553
command .extend (["--no-fis" , "1" ])
540
- elif self .fisLocation_lineedit . text () == '' :
554
+ elif ( self .theFisName == '' ) or ( self . theFisName == "Default FIS" ) :
541
555
command .extend (["-F" , resource_path ("flash.xml" )])
542
556
else :
543
557
command .extend (["-F" , self .theFisName ])
0 commit comments