Index: scripts/update_package_script/update_package.py =================================================================== diff -u -r4958f2a616031e26b9d0f662b4faca8b28832a53 -r167604cac199c133488d55eb0163e88eadd0e123 --- scripts/update_package_script/update_package.py (.../update_package.py) (revision 4958f2a616031e26b9d0f662b4faca8b28832a53) +++ scripts/update_package_script/update_package.py (.../update_package.py) (revision 167604cac199c133488d55eb0163e88eadd0e123) @@ -61,6 +61,8 @@ """ status = False self._reset_variables() + # Create the CAN listener list from the Leahi messages + self._utilities.clear_can_listener() # TODO how to read from a manifest file. Right now it is passed directly # TODO if stack to update and stack target are not provided, then just read through the manifest files if stack_to_update is not None and destination is not None: @@ -234,15 +236,12 @@ @return none """ - - # Reset firmware - # Wait for the bootloader to come up - # Start updating - list_of_binary_files = self._find_binary_files(packages_dir) if len(list_of_binary_files) == 0: exit(0) # No binary files to process - #self._handle_broadcast_message_thread(start_thread=True) + self._utilities.send_update_available_to_firmware_stacks() + self._handle_broadcast_message_thread(start_thread=True) + time.sleep(1.5) # Wait a while or have a broadcast check for binary_file in list_of_binary_files: # Make sure the file is opened a binary or hex if not binary_file.endswith(".bin") and not binary_file.endswith(".hex"): continue @@ -251,4 +250,4 @@ self._verify_stack_update() # TODO skip if the timeout or another error # Done with update binary files, stop sending the broadcast message - #self._handle_broadcast_message_thread(start_thread=False) + self._handle_broadcast_message_thread(start_thread=False)