Skip to content

Commit

Permalink
check fi device connected in bt_ota_start
Browse files Browse the repository at this point in the history
  • Loading branch information
Eddie committed Sep 14, 2023
1 parent c3798ac commit bc35c6e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,11 @@ def openCloseRightBox():
self.ui.scannerSettigns.setMaximumHeight(1000000)
self.ui.scannerSettigns.show()

#hide unfinished sections
self.ui.btn_exit.hide()
self.ui.btn_save.hide()
self.ui.btn_widgets.hide()


# Set up the axes (assuming the chart is already set up in the .ui file)
self.axisX = QtCharts.QValueAxis()
Expand Down
4 changes: 4 additions & 0 deletions modules/btn_callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,10 @@ def load_bin(main_window):
logger.info(f"Error loading binary: {err}")

def start_ota(main_window):
logger = logging.getLogger("PDexLogger")
if main_window.connectedDevice.is_connected == False:
logger.info("No device connected")
return
main_window.connectedDevice.device_ota_update_start.emit(main_window.connectedDevice , main_window.fileName, main_window.fileLen, main_window.fileCrc32)

def register_button_callbacks(main_window):
Expand Down

0 comments on commit bc35c6e

Please sign in to comment.