summaryrefslogtreecommitdiff
path: root/Tonokip_Firmware
diff options
context:
space:
mode:
authorEmanuele Caruso <emanuele.caruso@gmail.com>2011-04-04 21:18:02 +0200
committerEmanuele Caruso <emanuele.caruso@gmail.com>2011-04-04 21:18:02 +0200
commitdc53111a7100216da47dd85a7388998c606bdf90 (patch)
tree9e3a5d7dd54310e2eb5612cde8b42255e306398c /Tonokip_Firmware
parentfcd6fe728c54452d19a5df7a0ffb8758a88ac720 (diff)
Fixed extruder issue: the e-move was shorter than other axises
Diffstat (limited to 'Tonokip_Firmware')
-rw-r--r--Tonokip_Firmware/Tonokip_Firmware.pde7
1 files changed, 6 insertions, 1 deletions
diff --git a/Tonokip_Firmware/Tonokip_Firmware.pde b/Tonokip_Firmware/Tonokip_Firmware.pde
index c15ecbd..0a0cfed 100644
--- a/Tonokip_Firmware/Tonokip_Firmware.pde
+++ b/Tonokip_Firmware/Tonokip_Firmware.pde
@@ -872,7 +872,12 @@ void linear_move(unsigned long x_steps_remaining, unsigned long y_steps_remainin
if(e_steps_remaining){
timediff=micros()-previous_micros_e;
- while(timediff >= e_interval && e_steps_remaining) { do_e_step(); e_steps_remaining--; timediff-=e_interval;}
+ unsigned int final_e_steps_remaining = 0;
+ if (steep_x && x_steps_to_take > 0) final_e_steps_remaining = e_steps_to_take * (x_steps_remaining) / ((float) x_steps_to_take);
+ else if (steep_y && y_steps_to_take > 0) final_e_steps_remaining = e_steps_to_take * (y_steps_remaining) / ((float) y_steps_to_take);
+ if (final_e_steps_remaining > 0) while(e_steps_remaining > final_e_steps_remaining) { do_e_step(); e_steps_remaining--; timediff-=e_interval;}
+ else if (x_steps_to_take > 0 || y_steps_to_take > 0) while(e_steps_remaining) { do_e_step(); e_steps_remaining--; timediff-=e_interval;}
+ else while (timediff >= e_interval && e_steps_remaining) { do_e_step(); e_steps_remaining--; timediff-=e_interval;}
}
if( (millis() - previous_millis_heater) >= 500 ) {
manage_heater();