#!/usr/bin/env bash # Launch fire_gimbal_control, resolving the binary relative to this script so it # works regardless of where the repo is checked out. Extra args are forwarded. # # scripts/run.sh # real deployment # scripts/run.sh --mock-serial --mock-camera --no-mqtt # dev, no hardware # # Homing and the start mode come from config.ini [Startup] home / mode. The # firmware keeps nothing across a power cycle, so without home = true the axes # stay in RESET and refuse every move. set -euo pipefail here="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" bin="" for cand in "$here/../build/fire_gimbal_control" "$here/fire_gimbal_control" \ "$here/../fire_gimbal_control"; do if [[ -x "$cand" ]]; then bin="$cand"; break; fi done if [[ -z "$bin" ]]; then echo "fire_gimbal_control binary not found. Build it first:" >&2 echo " cmake -B build && cmake --build build" >&2 exit 1 fi exec "$bin" "$@"