How khayreddine-zomita/grblhal-cutter-compensation works
This is a grblHAL Teensy 4 CNC-controller repository, described by its README as a test repository for diameter cutter compensation (G41/G42). The intended user-facing flow is G-code execution with cutter compensation affecting programmed motion, but the supplied excerpts do not show the runtime registration or call path joining those stages. The graph therefore highlights the documented capability and the main controller/runtime layers without asserting unverified calls. Relationships are limited to README statements and visible source-index references; unsampled implementation details are not treated as inspected.
Main entry points: gcode.c G-code interpreter · cutter_comp.c Cutter compensation · fs_handlers.c Web file handlers · main.c Firmware entry
Components 19
CNC motion
- G-code interpreter
grblHAL_Teensy4/src/grbl/gcode.c - Cutter compensation
grblHAL_Teensy4/src/grbl/grblHALCutterComp/cutter_comp.c - Motion control
grblHAL_Teensy4/src/grbl/motion_control.c - Motion planner
grblHAL_Teensy4/src/grbl/planner.c - Stepper execution
grblHAL_Teensy4/src/grbl/stepper.c
Controller core
- Execution protocol
grblHAL_Teensy4/src/grbl/protocol.c - Machine state
grblHAL_Teensy4/src/grbl/state_machine.c - Settings
grblHAL_Teensy4/src/grbl/settings.c - Reports
grblHAL_Teensy4/src/grbl/report.c - Firmware entry
grblHAL_Teensy4/src/main.c - grblHAL core library
grblHAL_Teensy4/src/grbl/grbllib.c
Teensy platform
- Hardware interface
grblHAL_Teensy4/src/grbl/hal.h - Teensy driver
grblHAL_Teensy4/src/driver.h
Interfaces and services
- Virtual filesystem
grblHAL_Teensy4/src/grbl/vfs.h - Web UI backend
grblHAL_Teensy4/src/webui/server.c - Web file handlers
grblHAL_Teensy4/src/webui/fs_handlers.c - Networking
grblHAL_Teensy4/src/networking/networking.c - Modbus TCP client
grblHAL_Teensy4/src/networking/modbus/client.c
Other components
- CNC operator
Connections 7
- CNC operator → G-code interpreter: provides program
- G-code interpreter → Cutter compensation: uses compensation
- Cutter compensation → Motion control: adjusts motion
- Firmware entry → grblHAL core library: calls
grblHAL_Teensy4/src/main.c - Web UI backend → Web file handlers: uses handlers
grblHAL_Teensy4/src/webui/server.c - Web file handlers → Virtual filesystem: uses VFS
grblHAL_Teensy4/src/webui/fs_handlers.c - Modbus TCP client → Networking: uses networking
grblHAL_Teensy4/src/networking/modbus/client.c