Repetier-Firmware  0.80
Repetier/motion.cpp File Reference
#include "Reptier.h"
#include "ui.h"

Functions

unsigned long U16SquaredToU32 (unsigned int val)
void computeMaxJunctionSpeed (PrintLine *p1, PrintLine *p2)
void updateStepsParameter (PrintLine *p)
void testnum (float x, char c)
void backwardPlanner (byte p, byte last)
void forwardPlanner (byte p)
void updateTrapezoids (byte p)
float safeSpeed (PrintLine *p)
void move_steps (long x, long y, long z, long e, float feedrate, bool waitEnd, bool check_endstop)
byte check_new_move (byte pathOptimize, byte waitExtraLines)
void log_long_array (PGM_P ptr, long *arr)
void log_float_array (PGM_P ptr, float *arr)
void log_printLine (PrintLine *p)
void calculate_move (PrintLine *p, float axis_diff[], byte check_endstops, byte pathOptimize)
void queue_move (byte check_endstops, byte pathOptimize)

Function Documentation

void backwardPlanner ( byte  p,
byte  last 
) [inline]

Compute the maximum speed from the last entered move. The backwards planner traverses the moves from last to first looking at deceleration. The RHS of the accelerate/decelerate ramp.

p = last line inserted last = last element until we check

void calculate_move ( PrintLine p,
float  axis_diff[],
byte  check_endstops,
byte  pathOptimize 
)
byte check_new_move ( byte  pathOptimize,
byte  waitExtraLines 
)

Check if move is new. If it is insert some dummy moves to allow the path optimizer to work since it does not act on the first two moves in the queue. The stepper timer will spot these moves and leave some time for processing.

void computeMaxJunctionSpeed ( PrintLine p1,
PrintLine p2 
) [inline]

Computes the maximum junction speed

p1 = previous segment p2 = new segment

void forwardPlanner ( byte  p) [inline]
void log_float_array ( PGM_P  ptr,
float *  arr 
)
void log_long_array ( PGM_P  ptr,
long *  arr 
)
void log_printLine ( PrintLine p)
void move_steps ( long  x,
long  y,
long  z,
long  e,
float  feedrate,
bool  waitEnd,
bool  check_endstop 
)

Move printer the given number of steps. Puts the move into the queue. Used by e.g. homing commands.

void queue_move ( byte  check_endstops,
byte  pathOptimize 
)

Put a move to the current destination coordinates into the movement cache. If the cache is full, the method will wait, until a place gets free. During wait communication and temperature control is enabled.

Parameters:
check_endstopsRead endstop during move.
float safeSpeed ( PrintLine p) [inline]
void testnum ( float  x,
char  c 
)
unsigned long U16SquaredToU32 ( unsigned int  val) [inline]

Update parameter used by updateTrapezoids

Computes the acceleration/decelleration steps and advanced parameter associated.

void updateTrapezoids ( byte  p)

This is the path planner.

It goes from the last entry and tries to increase the end speed of previous moves in a fashion that the maximum jerk is never exceeded. If a segment with reached maximum speed is met, the planner stops. Everything left from this is already optimal from previous updates. The first 2 entries in the queue are not checked. The first is the one that is already in print and the following will likely become active.

The method is called before lines_count is increased!

 All Data Structures Namespaces Files Functions Variables Typedefs Friends Defines