Skip to content

Commit

Permalink
Hardware definition file is now deleted from board when framework is …
Browse files Browse the repository at this point in the history
…loaded. The logic for this is that the devices folder on the pyboard is cleared on load framework, to revert the board to a default state with only the core pycontrol framework code installed, and this necessitates reloading the hardware definition anyway in order to reload the device files, so it is better to delete the hardware defintion file in order to generate an informative error message what a task requireing the hardware definition is run. Also this behaviour is consistent with load_framework resetting the board to a default state.
  • Loading branch information
ThomasAkam committed Nov 8, 2022
1 parent f8356e6 commit c34d48c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions com/pycboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ def load_framework(self):
self.print('\nTransferring pyControl framework to pyboard.', end='')
self.transfer_folder(dirs['framework'], file_type='py', show_progress=True)
self.transfer_folder(dirs['devices'], files=['__init__.py'], remove_files=True, show_progress=True)
self.remove_file('hardware_definition.py')
self.make_device_class2file_map()
error_message = self.reset()
if not self.status['framework']:
Expand Down

0 comments on commit c34d48c

Please sign in to comment.