fix: handle ATC,ON/OFF header command in Excellon drill files (#93)#326
Open
rampageservices wants to merge 3 commits intogerbv:developfrom
Open
fix: handle ATC,ON/OFF header command in Excellon drill files (#93)#326rampageservices wants to merge 3 commits intogerbv:developfrom
rampageservices wants to merge 3 commits intogerbv:developfrom
Conversation
drill_parse_header_is_inch() and drill_parse_header_is_metric() set state->unit unconditionally, overwriting user-supplied unit settings even when autodetect is disabled (state->autod == 0). The M-code handlers (DRILL_M_IMPERIAL, DRILL_M_METRIC) already guard their unit assignments with if(state->autod). Apply the same guard to the header parsing functions for consistency. Fixes gerbv#241
Zuken CR-8000 emits an ATC (automatic tool change) command in the Excellon header. Previously this fell through to the default case and was logged as "Undefined code 'A' (0x41)", which is misleading for a valid, well-known machine command. Add a case 'A' handler that recognizes ATC,ON and ATC,OFF, logs them as NOTE level (silently ignored, no visual effect), and reports unrecognized 'A' strings as errors. Fixes the ATC portion of gerbv#93.
This was referenced Mar 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
case 'A'handler in the main parse loop to recognizeATC,ONandATC,OFF(automatic tool change) commandsDETECT,ON/DETECT,OFFhandler undercase 'D'Partially fixes #93 (the ATC portion). The M06 portion is addressed by #306.
Note: the test file attached to #93 (
drill.zip) only contains a.fdldrill listing document, not the actual.fdrExcellon file. Tested with a hand-crafted Excellon file containingATC,ONin the header.Test plan
makebuilds cleanly with no warningsmake check— 92 passed, 12 failed (matches develop baseline)ATC,ONparses without errors