systemetric / shepherd-2

A rewrite of shepherd
Apache License 2.0
4 stars 0 forks source link

USB sticks #11

Closed shardros closed 2 years ago

shardros commented 2 years ago

USB sticks behave as they do in shepherd-1

DONE IS:

  1. All of here is implemented: https://robocon.uk/docs/running-code-from-a-usb.html
  2. Zone detection from USB sticks works
  3. Tested on a brain

NOTES See here for shepherd-1 implementation: https://github.com/systemetric/shepherd/blob/28473503130cddd2c40702240f3deaad3a21e52b/shepherd/__init__.py#L56

shardros commented 2 years ago

This is essentially a brain issue, if we are on a brain then we want to write the logs to /media/RobotUSB/logs.txt otherwise we want to just write them to shepherd-2/logs.txt

This requires us to have an "on brain detection" mechism. When on a brain all of the issues about weather to write to a USB stick are handeled by: https://github.com/systemetric/RoboCon-brain-support-files/blob/main/scripts/2_Brain_config.sh

shardros commented 2 years ago

Will need to get hold a brain which has this behaviour to test it but the functionality should be there. Can't write automated tests without paddock