fixed feed rate calculation
This commit is contained in:
parent
df271c82da
commit
ed400693b3
10
config.h
10
config.h
@ -23,17 +23,17 @@
|
|||||||
|
|
||||||
#define VERSION "0.0"
|
#define VERSION "0.0"
|
||||||
|
|
||||||
#define X_STEPS_PER_MM 2.0
|
#define X_STEPS_PER_MM 128.0
|
||||||
#define Y_STEPS_PER_MM 2.0
|
#define Y_STEPS_PER_MM 128.0
|
||||||
#define Z_STEPS_PER_MM 2.0
|
#define Z_STEPS_PER_MM 128.0
|
||||||
|
|
||||||
#define INCHES_PER_MM 25.4
|
#define INCHES_PER_MM 25.4
|
||||||
#define X_STEPS_PER_INCH X_STEPS_PER_MM*INCHES_PER_MM
|
#define X_STEPS_PER_INCH X_STEPS_PER_MM*INCHES_PER_MM
|
||||||
#define Y_STEPS_PER_INCH Y_STEPS_PER_MM*INCHES_PER_MM
|
#define Y_STEPS_PER_INCH Y_STEPS_PER_MM*INCHES_PER_MM
|
||||||
#define Z_STEPS_PER_INCH Z_STEPS_PER_MM*INCHES_PER_MM
|
#define Z_STEPS_PER_INCH Z_STEPS_PER_MM*INCHES_PER_MM
|
||||||
|
|
||||||
#define RAPID_FEEDRATE 200000.0 // in millimeters per minute
|
#define RAPID_FEEDRATE 960.0 // in millimeters per minute
|
||||||
#define DEFAULT_FEEDRATE 200000.0
|
#define DEFAULT_FEEDRATE 960.0
|
||||||
|
|
||||||
#define STEPPERS_ENABLE_DDR DDRB
|
#define STEPPERS_ENABLE_DDR DDRB
|
||||||
#define STEPPERS_ENABLE_PORT PORTB
|
#define STEPPERS_ENABLE_PORT PORTB
|
||||||
|
@ -70,7 +70,8 @@ void compute_and_set_step_pace(double feed_rate, double millimeters_of_travel, u
|
|||||||
if (invert) {
|
if (invert) {
|
||||||
pace = round(ONE_MINUTE_OF_MICROSECONDS/feed_rate/steps);
|
pace = round(ONE_MINUTE_OF_MICROSECONDS/feed_rate/steps);
|
||||||
} else {
|
} else {
|
||||||
pace = round(((millimeters_of_travel * ONE_MINUTE_OF_MICROSECONDS) / feed_rate) / steps);
|
pace = round((ONE_MINUTE_OF_MICROSECONDS/X_STEPS_PER_MM)/feed_rate);
|
||||||
|
//pace = round(((millimeters_of_travel * ONE_MINUTE_OF_MICROSECONDS) / feed_rate) / steps);
|
||||||
}
|
}
|
||||||
st_buffer_pace(pace);
|
st_buffer_pace(pace);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user