support for helical motion
This commit is contained in:
parent
8f3a69b37e
commit
e257fc195c
6 changed files with 164 additions and 117 deletions
11
stepper.c
11
stepper.c
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
#include "stepper.h"
|
||||
#include "config.h"
|
||||
#include <math.h>
|
||||
#include "nuts_bolts.h"
|
||||
#include <avr/interrupt.h>
|
||||
|
||||
|
|
@ -286,3 +287,13 @@ void st_set_echo(int value)
|
|||
{
|
||||
echo_steps = value;
|
||||
}
|
||||
|
||||
// Convert from millimeters to step-counts along the designated axis
|
||||
int32_t st_millimeters_to_steps(double millimeters, int axis) {
|
||||
switch(axis) {
|
||||
case X_AXIS: return(round(millimeters*X_STEPS_PER_MM));
|
||||
case Y_AXIS: return(round(millimeters*Y_STEPS_PER_MM));
|
||||
case Z_AXIS: return(round(millimeters*Z_STEPS_PER_MM));
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue