diff --git a/Grbl_Esp32/cpu_map.h b/Grbl_Esp32/cpu_map.h index 3a89274e..6577b6b3 100644 --- a/Grbl_Esp32/cpu_map.h +++ b/Grbl_Esp32/cpu_map.h @@ -469,7 +469,13 @@ #endif // redefine some stuff from config.h + #ifdef HOMING_CYCLE_0 + #undef HOMING_CYCLE_0 + #endif #define HOMING_CYCLE_0 (1< #include diff --git a/Grbl_Esp32/polar_coaster.cpp b/Grbl_Esp32/polar_coaster.cpp index c0a6426d..2b1c0ab9 100644 --- a/Grbl_Esp32/polar_coaster.cpp +++ b/Grbl_Esp32/polar_coaster.cpp @@ -87,7 +87,6 @@ void inverse_kinematics(float *target, plan_line_data_t *pl_data, float *positio float p_dx, p_dy, p_dz; // distances in each polar axis float dist, polar_dist; // the distances in both systems...used to determine feed rate - float new_feedrate; // uint32_t segment_count; // number of segments the move will be broken in to. float seg_target[N_AXIS]; // The target of the current segment diff --git a/Grbl_Esp32/spindle_control.cpp b/Grbl_Esp32/spindle_control.cpp index 3714b8c2..a85ba092 100644 --- a/Grbl_Esp32/spindle_control.cpp +++ b/Grbl_Esp32/spindle_control.cpp @@ -20,7 +20,9 @@ #include "grbl.h" +#ifdef SPINDLE_PWM_PIN static float pwm_gradient; // Precalulated value to speed up rpm to PWM conversions. +#endif void spindle_init() { diff --git a/Grbl_Esp32/stepper.cpp b/Grbl_Esp32/stepper.cpp index ef89c7e0..fe68ae1c 100644 --- a/Grbl_Esp32/stepper.cpp +++ b/Grbl_Esp32/stepper.cpp @@ -208,13 +208,17 @@ static st_prep_t prep; */ +#ifdef USE_RMT_STEPS + inline IRAM_ATTR static void stepperRMT_Outputs(); +#endif // TODO: Replace direct updating of the int32 position counters in the ISR somehow. Perhaps use smaller // int8 variables and update position counters only when a segment completes. This can get complicated // with probing and homing cycles that require true real-time positions. void IRAM_ATTR onStepperDriverTimer(void *para) // ISR It is time to take a step ======================================================================================= { - uint64_t step_pulse_off_time; - + #ifndef USE_RMT_STEPS + uint64_t step_pulse_off_time; + #endif //const int timer_idx = (int)para; // get the timer index TIMERG0.int_clr_timers.t0 = 1; diff --git a/Grbl_Esp32/stepper.h b/Grbl_Esp32/stepper.h index b1625acf..d2dd6bbd 100644 --- a/Grbl_Esp32/stepper.h +++ b/Grbl_Esp32/stepper.h @@ -84,7 +84,6 @@ void IRAM_ATTR onStepperOffTimer(); #ifdef USE_RMT_STEPS void initRMT(); - inline IRAM_ATTR static void stepperRMT_Outputs(); #endif void stepper_init();