add build run scripts
This commit is contained in:
31
run_di1_group_avg.sh
Executable file
31
run_di1_group_avg.sh
Executable file
@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
cd "$SCRIPT_DIR"
|
||||
|
||||
BIN="${BIN:-./main.exe}"
|
||||
TTY_PATH="${TTY_PATH:-/tmp/ttyADC_data}"
|
||||
CSV_PATH="${CSV_PATH:-capture.csv}"
|
||||
SVG_PATH="${SVG_PATH:-capture.svg}"
|
||||
|
||||
if [[ ! -x "$BIN" ]]; then
|
||||
echo "Binary '$BIN' not found or not executable. Run ./build_main.sh first." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exec "$BIN" \
|
||||
clock:internal \
|
||||
internal_ref_hz:2000000 \
|
||||
start:di_syn2_rise \
|
||||
stop:di_syn2_fall \
|
||||
sample_clock_hz:max \
|
||||
range:0.2 \
|
||||
di1:trace \
|
||||
di1_group_avg \
|
||||
duration_ms:100 \
|
||||
packet_limit:0 \
|
||||
"tty:${TTY_PATH}" \
|
||||
"csv:${CSV_PATH}" \
|
||||
"svg:${SVG_PATH}" \
|
||||
"$@"
|
||||
Reference in New Issue
Block a user