summaryrefslogtreecommitdiff
path: root/tests/t0/subs/M100
blob: b32c24334388a82f817518815f9cb6d98dafe4f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
#
# This script (M100) is called to log the current coordinates and the
# current tool number and Tool Length Offset information to a log file,
# for testing purposes
#

TEST_DIR=$(dirname INI_FILE_NAME)
OUT_FILE=$TEST_DIR/gcode-output

P=$1
Q=$2

#echo P is $P >> $OUT_FILE
#echo Q is $Q >> $OUT_FILE

case $P in
    0.000000) echo "X = $Q" >> $OUT_FILE;;
    1.000000) echo "Y = $Q" >> $OUT_FILE;;
    2.000000) echo "Z = $Q" >> $OUT_FILE;;
    3.000000) echo "toolno = $Q" >> $OUT_FILE;;
    4.000000) echo "tlo_z = $Q" >> $OUT_FILE;;
    5.000000) echo "" >> $OUT_FILE;;
    6.000000) echo "sequence number $Q" >> $OUT_FILE;;
    *)
        echo "unknown P=$P (Q=$Q)" >> $OUT_FILE
        exit 1;;
esac