Browse Source

Fix feedrate in gcode_T (max_feedrate is mm/s)

pull/1/head
Scott Lahteine 9 years ago
parent
commit
ef3bef6b9e
  1. 6
      Marlin/Marlin_main.cpp
  2. 2
      Marlin/planner.cpp
  3. 2
      Marlin/planner.h

6
Marlin/Marlin_main.cpp

@ -6633,11 +6633,13 @@ inline void gcode_T(uint8_t tmp_extruder) {
if (next_feedrate > 0.0) stored_feedrate = feedrate = next_feedrate;
}
else {
feedrate =
#ifdef XY_TRAVEL_SPEED
feedrate = XY_TRAVEL_SPEED;
XY_TRAVEL_SPEED
#else
feedrate = min(planner.max_feedrate[X_AXIS], planner.max_feedrate[Y_AXIS]);
min(planner.max_feedrate[X_AXIS], planner.max_feedrate[Y_AXIS]) * 60
#endif
;
}
if (tmp_extruder != active_extruder) {

2
Marlin/planner.cpp

@ -80,7 +80,7 @@ block_t Planner::block_buffer[BLOCK_BUFFER_SIZE];
volatile uint8_t Planner::block_buffer_head = 0; // Index of the next block to be pushed
volatile uint8_t Planner::block_buffer_tail = 0;
float Planner::max_feedrate[NUM_AXIS]; // Max speeds in mm per minute
float Planner::max_feedrate[NUM_AXIS]; // Max speeds in mm per second
float Planner::axis_steps_per_mm[NUM_AXIS];
unsigned long Planner::max_acceleration_steps_per_s2[NUM_AXIS];
unsigned long Planner::max_acceleration_mm_per_s2[NUM_AXIS]; // Use M201 to override by software

2
Marlin/planner.h

@ -115,7 +115,7 @@ class Planner {
static volatile uint8_t block_buffer_head; // Index of the next block to be pushed
static volatile uint8_t block_buffer_tail;
static float max_feedrate[NUM_AXIS]; // Max speeds in mm per minute
static float max_feedrate[NUM_AXIS]; // Max speeds in mm per second
static float axis_steps_per_mm[NUM_AXIS];
static unsigned long max_acceleration_steps_per_s2[NUM_AXIS];
static unsigned long max_acceleration_mm_per_s2[NUM_AXIS]; // Use M201 to override by software

Loading…
Cancel
Save