From 5a93198f6ad1538a51b71e42649907ddde366e04 Mon Sep 17 00:00:00 2001 From: Joseph Coffland Date: Wed, 6 Jul 2016 04:42:52 -0700 Subject: [PATCH] Clean up --- src/axes.c | 2 +- src/config.h | 4 ++-- src/gcode_parser.c | 12 +++++----- src/homing.c | 2 +- src/huanyang.h | 2 +- src/{canonical_machine.c => machine.c} | 32 ++++++++++++++------------ src/{canonical_machine.h => machine.h} | 32 +++++++++++++------------- src/main.c | 9 +++----- src/plan/arc.c | 12 +++++----- src/plan/buffer.h | 4 ++-- src/plan/calibrate.c | 2 +- src/plan/command.c | 6 ++--- src/plan/dwell.c | 2 +- src/plan/exec.c | 2 +- src/plan/feedhold.h | 1 - src/plan/jog.c | 2 +- src/plan/line.c | 2 +- src/plan/planner.c | 8 +++---- src/plan/planner.h | 2 +- src/probing.c | 2 +- src/pwm_spindle.h | 2 +- src/spindle.h | 2 +- src/stepper.c | 2 +- src/switch.c | 2 +- src/tmc2660.c | 2 +- 25 files changed, 74 insertions(+), 76 deletions(-) rename src/{canonical_machine.c => machine.c} (98%) rename src/{canonical_machine.h => machine.h} (96%) diff --git a/src/axes.c b/src/axes.c index 93684d1..fb727ba 100644 --- a/src/axes.c +++ b/src/axes.c @@ -26,7 +26,7 @@ \******************************************************************************/ -#include "canonical_machine.h" +#include "machine.h" uint8_t get_axis_mode(int axis) { diff --git a/src/config.h b/src/config.h index 124c4c9..e737bd7 100644 --- a/src/config.h +++ b/src/config.h @@ -169,7 +169,7 @@ typedef enum { #define VELOCITY_MAX 13000 // mm/min #define FEEDRATE_MAX VELOCITY_MAX -#define X_AXIS_MODE AXIS_STANDARD // See canonical_machine.h +#define X_AXIS_MODE AXIS_STANDARD // See machine.h #define X_VELOCITY_MAX VELOCITY_MAX // G0 max velocity in mm/min #define X_FEEDRATE_MAX FEEDRATE_MAX // G1 max feed rate in mm/min #define X_TRAVEL_MIN 0 // minimum travel for soft limits @@ -265,7 +265,7 @@ typedef enum { // Gcode defaults #define GCODE_DEFAULT_UNITS MILLIMETERS // MILLIMETERS or INCHES -#define GCODE_DEFAULT_PLANE CANON_PLANE_XY // See canonical_machine.h +#define GCODE_DEFAULT_PLANE PLANE_XY // See machine.h #define GCODE_DEFAULT_COORD_SYSTEM G54 // G54, G55, G56, G57, G58 or G59 #define GCODE_DEFAULT_PATH_CONTROL PATH_CONTINUOUS #define GCODE_DEFAULT_DISTANCE_MODE ABSOLUTE_MODE diff --git a/src/gcode_parser.c b/src/gcode_parser.c index 340ed0b..d00e2dd 100644 --- a/src/gcode_parser.c +++ b/src/gcode_parser.c @@ -28,7 +28,7 @@ #include "gcode_parser.h" -#include "canonical_machine.h" +#include "machine.h" #include "spindle.h" #include "probing.h" #include "homing.h" @@ -195,7 +195,7 @@ static stat_t _validate_gcode_block() { /* Execute parsed block * - * Conditionally (based on whether a flag is set in gf) call the canonical + * Conditionally (based on whether a flag is set in gf) call the * machining functions in order of execution as per RS274NGC_3 table 8 * (below, with modifications): * @@ -228,7 +228,7 @@ static stat_t _validate_gcode_block() { * 21. stop and end (M0, M1, M2, M30, M60) * * Values in gn are in original units and should not be unit converted prior - * to calling the canonical functions (which do the unit conversions) + * to calling the machine functions (which do the unit conversions) */ static stat_t _execute_gcode_block() { stat_t status = STAT_OK; @@ -378,9 +378,9 @@ static stat_t _parse_gcode_block(char *buf) { case 4: SET_NON_MODAL(next_action, NEXT_ACTION_DWELL); case 10: SET_MODAL(MODAL_GROUP_G0, next_action, NEXT_ACTION_SET_COORD_DATA); - case 17: SET_MODAL(MODAL_GROUP_G2, select_plane, CANON_PLANE_XY); - case 18: SET_MODAL(MODAL_GROUP_G2, select_plane, CANON_PLANE_XZ); - case 19: SET_MODAL(MODAL_GROUP_G2, select_plane, CANON_PLANE_YZ); + case 17: SET_MODAL(MODAL_GROUP_G2, select_plane, PLANE_XY); + case 18: SET_MODAL(MODAL_GROUP_G2, select_plane, PLANE_XZ); + case 19: SET_MODAL(MODAL_GROUP_G2, select_plane, PLANE_YZ); case 20: SET_MODAL(MODAL_GROUP_G6, units_mode, INCHES); case 21: SET_MODAL(MODAL_GROUP_G6, units_mode, MILLIMETERS); case 28: diff --git a/src/homing.c b/src/homing.c index acded39..a9efd44 100644 --- a/src/homing.c +++ b/src/homing.c @@ -26,7 +26,7 @@ \******************************************************************************/ -#include "canonical_machine.h" +#include "machine.h" #include "switch.h" #include "util.h" #include "report.h" diff --git a/src/huanyang.h b/src/huanyang.h index 60d5bbf..fce7aa0 100644 --- a/src/huanyang.h +++ b/src/huanyang.h @@ -27,7 +27,7 @@ #pragma once -#include "canonical_machine.h" +#include "machine.h" void huanyang_init(); diff --git a/src/canonical_machine.c b/src/machine.c similarity index 98% rename from src/canonical_machine.c rename to src/machine.c index 9f06ac8..cdbe35b 100644 --- a/src/canonical_machine.c +++ b/src/machine.c @@ -28,9 +28,9 @@ \******************************************************************************/ /* This code is a loose implementation of Kramer, Proctor and Messina's - * canonical machining functions as described in the NIST RS274/NGC v3 + * machining functions as described in the NIST RS274/NGC v3 * - * The canonical machine is the layer between the Gcode parser and + * The machine is the layer between the Gcode parser and * the motion control code for a specific robot. It keeps state and * executes commands - passing the stateless commands to the motion * planning layer. @@ -66,7 +66,7 @@ * executed locally and have no buffer. */ -#include "canonical_machine.h" +#include "machine.h" #include "config.h" #include "stepper.h" @@ -200,7 +200,7 @@ static void _exec_flood_coolant_control(float *value, float *flag); static void _exec_absolute_origin(float *value, float *flag); static void _exec_program_finalize(float *value, float *flag); -// Canonical Machine State functions +// Machine State functions /// Combines raw states into something a user might want to see cmCombinedState_t cm_get_combined_state() { @@ -227,7 +227,7 @@ cmHomingState_t cm_get_homing_state() {return cm.homing_state;} cmMotionMode_t cm_get_motion_mode() {return cm.gm.motion_mode;} cmCoordSystem_t cm_get_coord_system() {return cm.gm.coord_system;} cmUnitsMode_t cm_get_units_mode() {return cm.gm.units_mode;} -cmCanonicalPlane_t cm_get_select_plane() {return cm.gm.select_plane;} +cmPlane_t cm_get_select_plane() {return cm.gm.select_plane;} cmPathControlMode_t cm_get_path_control() {return cm.gm.path_control;} cmDistanceMode_t cm_get_distance_mode() {return cm.gm.distance_mode;} cmFeedRateMode_t cm_get_feed_rate_mode() {return cm.gm.feed_rate_mode;} @@ -302,7 +302,7 @@ void cm_set_axis_jerk(uint8_t axis, float jerk) { /* * Notes on Coordinate System and Offset functions * - * All positional information in the canonical machine is kept as + * All positional information in the machine is kept as * absolute coords and in canonical units (mm). The offsets are only * used to translate in and out of canonical form during * interpretation and response. @@ -320,7 +320,7 @@ void cm_set_axis_jerk(uint8_t axis, float jerk) { * supposed to be persistent. * * To reduce complexity and data load the following is done: - * - Full data for coordinates/offsets is only accessible by the canonical + * - Full data for coordinates/offsets is only accessible by the * machine, not the downstream * - Resolved set of coord and G92 offsets, with per-move exceptions can * be captured as "work_offsets" @@ -388,7 +388,7 @@ float cm_get_work_position(uint8_t axis) { /* Critical helpers * - * Core functions supporting the canonical machining functions + * Core functions supporting the machining functions * These functions are not part of the NIST defined functions */ @@ -396,7 +396,7 @@ float cm_get_work_position(uint8_t axis) { * * These routines set the point position in the gcode model. * - * Note: As far as the canonical machine is concerned the final + * Note: As far as the machine is concerned the final * position of a Gcode block (move) is achieved as soon as the move is * planned and the move target becomes the new model position. In * reality the planner will (in all likelihood) have only just queued @@ -454,7 +454,7 @@ void cm_finalize_move() { * nominally a steady rate which may be set by the user. In the * Interpreter, the interpretation of the feed rate is as follows * unless inverse time feed rate mode is being used in the - * RS274/NGC view (see Section 3.5.19). The canonical machining + * RS274/NGC view (see Section 3.5.19). The machining * functions view of feed rate, as described in Section 4.3.5.1, * has conditions under which the set feed rate is applied * differently, but none of these is used in the Interpreter. @@ -625,7 +625,7 @@ stat_t cm_test_soft_limits(float target[]) { } -/* Canonical machining functions +/* machining functions * Values are passed in pre-unit_converted state (from gn structure) * All operations occur on gm (current model state) * @@ -635,7 +635,7 @@ stat_t cm_test_soft_limits(float target[]) { // Initialization and Termination (4.3.2) -void canonical_machine_init() { +void machine_init() { // Init 1/jerk for (uint8_t axis = 0; axis < AXES; axis++) cm.a[axis].recip_jerk = 1 / (cm.a[axis].jerk_max * JERK_MULTIPLIER); @@ -678,7 +678,7 @@ stat_t cm_clear() { // These functions assume input validation occurred upstream. /// G17, G18, G19 select axis plane -void cm_set_plane(cmCanonicalPlane_t plane) {cm.gm.select_plane = plane;} +void cm_set_plane(cmPlane_t plane) {cm.gm.select_plane = plane;} /// G20, G21 @@ -1137,7 +1137,7 @@ void cm_request_cycle_start() {cm.cycle_start_requested = true;} /// Process feedholds, cycle starts & queue flushes -void cm_feedhold_sequencing_callback() { +void cm_feedhold_callback() { if (cm.feedhold_requested) { if (cm.motion_state == MOTION_RUN && cm.hold_state == FEEDHOLD_OFF) { cm_set_motion_state(MOTION_HOLD); @@ -1167,6 +1167,8 @@ void cm_feedhold_sequencing_callback() { cm_cycle_start(); mp_end_hold(); } + + mp_plan_hold_callback(); } @@ -1193,7 +1195,7 @@ stat_t cm_queue_flush() { * The END behaviors are defined by NIST 3.6.1 are: * 1. Axis offsets are set to zero (like G92.2) and origin offsets are set * to the default (like G54) - * 2. Selected plane is set to CANON_PLANE_XY (like G17) + * 2. Selected plane is set to PLANE_XY (like G17) * 3. Distance mode is set to MODE_ABSOLUTE (like G90) * 4. Feed rate mode is set to UNITS_PER_MINUTE (like G94) * 5. Feed and speed overrides are set to ON (like M48) diff --git a/src/canonical_machine.h b/src/machine.h similarity index 96% rename from src/canonical_machine.h rename to src/machine.h index dc23e38..300c942 100644 --- a/src/canonical_machine.h +++ b/src/machine.h @@ -44,7 +44,7 @@ /* Machine state model * - * The following main variables track canonical machine state and state + * The following main variables track machine state and state * transitions. * - cm.machine_state - overall state of machine and program execution * - cm.cycle_state - what cycle the machine is executing (or none) @@ -204,12 +204,12 @@ typedef enum { // Used for detecting gcode errors. See NIST section 3.4 // Note 1: Our G0 omits G4,G30,G53,G92.1,G92.2,G92.3 as these have no axis // components to error check -typedef enum { // canonical plane - translates to: +typedef enum { // plane - translates to: // axis_0 axis_1 axis_2 - CANON_PLANE_XY, // G17 X Y Z - CANON_PLANE_XZ, // G18 X Z Y - CANON_PLANE_YZ // G19 Y Z X -} cmCanonicalPlane_t; + PLANE_XY, // G17 X Y Z + PLANE_XZ, // G18 X Z Y + PLANE_YZ // G19 Y Z X +} cmPlane_t; typedef enum { @@ -306,8 +306,8 @@ typedef enum { * - gm is the core Gcode model state. It keeps the internal gcode * state model in normalized, canonical form. All values are unit * converted (to mm) and in the machine coordinate system - * (absolute coordinate system). Gm is owned by the canonical - * machine layer and should be accessed only through cm_ routines. + * (absolute coordinate system). Gm is owned by the machine layer and + * should be accessed only through cm_ routines. * * - gn is used by the gcode interpreter and is re-initialized for * each gcode block.It accepts data in the new gcode block in the @@ -317,7 +317,7 @@ typedef enum { * * - gf is used by the gcode parser interpreter to hold flags for any * data that has changed in gn during the parse. cm.gf.target[] - * values are also used by the canonical machine during + * values are also used by the machine during * set_target(). */ @@ -350,7 +350,7 @@ typedef struct GCodeState { bool spindle_override_enable; // true = override enabled cmMotionMode_t motion_mode; // Group 1 modal motion - cmCanonicalPlane_t select_plane; // G17, G18, G19 + cmPlane_t select_plane; // G17, G18, G19 cmUnitsMode_t units_mode; // G20, G21 cmCoordSystem_t coord_system; // G54-G59 - select coordinate system 1-9 bool absolute_override; // G53 true = move in machine coordinates @@ -434,7 +434,7 @@ typedef struct cmSingleton { // struct to manage cm globals and cycles } cmSingleton_t; -extern cmSingleton_t cm; // canonical machine controller singleton +extern cmSingleton_t cm; // machine controller singleton // Model state getters and setters @@ -448,7 +448,7 @@ cmHomingState_t cm_get_homing_state(); cmMotionMode_t cm_get_motion_mode(); cmCoordSystem_t cm_get_coord_system(); cmUnitsMode_t cm_get_units_mode(); -cmCanonicalPlane_t cm_get_select_plane(); +cmPlane_t cm_get_select_plane(); cmPathControlMode_t cm_get_path_control(); cmDistanceMode_t cm_get_distance_mode(); cmFeedRateMode_t cm_get_feed_rate_mode(); @@ -484,10 +484,10 @@ stat_t cm_deferred_write_callback(); void cm_set_model_target(float target[], float flag[]); stat_t cm_test_soft_limits(float target[]); -// Canonical machining functions defined by NIST [organized by NIST Gcode doc] +// machining functions defined by NIST [organized by NIST Gcode doc] // Initialization and termination (4.3.2) -void canonical_machine_init(); +void machine_init(); /// enter alarm state. returns same status code stat_t cm_alarm(const char *location, stat_t status); stat_t cm_clear(); @@ -495,7 +495,7 @@ stat_t cm_clear(); #define CM_ALARM(CODE) cm_alarm(STATUS_LOCATION, CODE) // Representation (4.3.3) -void cm_set_plane(cmCanonicalPlane_t plane); +void cm_set_plane(cmPlane_t plane); void cm_set_units_mode(cmUnitsMode_t mode); void cm_set_distance_mode(cmDistanceMode_t mode); void cm_set_coord_offsets(cmCoordSystem_t coord_system, float offset[], @@ -554,7 +554,7 @@ void cm_request_feedhold(); void cm_request_queue_flush(); void cm_request_cycle_start(); -void cm_feedhold_sequencing_callback(); +void cm_feedhold_callback(); stat_t cm_queue_flush(); void cm_cycle_start(); diff --git a/src/main.c b/src/main.c index c06e16b..936c1f3 100644 --- a/src/main.c +++ b/src/main.c @@ -28,7 +28,7 @@ \******************************************************************************/ #include "hardware.h" -#include "canonical_machine.h" +#include "machine.h" #include "stepper.h" #include "motor.h" #include "switch.h" @@ -43,7 +43,6 @@ #include "homing.h" #include "plan/planner.h" -#include "plan/buffer.h" #include "plan/arc.h" #include "plan/feedhold.h" @@ -67,7 +66,7 @@ int main() { motor_init(); // motors switch_init(); // switches planner_init(); // motion planning - canonical_machine_init(); // gcode machine + machine_init(); // gcode machine vars_init(); // configuration variables estop_init(); // emergency stop handler @@ -79,14 +78,12 @@ int main() { // main loop while (true) { hw_reset_handler(); // handle hard reset requests - cm_feedhold_sequencing_callback(); // feedhold state machine - mp_plan_hold_callback(); // plan a feedhold + cm_feedhold_callback(); // feedhold state machine cm_arc_callback(); // arc generation runs cm_homing_callback(); // G28.2 continuation cm_probe_callback(); // G38.2 continuation command_callback(); // process next command report_callback(); // report changes - wdt_reset(); } diff --git a/src/plan/arc.c b/src/plan/arc.c index 7782ae9..fec5842 100644 --- a/src/plan/arc.c +++ b/src/plan/arc.c @@ -27,7 +27,7 @@ \******************************************************************************/ /* This module actually contains some parts that belong ion the - * canonical machine, and other parts that belong at the motion planner + * machine, and other parts that belong at the motion planner * level, but the whole thing is treated as if it were part of the * motion planner. */ @@ -282,7 +282,7 @@ static stat_t _compute_arc() { // g18_correction is used to invert G18 XZ plane arcs for proper CW // orientation - float g18_correction = (cm.gm.select_plane == CANON_PLANE_XZ) ? -1 : 1; + float g18_correction = (cm.gm.select_plane == PLANE_XZ) ? -1 : 1; if (arc.full_circle) { // angular travel always starts as zero for full circles @@ -356,7 +356,7 @@ static stat_t _compute_arc() { } -/* Canonical machine entry point for arc +/* machine entry point for arc * * Generates an arc by queuing line segments to the move buffer. The arc is * approximated by generating a large number of tiny, linear arc_segments. @@ -390,7 +390,7 @@ stat_t cm_arc_feed(float target[], float flags[], // arc endpoints // specification Plane axis 0 and 1 are the arc plane, the linear axis is // normal to the arc plane. // G17 - the vast majority of arcs are in the G17 (XY) plane - if (cm.gm.select_plane == CANON_PLANE_XY) { + if (cm.gm.select_plane == PLANE_XY) { arc.plane_axis_0 = AXIS_X; arc.plane_axis_1 = AXIS_Y; arc.linear_axis = AXIS_Z; @@ -405,7 +405,7 @@ stat_t cm_arc_feed(float target[], float flags[], // arc endpoints // but error if k is present return STAT_ARC_SPECIFICATION_ERROR; - } else if (cm.gm.select_plane == CANON_PLANE_XZ) { // G18 + } else if (cm.gm.select_plane == PLANE_XZ) { // G18 arc.plane_axis_0 = AXIS_X; arc.plane_axis_1 = AXIS_Z; arc.linear_axis = AXIS_Y; @@ -415,7 +415,7 @@ stat_t cm_arc_feed(float target[], float flags[], // arc endpoints return STAT_ARC_AXIS_MISSING_FOR_SELECTED_PLANE; } else if (offset_j) return STAT_ARC_SPECIFICATION_ERROR; - } else if (cm.gm.select_plane == CANON_PLANE_YZ) { // G19 + } else if (cm.gm.select_plane == PLANE_YZ) { // G19 arc.plane_axis_0 = AXIS_Y; arc.plane_axis_1 = AXIS_Z; arc.linear_axis = AXIS_X; diff --git a/src/plan/buffer.h b/src/plan/buffer.h index 59da843..c05ab25 100644 --- a/src/plan/buffer.h +++ b/src/plan/buffer.h @@ -27,7 +27,7 @@ #pragma once -#include "canonical_machine.h" +#include "machine.h" #include "config.h" #include @@ -74,7 +74,7 @@ typedef struct mpBuffer { // See Planning Velocity Notes struct mpBuffer *nx; // pointer to next buffer bf_func_t bf_func; // callback to buffer exec function - cm_exec_t cm_func; // callback to canonical machine + cm_exec_t cm_func; // callback to machine float naive_move_time; diff --git a/src/plan/calibrate.c b/src/plan/calibrate.c index 1909b8e..b1833c8 100644 --- a/src/plan/calibrate.c +++ b/src/plan/calibrate.c @@ -30,7 +30,7 @@ #include "buffer.h" #include "motor.h" -#include "canonical_machine.h" +#include "machine.h" #include "planner.h" #include "stepper.h" #include "rtc.h" diff --git a/src/plan/command.c b/src/plan/command.c index 0bbd28e..545bd5f 100644 --- a/src/plan/command.c +++ b/src/plan/command.c @@ -31,7 +31,7 @@ * - A command is called by the Gcode interpreter (cm_, e.g. M code) * - cm_ function calls mp_queue_command which puts it in the planning queue * (bf buffer) which sets some parameters and registers a callback to the - * execution function in the canonical machine. + * execution function in the machine. * - When the planning queue gets to the function it calls _exec_command() * which loads a pointer to the bf buffer in stepper.c's next move. * - When the runtime gets to the end of the current activity (sending steps, @@ -47,7 +47,7 @@ #include "command.h" #include "buffer.h" -#include "canonical_machine.h" +#include "machine.h" #include "stepper.h" @@ -69,7 +69,7 @@ void mp_queue_command(cm_exec_t cm_exec, float *value, float *flag) { bf->move_type = MOVE_TYPE_COMMAND; bf->bf_func = _exec_command; // callback to planner queue exec function - bf->cm_func = cm_exec; // callback to canonical machine exec function + bf->cm_func = cm_exec; // callback to machine exec function // Store values and flags in planner buffer for (int axis = 0; axis < AXES; axis++) { diff --git a/src/plan/dwell.c b/src/plan/dwell.c index d543471..7e2305a 100644 --- a/src/plan/dwell.c +++ b/src/plan/dwell.c @@ -30,7 +30,7 @@ #include "dwell.h" #include "buffer.h" -#include "canonical_machine.h" +#include "machine.h" #include "stepper.h" diff --git a/src/plan/exec.c b/src/plan/exec.c index 4fc1af7..caa506b 100644 --- a/src/plan/exec.c +++ b/src/plan/exec.c @@ -765,7 +765,7 @@ stat_t mp_exec_aline(mpBuf_t *bf) { else if (mr.section == SECTION_TAIL) status = _exec_aline_tail(); else return CM_ALARM(STAT_INTERNAL_ERROR); // never supposed to get here - // Feedhold processing. Refer to canonical_machine.h for state machine + // Feedhold processing. Refer to machine.h for state machine // Catch the feedhold request and start the planning the hold if (cm.hold_state == FEEDHOLD_SYNC) cm.hold_state = FEEDHOLD_PLAN; diff --git a/src/plan/feedhold.h b/src/plan/feedhold.h index 1fbb6e8..007962d 100644 --- a/src/plan/feedhold.h +++ b/src/plan/feedhold.h @@ -27,7 +27,6 @@ #pragma once -#include "status.h" void mp_plan_hold_callback(); void mp_end_hold(); diff --git a/src/plan/jog.c b/src/plan/jog.c index c511196..1ca6908 100644 --- a/src/plan/jog.c +++ b/src/plan/jog.c @@ -31,7 +31,7 @@ #include "buffer.h" #include "stepper.h" #include "motor.h" -#include "canonical_machine.h" +#include "machine.h" #include "motor.h" #include "config.h" diff --git a/src/plan/line.c b/src/plan/line.c index bb25aa4..266599a 100644 --- a/src/plan/line.c +++ b/src/plan/line.c @@ -33,7 +33,7 @@ #include "exec.h" #include "buffer.h" #include "zoid.h" -#include "canonical_machine.h" +#include "machine.h" #include "stepper.h" #include "util.h" #include "report.h" diff --git a/src/plan/planner.c b/src/plan/planner.c index 9247b04..eac0e81 100644 --- a/src/plan/planner.c +++ b/src/plan/planner.c @@ -29,7 +29,7 @@ /* Planner Notes * - * The planner works below the canonical machine and above the + * The planner works below the machine and above the * motor mapping and stepper execution layers. A rudimentary * multitasking capability is implemented for long-running commands * such as lines, arcs, and dwells. These functions are coded as @@ -44,10 +44,10 @@ * mm), and runtime model (mr). These are designated as "model", * "planner" and "runtime" in function names. * - * The Gcode model is owned by the canonical machine and should + * The Gcode model is owned by the machine and should * only be accessed by cm_xxxx() functions. Data from the Gcode * model is transferred to the planner by the mp_xxx() functions - * called by the canonical machine. + * called by the machine. * * The planner should only use data in the planner model. When a * move (block) is ready for execution the planner data is @@ -61,7 +61,7 @@ #include "buffer.h" #include "arc.h" -#include "canonical_machine.h" +#include "machine.h" #include "stepper.h" #include "motor.h" diff --git a/src/plan/planner.h b/src/plan/planner.h index bf08ad3..bd46a68 100644 --- a/src/plan/planner.h +++ b/src/plan/planner.h @@ -30,7 +30,7 @@ #pragma once -#include "canonical_machine.h" // used for GCodeState_t +#include "machine.h" // used for GCodeState_t #include "util.h" diff --git a/src/probing.c b/src/probing.c index eae282f..c48c12c 100644 --- a/src/probing.c +++ b/src/probing.c @@ -26,7 +26,7 @@ \******************************************************************************/ -#include "canonical_machine.h" +#include "machine.h" #include "spindle.h" #include "switch.h" #include "util.h" diff --git a/src/pwm_spindle.h b/src/pwm_spindle.h index 48e7a6d..6e739b3 100644 --- a/src/pwm_spindle.h +++ b/src/pwm_spindle.h @@ -27,7 +27,7 @@ #pragma once -#include "canonical_machine.h" +#include "machine.h" void pwm_spindle_init(); diff --git a/src/spindle.h b/src/spindle.h index 8bb6fc0..0b78a2f 100644 --- a/src/spindle.h +++ b/src/spindle.h @@ -28,7 +28,7 @@ #pragma once -#include "canonical_machine.h" +#include "machine.h" void cm_spindle_init(); diff --git a/src/stepper.c b/src/stepper.c index 891c072..c597bf6 100644 --- a/src/stepper.c +++ b/src/stepper.c @@ -30,7 +30,7 @@ #include "stepper.h" #include "config.h" -#include "canonical_machine.h" +#include "machine.h" #include "plan/exec.h" #include "plan/command.h" #include "motor.h" diff --git a/src/switch.c b/src/switch.c index a08277b..9014f30 100644 --- a/src/switch.c +++ b/src/switch.c @@ -46,7 +46,7 @@ #include "switch.h" #include "hardware.h" -#include "canonical_machine.h" +#include "machine.h" #include "config.h" #include diff --git a/src/tmc2660.c b/src/tmc2660.c index 54082be..9bc92d7 100644 --- a/src/tmc2660.c +++ b/src/tmc2660.c @@ -30,7 +30,7 @@ #include "motor.h" #include "rtc.h" #include "cpp_magic.h" -#include "canonical_machine.h" +#include "machine.h" #include "plan/calibrate.h" #include -- 2.27.0