Skip to content

Commit c34d48c

Browse files
committed
Hardware definition file is now deleted from board when framework is 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.
1 parent f8356e6 commit c34d48c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

com/pycboard.py

+1
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ def load_framework(self):
276276
self.print('\nTransferring pyControl framework to pyboard.', end='')
277277
self.transfer_folder(dirs['framework'], file_type='py', show_progress=True)
278278
self.transfer_folder(dirs['devices'], files=['__init__.py'], remove_files=True, show_progress=True)
279+
self.remove_file('hardware_definition.py')
279280
self.make_device_class2file_map()
280281
error_message = self.reset()
281282
if not self.status['framework']:

0 commit comments

Comments
 (0)