feat: complete LinuxCNC G-code and M-code coverage - #155
Merged
Merged
Conversation
Adds 40 missing G-codes and 20 missing M-codes to the LinuxCNC dialect database, bringing it to full parity with the official LinuxCNC command set. New G-codes: G5/G5.1/G5.2/G5.3 (spline/NURBS), G7/G8 (lathe diameter/radius mode), G17.1/G18.1/G19.1 (UV/UW/VW planes), G28.1/G30.1 (store predefined positions), G33/G33.1 (spindle-sync motion and rigid tapping), G38.2–G38.5 (probing), G41.1/G42.1 (dynamic cutter comp), G43.1/G43.2 (dynamic/additive tool length offset), G52/G53 (local offset and machine coords), G59.1–G59.3 (WCS 7–9), G61/G61.1/G64 (path control modes), G70/G71/G72/G76 (lathe cycles), G73/G74 (chip-break and left-hand tapping), G90.1/G91.1 (arc center mode), G92.1–G92.3 (G92 offset control), G93 (inverse-time feed), G96/G97 (constant surface speed and RPM). New M-codes: M19 (orient spindle), M48/M49 (enable/disable overrides), M50–M53 (individual override controls), M60 (pallet change pause), M61 (set current tool), M62–M68 (digital/analog I/O), M70–M73 (modal state save/restore). New CommandGroup enum values: ARC_MODE, IO, LATHE, LATHE_CYCLE, OVERRIDES, PATH_CONTROL, PROBING, SPINDLE_MODE, SPINDLE_SYNC, STATE.
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.
Description
Brings the LinuxCNC dialect database to full parity with the official LinuxCNC command set. Previously only ~40 of the ~100 supported commands had hover documentation and completions. This adds the remaining 60 commands across G-codes and M-codes, and introduces 10 new
CommandGroupcategories to properly classify them.Type of Change
Related Issues
N/A
Changes Made
src/databases/types.tsCommandGroupenum values (alphabetically sorted):ARC_MODE,IO,LATHE,LATHE_CYCLE,OVERRIDES,PATH_CONTROL,PROBING,SPINDLE_MODE,SPINDLE_SYNC,STATEGROUP_SORT_ORDERsrc/databases/dialects/LinuxcncGCodeCommandDatabase.ts— 40 new G-codes:src/databases/dialects/LinuxcncGCodeCommandDatabase.ts— 20 new M-codes:Testing
npm test— 1389 tests, 83 suites, all green)npm run build)Checklist
tsc --noEmitin the pre-commit hook)npm run build)Additional Notes
The
CommandGroupenum is now sorted alphabetically. TheGROUP_SORT_ORDERrecord requires all enum values as keys (enforced by TypeScript'sRecord<CommandGroup, string>type), so the compiler would catch any missing entries.