workbench
workbench copied to clipboard
Help add your community scripts as easy Workbench commands!
I've started building the console
system in Workbench to be able to have an abstracted "script" library that allows us to run commands on the Workbench console.
The most complicated (and not really that complicated) is the Take a screenshot
command.
https://github.com/openpilot-community/workbench/blob/e62eca31b7e9b36019aaab39ea91616da29b1452/app/components/commands/take_screenshot.js#L4
Add a file like the one above with the basics of what needs to be ran and Workbench will combine them into 1 script.
Add the new command file to the index.js
found in the same directory.
If you need hooks to be called such as requireSu
just ensure those are put in place. Take a screenshot
requires you to type su -
first, and then run the commands.
After its finished, we need to perform an ssh-based file transfer of the saved image. This allows us to save it to the local computer quickly.
You can see an example of this here: https://github.com/openpilot-community/workbench/blob/e62eca31b7e9b36019aaab39ea91616da29b1452/app/sagas/eon_sagas.js#L121
As this evolves, we will need to make this more robust and less "if this than this" obviously... possibly will use a library of hook methods and things at some point down the road but for now its fine here.
I'm wanting your pull requests for these additions since I do not always use all these things.
Some ideas for you:
- Download latest drive before it uploads?
- Download all logs to your computer before upload?
- Install Auto-Delete Script?