time to save, acceleration seems to be temporarily broken, will have to debug later
This commit is contained in:
parent
5e0f5a6c87
commit
6002e10dd7
|
|
@ -321,21 +321,18 @@ void dda_start(DDA *dda) {
|
|||
*/
|
||||
|
||||
uint8_t can_step(uint8_t min, uint8_t max, int32_t current, int32_t target, uint8_t dir) {
|
||||
if (current == target)
|
||||
return 0;
|
||||
|
||||
if (dir) {
|
||||
// forwards/positive
|
||||
if (max)
|
||||
return 0;
|
||||
if (current > target)
|
||||
if ((current - target) >= 0)
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
// backwards/negative
|
||||
if (min)
|
||||
return 0;
|
||||
if (target > current)
|
||||
if ((target - current) >= 0)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -487,7 +484,7 @@ void dda_step(DDA *dda) {
|
|||
if (step_option & F_REAL_STEP)
|
||||
setTimer(dda->move_duration / current_position.F);
|
||||
|
||||
// if we could step, we're still running
|
||||
// if we could do anything at all, we're still running
|
||||
dda->live = (step_option != 0)?1:0;
|
||||
// if (
|
||||
// (current_position.X == dda->endpoint.X) &&
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ typedef struct {
|
|||
int32_t X;
|
||||
int32_t Y;
|
||||
int32_t Z;
|
||||
uint32_t E;
|
||||
int32_t E;
|
||||
uint32_t F;
|
||||
} TARGET;
|
||||
|
||||
|
|
|
|||
|
|
@ -16,8 +16,6 @@
|
|||
#define Y_STEPS_PER_REV X_STEPS_PER_REV
|
||||
// we need more speed than precision on Z, turn off microstepping
|
||||
#define Z_STEPS_PER_REV 200.0
|
||||
// we need more torque and smoothness at very low speeds on E, maximum microstepping
|
||||
#define E_STEPS_PER_REV 3200.0
|
||||
|
||||
#define X_COG_CIRCUMFERENCE (4.77 * 16.0)
|
||||
#define Y_COG_CIRCUMFERENCE X_COG_CIRCUMFERENCE
|
||||
|
|
@ -26,7 +24,8 @@
|
|||
// #define XY_COG_CIRCUMFERENCE (XY_COG_RADIUS * PI * 2)
|
||||
#define Z_GEAR_RATIO 1.0
|
||||
|
||||
#define EXTRUDER_STEPS_PER_REV E_STEPS_PER_REV
|
||||
// we need more torque and smoothness at very low speeds on E, maximum microstepping
|
||||
#define E_STEPS_PER_REV 3200.0
|
||||
#define EXTRUDER_SHAFT_RADIUS 5.0
|
||||
#define EXTRUDER_INLET_DIAMETER 3.0
|
||||
#define EXTRUDER_NOZZLE_DIAMETER 0.8
|
||||
|
|
@ -37,8 +36,8 @@
|
|||
|
||||
// http://blog.arcol.hu/?p=157 may help with this next one
|
||||
// I haven't tuned this at all- it's just a placeholder until I read the above carefully enough
|
||||
// does this refer to filament or extrudate? extrudate depends on layer thickness.. hm
|
||||
#define STEPS_PER_MM_E ((uint32_t) ((EXTRUDER_STEPS_PER_REV / (EXTRUDER_SHAFT_RADIUS * PI * EXTRUDER_INLET_DIAMETER / EXTRUDER_NOZZLE_DIAMETER)) + 0.5))
|
||||
// does this refer to filament or extrudate? extrudate depends on XY distance vs E distance.. hm lets go with filament
|
||||
#define STEPS_PER_MM_E ((uint32_t) ((E_STEPS_PER_REV / (EXTRUDER_SHAFT_RADIUS * PI * EXTRUDER_INLET_DIAMETER)) + 0.5))
|
||||
|
||||
#define FEEDRATE_FAST_XY 6000
|
||||
#define FEEDRATE_SLOW_XY 300
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ int main (void)
|
|||
serial_writechar(',');
|
||||
serwrite_int32(current_position.Z);
|
||||
serial_writechar(',');
|
||||
serwrite_uint32(current_position.E);
|
||||
serwrite_int32(current_position.E);
|
||||
serial_writechar(',');
|
||||
serwrite_uint32(current_position.F);
|
||||
serial_writechar('\n');
|
||||
|
|
@ -148,7 +148,7 @@ int main (void)
|
|||
serial_writechar(',');
|
||||
serwrite_int32(movebuffer[mb_tail].endpoint.Z);
|
||||
serial_writechar(',');
|
||||
serwrite_uint32(movebuffer[mb_tail].endpoint.E);
|
||||
serwrite_int32(movebuffer[mb_tail].endpoint.E);
|
||||
serial_writechar(',');
|
||||
serwrite_uint32(movebuffer[mb_tail].endpoint.F);
|
||||
serial_writechar('\n');
|
||||
|
|
|
|||
Loading…
Reference in New Issue