]> rtime.felk.cvut.cz Git - eurobot/public.git/blob - src/odometry/check-hal
Update Makefile.rules to support .cpp extension of C++ sources
[eurobot/public.git] / src / odometry / check-hal
1 #!/bin/sh
2
3 # This script checks the order of values read from HAL sensors when motor
4 # rotates two turns in one directrion and two turns in the oposite direction.
5
6 D=/dev/ttyUSB0
7
8 stty -F $D -crtscts -ixon -ixoff 19200
9
10 echo > $D
11 sleep 0.1
12 echo > $D
13 sleep 0.1
14 echo -n 'hal' > $D
15 sleep 0.1
16 echo -n 'test' > $D
17 sleep 0.1
18 echo ' 1' > $D
19 awk '{ if ($2 != last) { printf("* %05d 0x%02x (%s)\n",$1,$2,$0); last=$2; }}' < $D