From 9abae2fd97cf3fafbd7fd8e42448a2a9df7eae18 Mon Sep 17 00:00:00 2001 From: Voinea Dragos Date: Sun, 30 May 2021 14:22:12 +0300 Subject: [PATCH] Remove maxlimit_status --- Firmware/planner.cpp | 10 ++++------ Firmware/planner.h | 1 - 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Firmware/planner.cpp b/Firmware/planner.cpp index b6d012b24..5750ce6e8 100644 --- a/Firmware/planner.cpp +++ b/Firmware/planner.cpp @@ -1044,14 +1044,12 @@ Having the real displacement of the head, we can calculate the total movement le // Calculate and limit speed in mm/sec for each axis float current_speed[4]; float speed_factor = 1.0; //factor <=1 do decrease speed -// maxlimit_status &= ~0xf; for(int i=0; i < 4; i++) { current_speed[i] = delta_mm[i] * inverse_second; if(fabs(current_speed[i]) > max_feedrate[i]) { speed_factor = min(speed_factor, max_feedrate[i] / fabs(current_speed[i])); - maxlimit_status |= (1 << i); } } @@ -1133,13 +1131,13 @@ Having the real displacement of the head, we can calculate the total movement le // Limit acceleration per axis //FIXME Vojtech: One shall rather limit a projection of the acceleration vector instead of using the limit. if(((float)block->acceleration_st * (float)block->steps_x.wide / (float)block->step_event_count.wide) > axis_steps_per_sqr_second[X_AXIS]) - { block->acceleration_st = axis_steps_per_sqr_second[X_AXIS]; maxlimit_status |= (X_AXIS_MASK << 4); } + { block->acceleration_st = axis_steps_per_sqr_second[X_AXIS]; } if(((float)block->acceleration_st * (float)block->steps_y.wide / (float)block->step_event_count.wide) > axis_steps_per_sqr_second[Y_AXIS]) - { block->acceleration_st = axis_steps_per_sqr_second[Y_AXIS]; maxlimit_status |= (Y_AXIS_MASK << 4); } + { block->acceleration_st = axis_steps_per_sqr_second[Y_AXIS]; } if(((float)block->acceleration_st * (float)block->steps_e.wide / (float)block->step_event_count.wide) > axis_steps_per_sqr_second[E_AXIS]) - { block->acceleration_st = axis_steps_per_sqr_second[E_AXIS]; maxlimit_status |= (Z_AXIS_MASK << 4); } + { block->acceleration_st = axis_steps_per_sqr_second[E_AXIS]; } if(((float)block->acceleration_st * (float)block->steps_z.wide / (float)block->step_event_count.wide ) > axis_steps_per_sqr_second[Z_AXIS]) - { block->acceleration_st = axis_steps_per_sqr_second[Z_AXIS]; maxlimit_status |= (E_AXIS_MASK << 4); } + { block->acceleration_st = axis_steps_per_sqr_second[Z_AXIS]; } } // Acceleration of the segment, in mm/sec^2 block->acceleration = block->acceleration_st / steps_per_mm; diff --git a/Firmware/planner.h b/Firmware/planner.h index f7fd849e0..919905530 100644 --- a/Firmware/planner.h +++ b/Firmware/planner.h @@ -192,7 +192,6 @@ extern unsigned long* max_acceleration_units_per_sq_second; extern unsigned long axis_steps_per_sqr_second[NUM_AXIS]; extern long position[NUM_AXIS]; -extern uint8_t maxlimit_status; #ifdef AUTOTEMP