Skip to content
Snippets Groups Projects
Unverified Commit c963f8db authored by Jake Drahos's avatar Jake Drahos
Browse files

Merge remote-tracking branch 'origin/master' into commands-dev-backend

parents 54862713 52a6e535
No related branches found
No related tags found
No related merge requests found
lat p 1.0
lat i 1.0
lat d 1.0
long p 1.0
long i 1.0
long d 1.0
height p 1.0
height i 1.0
height d 1.0
pitch p 1.0
pitch i 1.0
pitch d 1.0
roll p 1.0
roll i 1.0
roll d 1.0
yaw p 1.0
yaw i 1.0
yaw d 1.0
pitchv p 1.0
pitchv i 1.0
pitchv d 1.0
rollv p 1.0
rollv i 1.0
rollv d 1.0
yawv p 1.0
yawv i 1.0
yawv d 1.0
#!/bin/bash
# Use default filename if it wasn't given at the command line
if [ $# -eq 0 ]; then
filename="scripts/parameters.txt"
else
filename=$1
fi
# Define the regular expression used for grep to define accepted line
regex='(lat|long|height|pitch|roll|yaw|pitchv|rollv|yawv) (p|i|d) ([-+]?[0-9]*\.?[0-9]+)'
# the awk program to assemble the correct pieces of the string for a ./Cli call
awk_prog='{print "./Cli setpid" " " "--" $1 " " "-" $2 " " $3}'
# Search, parse, and execute ./Cli commands
grep -E "$regex" $filename | awk "$awk_prog" | bash
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment