Open osresearch opened 6 years ago
Currently supported:
static const struct {
const char * const cmd;
int (*handler)(const char ** argc, const int count);
const char * const help;
} gcode_handlers[] = {
{ "G0", gcode_g0, "Move rapid" },
{ "G1", gcode_g0, "Move linear" },
{ "M0", gcode_m0, "Emergency stop" },
{ "M17", gcode_m17, "Motors on" },
{ "M18", gcode_m0, "Motors off" },
{ "M114", gcode_m114, "Report position" },
{ "G92", gcode_g92, "Set position" },
{ "c", gcode_calibrate, "Calibrate encoder" },
{ "?", gcode_help, "Help" },
};
Should support:
G0
- Rapid positioningG1
- Linear positioningM3
- Spindle RPM (clockwise, switch to velocity mode)M4
- Spring RPM (anti-clockwise, switch to velocity mode)G90
- Set absolute modeG91
- Set relative modeG92
- Set current positionM17
- Steppers onM18
,M0
,M112
- Steppers off / e-stopM42
- Set I/O pinM92
- Set steps/mmM114
- Report current positionM500
- Save eeprom (direction + scale)M501
- Restore from eepromReference: https://reprap.org/wiki/G-code