Skip to content

Commit

Permalink
Make it clear that fw upgrade not possible using USB
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasdn committed Apr 12, 2021
1 parent 62d4303 commit 8197318
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/cfclient/ui/dialogs/bootloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,17 @@ def setUiState(self, state):
elif (state == self.UIState.FW_CONNECTED):
self._cold_boot_error_message = None
self.resetButton.setEnabled(False)
self.programButton.setEnabled(True)
self.setStatusLabel("Connected in firmware mode")
self.coldBootButton.setEnabled(False)
self.setSourceSelectionUiEnabled(True)
self._helper.connectivity_manager.set_enable(True)

if self._helper.cf.link_uri.startswith("usb://"):
self.programButton.setEnabled(False)
self.setStatusLabel("Connected using USB")
self.setSourceSelectionUiEnabled(False)
else:
self.programButton.setEnabled(True)
self.setStatusLabel("Connected in firmware mode")
self.setSourceSelectionUiEnabled(True)
elif (state == self.UIState.FW_SCANNING):
self._cold_boot_error_message = None
self.resetButton.setEnabled(False)
Expand Down

0 comments on commit 8197318

Please sign in to comment.