Acknowledge machine-only Excellon G/M-codes#306
Open
rampageservices wants to merge 1 commit intogerbv:developfrom
Open
Acknowledge machine-only Excellon G/M-codes#306rampageservices wants to merge 1 commit intogerbv:developfrom
rampageservices wants to merge 1 commit intogerbv:developfrom
Conversation
Machine-only G-codes (G07, G34-G39, G40-G42, G45-G48, G81-G84) and M-codes (M06, M08, M09, M50-M52, M60-M63) control physical machine behavior with no visual representation. Previously these fell through to the default case and were logged as errors, which is misleading for valid, well-known commands. Add explicit case handlers that log at GERBV_MESSAGE_NOTE level, consume trailing parameters with eat_line(), and count under grouped G_machine_only/M_machine_only stats counters shown in the analysis dialog. Ref: gerbv#297
7 tasks
This was referenced Mar 1, 2026
rampageservices
added a commit
to SourceParts/gerbv
that referenced
this pull request
Mar 5, 2026
Two drill parser fixes: 1. T0 with inline C diameter parameter (e.g. T0C0.006) now has the parameter consumed instead of leaving it in the stream. Previously the parser returned immediately on tool 0, causing the trailing C parameter to be reported as an undefined header code. This is standard Excellon emitted by ekf2 and others. 2. Unrecognised header commands (vendor-specific directives like R,H and / from Veribest CAD) are downgraded from ERROR to NOTE. These are harmless unknowns that don't affect rendering, consistent with the precedent in gerbv#306 for unknown G/M machine codes. Undefined characters in the data section remain at ERROR.
This was referenced Mar 5, 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
casehandlers for 17 G-codes and 10 M-codes that control physical machine behavior (vision systems, cutter compensation, peck drilling, etc.) with no visual representationGERBV_MESSAGE_NOTElevel instead of falling through todefault:which incorrectly reports them asGERBV_MESSAGE_ERRORG_machine_only/M_machine_onlystats counters shown in the analysis dialogG-codes (17): G07, G34–G39, G40–G42, G45–G48, G81–G84
M-codes (10): M06, M08, M09, M50–M52, M60–M63
Per-code stats counters are possible if the maintainer or community wants more granularity, but grouped counters keep the struct small for codes that have no visual effect.
Codes with real implementations on other branches (G02/G03 #298, G87 #300, M70/M80/M90 #301, M25/M01/M02 #304) are excluded. M99 (user defined pattern) is also excluded as it may have future implementation potential.
Test plan
cmake --build build— clean build, zero warningsctest— all existing tests pass (94/104, 10 pre-existing image comparison mismatches identical to develop).excfile with machine-only codes produces NOTE-level messages, not ERRORRef: #297