pounder_test/hitl/run.sh

30 lines
950 B
Bash
Raw Normal View History

2021-04-07 20:38:22 +08:00
#!/bin/bash
2021-04-06 19:28:07 +08:00
# Title:
# Stabilizer hardware-in-the-loop (HITL) test script.
#
# Description:
# This shell file is executed by the hardware runner in Quartiq's office to exercise the various
# hardware aspects of Stabilizer.
2021-04-07 20:31:49 +08:00
# Enable shell operating mode flags.
set -eux
2021-04-06 20:28:08 +08:00
# Set up python for testing
python3 -m venv --system-site-packages py
2021-04-07 21:09:34 +08:00
. py/bin/activate
python3 -m pip install -r requirements.txt
2021-04-06 20:28:08 +08:00
2021-04-09 19:43:15 +08:00
cargo flash --elf target/thumbv7em-none-eabihf/release/dual-iir --chip STM32H743ZITx
2021-04-09 19:35:23 +08:00
2021-04-06 19:28:07 +08:00
# Test pinging Stabilizer. This exercises that:
# * DHCP is functional and an IP has been acquired
# * Stabilizer's network is functioning as intended
# * The stabilizer application is operational
ping -c 5 -w 20 stabilizer-hitl
2021-04-06 19:28:07 +08:00
# Test the MQTT interface.
python3 miniconf.py dt/sinara/stabilizer afe/0='"G2"'
python3 miniconf.py dt/sinara/stabilizer afe/0='"G1"' iir_ch/0/0=\
'{"y_min": -32767, "y_max": 32767, "y_offset": 0, "ba": [1.0, 0, 0, 0, 0]}'