Software endstps added

master
Erik van der Zalm 13 years ago
parent b099fe142c
commit 27664c6da6

@ -33,7 +33,7 @@
#include "Marlin.h"
#include "speed_lookuptable.h"
char version_string[] = "0.9.8";
char version_string[] = "0.9.9";
#ifdef SDSUPPORT
#include "SdFat.h"
@ -947,6 +947,18 @@ inline void get_coordinates()
void prepare_move()
{
if (min_software_endstops) {
if (destination[X_AXIS] < 0) destination[X_AXIS] = 0.0;
if (destination[Y_AXIS] < 0) destination[Y_AXIS] = 0.0;
if (destination[Z_AXIS] < 0) destination[Z_AXIS] = 0.0;
}
if (max_software_endstops) {
if (destination[X_AXIS] > X_MAX_LENGTH) destination[X_AXIS] = X_MAX_LENGTH;
if (destination[Y_AXIS] > Y_MAX_LENGTH) destination[Y_AXIS] = Y_MAX_LENGTH;
if (destination[Z_AXIS] > Z_MAX_LENGTH) destination[Z_AXIS] = Z_MAX_LENGTH;
}
plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60.0);
for(int i=0; i < NUM_AXIS; i++) {
current_position[i] = destination[i];

Loading…
Cancel
Save