按建议,继续完成后续工作
结论:tool_semantics 的 T/M6/G43/G49 canonical 子集已通过 rs274 -t -i 纳入 upstream side-by-side baseline,M61 host-state 行为继续由 standalone fixture 验证,完整 native probes 验证通过。
This commit is contained in:
@@ -31,6 +31,7 @@ FIXTURES=(
|
||||
spindle_orient
|
||||
state_tag_motion
|
||||
threading_sync
|
||||
tool_semantics
|
||||
tool_table_setup
|
||||
tool_reload
|
||||
)
|
||||
@@ -101,6 +102,11 @@ normalize_standalone_events() {
|
||||
next
|
||||
}
|
||||
|
||||
if (line == "CHANGE_TOOL") {
|
||||
print line
|
||||
next
|
||||
}
|
||||
|
||||
if (line ~ /^NURBS_G5_FEED /) {
|
||||
print "NURBS_G5_FEED"
|
||||
next
|
||||
@@ -217,6 +223,39 @@ normalize_standalone_events() {
|
||||
next
|
||||
}
|
||||
|
||||
if (line ~ /^SELECT_TOOL /) {
|
||||
split(line, fields, /[[:space:]]+/)
|
||||
for (i in fields) {
|
||||
split(fields[i], pair, "=")
|
||||
values[pair[1]] = pair[2]
|
||||
}
|
||||
print "SELECT_TOOL|" values["tool"]
|
||||
delete values
|
||||
next
|
||||
}
|
||||
|
||||
if (line ~ /^CHANGE_TOOL_NUMBER /) {
|
||||
split(line, fields, /[[:space:]]+/)
|
||||
for (i in fields) {
|
||||
split(fields[i], pair, "=")
|
||||
values[pair[1]] = pair[2]
|
||||
}
|
||||
print "CHANGE_TOOL_NUMBER|" values["pocket"]
|
||||
delete values
|
||||
next
|
||||
}
|
||||
|
||||
if (line ~ /^USE_TOOL_LENGTH_OFFSET /) {
|
||||
split(line, fields, /[[:space:]]+/)
|
||||
for (i in fields) {
|
||||
split(fields[i], pair, "=")
|
||||
values[pair[1]] = pair[2]
|
||||
}
|
||||
print "USE_TOOL_LENGTH_OFFSET|" norm(values["x"]) "|" norm(values["y"]) "|" norm(values["z"])
|
||||
delete values
|
||||
next
|
||||
}
|
||||
|
||||
if (line ~ /^(ENABLE|DISABLE)_SPEED_OVERRIDE /) {
|
||||
split(line, fields, /[[:space:]]+/)
|
||||
for (i in fields) {
|
||||
@@ -490,6 +529,11 @@ normalize_upstream_rs274_output() {
|
||||
next
|
||||
}
|
||||
|
||||
if (line == "CHANGE_TOOL()") {
|
||||
print "CHANGE_TOOL"
|
||||
next
|
||||
}
|
||||
|
||||
if (line ~ /^(MIST_ON|MIST_OFF|FLOOD_ON|FLOOD_OFF|ENABLE_FEED_OVERRIDE|DISABLE_FEED_OVERRIDE|DISABLE_ADAPTIVE_FEED|ENABLE_ADAPTIVE_FEED|DISABLE_FEED_HOLD|ENABLE_FEED_HOLD|PROGRAM_STOP|PROGRAM_END)\(\)$/) {
|
||||
value = line
|
||||
sub(/\(\)$/, "", value)
|
||||
@@ -562,6 +606,27 @@ normalize_upstream_rs274_output() {
|
||||
next
|
||||
}
|
||||
|
||||
if (line ~ /^SELECT_TOOL\(/) {
|
||||
args = args_of(line)
|
||||
print "SELECT_TOOL|" trim(args)
|
||||
next
|
||||
}
|
||||
|
||||
if (line ~ /^CHANGE_TOOL_NUMBER\(/) {
|
||||
args = args_of(line)
|
||||
print "CHANGE_TOOL_NUMBER|" trim(args)
|
||||
next
|
||||
}
|
||||
|
||||
if (line ~ /^USE_TOOL_LENGTH_OFFSET\(/) {
|
||||
args = args_of(line)
|
||||
split(args, groups, ",")
|
||||
gsub(/[[:space:]]+/, " ", groups[1])
|
||||
split(trim(groups[1]), offset, " ")
|
||||
print "USE_TOOL_LENGTH_OFFSET|" norm(offset[1]) "|" norm(offset[2]) "|" norm(offset[3])
|
||||
next
|
||||
}
|
||||
|
||||
if (line ~ /^(ENABLE|DISABLE)_SPEED_OVERRIDE\(/) {
|
||||
op = line
|
||||
sub(/\(.*/, "", op)
|
||||
@@ -760,7 +825,7 @@ for name in "${FIXTURES[@]}"; do
|
||||
fi
|
||||
|
||||
set +e
|
||||
if [[ "$name" == "tool_table_setup" ]]; then
|
||||
if [[ "$name" == "tool_table_setup" || "$name" == "tool_semantics" ]]; then
|
||||
"$UPSTREAM_RS274" -g -i "$TOOL_TABLE_INI" -t "$TOOL_TABLE_BASELINE" "$gcode_file" > "$native_raw" 2>&1
|
||||
else
|
||||
"$UPSTREAM_RS274" -g "$gcode_file" > "$native_raw" 2>&1
|
||||
@@ -782,6 +847,12 @@ for name in "${FIXTURES[@]}"; do
|
||||
mv "$TMP_DIR/$name.rs274.no-comments" "$native_norm"
|
||||
mv "$TMP_DIR/$name.expected.no-comments" "$expected_norm"
|
||||
fi
|
||||
if [[ "$name" == "tool_semantics" ]]; then
|
||||
grep -Ev '^(CHANGE_TOOL_NUMBER|MESSAGE\| tool after_m61)' "$native_norm" > "$TMP_DIR/$name.rs274.tool-subset"
|
||||
grep -Ev '^(CHANGE_TOOL_NUMBER|MESSAGE\| tool after_m61)' "$expected_norm" > "$TMP_DIR/$name.expected.tool-subset"
|
||||
mv "$TMP_DIR/$name.rs274.tool-subset" "$native_norm"
|
||||
mv "$TMP_DIR/$name.expected.tool-subset" "$expected_norm"
|
||||
fi
|
||||
if grep -Eq '^STRAIGHT_(TRAVERSE|FEED)$' "$expected_norm"; then
|
||||
sparse_ops_file="$TMP_DIR/$name.sparse_ops"
|
||||
grep -E '^STRAIGHT_(TRAVERSE|FEED)$' "$expected_norm" > "$sparse_ops_file"
|
||||
|
||||
Reference in New Issue
Block a user