mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-01 03:22:07 +08:00
op.sh: add 'op script' subcommand with som-debug (#37325)
* op: add som-debug command for SOM serial debug via panda * op: namespace som-debug under 'op script' subcommand
This commit is contained in:
+17
@@ -311,6 +311,19 @@ function op_ssh() {
|
||||
op_run_command tools/scripts/ssh.py "$@"
|
||||
}
|
||||
|
||||
function op_script() {
|
||||
op_before_cmd
|
||||
|
||||
case $1 in
|
||||
som-debug ) op_run_command panda/scripts/som_debug.sh "${@:2}" ;;
|
||||
* )
|
||||
echo -e "Unknown script '$1'. Available scripts:"
|
||||
echo -e " ${BOLD}som-debug${NC} SOM serial debug console via panda"
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
function op_check() {
|
||||
VERBOSE=1
|
||||
op_before_cmd
|
||||
@@ -441,6 +454,9 @@ function op_default() {
|
||||
echo -e " ${BOLD}adb${NC} Run adb shell"
|
||||
echo -e " ${BOLD}ssh${NC} comma prime SSH helper"
|
||||
echo ""
|
||||
echo -e "${BOLD}${UNDERLINE}Commands [Scripts]:${NC}"
|
||||
echo -e " ${BOLD}script${NC} Run a script (e.g. op script som-debug)"
|
||||
echo ""
|
||||
echo -e "${BOLD}${UNDERLINE}Commands [Testing]:${NC}"
|
||||
echo -e " ${BOLD}sim${NC} Run openpilot in a simulator"
|
||||
echo -e " ${BOLD}lint${NC} Run the linter"
|
||||
@@ -500,6 +516,7 @@ function _op() {
|
||||
post-commit ) shift 1; op_install_post_commit "$@" ;;
|
||||
adb ) shift 1; op_adb "$@" ;;
|
||||
ssh ) shift 1; op_ssh "$@" ;;
|
||||
script ) shift 1; op_script "$@" ;;
|
||||
* ) op_default "$@" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user