13 lines
738 B
Bash
Executable File
13 lines
738 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
# Real USB sensor test. The executable only sends force-read requests.
|
|
# Example: ./script/test_px_6ax_gen3.sh --port /dev/ttyACM0 --duration-s 20 --mode sync
|
|
repo_root="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
build_dir="${CMVR_BUILD_DIR:-${repo_root}/cmake-build-debug}"
|
|
cmake --build "$build_dir" --target px_6ax_gen3_real_test -j 4
|
|
sensor_build_dir="$build_dir/cmvr-es/devices/dexhand/px_6ax_gen3"
|
|
# Put build libraries ahead of installed ones so this tests the current driver/proto.
|
|
exec env LD_LIBRARY_PATH="$build_dir:$sensor_build_dir:$build_dir/cmvr-es/hardware:$repo_root/output/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" \
|
|
"$sensor_build_dir/px_6ax_gen3_real_test" "$@"
|