summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmanuele Caruso <emanuele.caruso@gmail.com>2011-04-25 23:35:00 +0200
committerEmanuele Caruso <emanuele.caruso@gmail.com>2011-04-25 23:35:00 +0200
commitd432e22dc1130325f91139c84c4abe63edd38e75 (patch)
treeac91230554b484777b7a0a80c9fc1035392f904b
parentbdf475b6e7e24ea0a67065a95aa1b64e93c4478b (diff)
Added separate acceleration configuration parameter for travel moves
-rw-r--r--Tonokip_Firmware/Tonokip_Firmware.pde7
-rw-r--r--Tonokip_Firmware/configuration.h1
2 files changed, 6 insertions, 2 deletions
diff --git a/Tonokip_Firmware/Tonokip_Firmware.pde b/Tonokip_Firmware/Tonokip_Firmware.pde
index d838d7a..0be8d40 100644
--- a/Tonokip_Firmware/Tonokip_Firmware.pde
+++ b/Tonokip_Firmware/Tonokip_Firmware.pde
@@ -52,6 +52,7 @@ bool direction_x, direction_y, direction_z, direction_e;
unsigned long previous_micros=0, previous_micros_x=0, previous_micros_y=0, previous_micros_z=0, previous_micros_e=0, previous_millis_heater, previous_millis_bed_heater;
unsigned long x_steps_to_take, y_steps_to_take, z_steps_to_take, e_steps_to_take;
unsigned long long_full_velocity_units = full_velocity_units * 100;
+unsigned long long_travel_move_full_velocity_units = travel_move_full_velocity_units * 100;
unsigned long max_x_interval = 100000000.0 / (min_units_per_second * x_steps_per_unit);
unsigned long max_y_interval = 100000000.0 / (min_units_per_second * y_steps_per_unit);
unsigned long max_interval, interval;
@@ -815,7 +816,8 @@ void linear_move(unsigned long x_steps_remaining, unsigned long y_steps_remainin
error_x = delta_y / 2;
previous_micros_y=micros()*100;
interval = y_interval;
- virtual_full_velocity_steps = long_full_velocity_units * y_steps_per_unit /100;
+ if(e_steps_to_take > 0) virtual_full_velocity_steps = long_full_velocity_units * y_steps_per_unit /100;
+ else virtual_full_velocity_steps = long_travel_move_full_velocity_units * y_steps_per_unit /100;
full_velocity_steps = min(virtual_full_velocity_steps, (delta_y - y_min_constant_speed_steps) / 2);
steps_remaining = delta_y;
steps_to_take = delta_y;
@@ -825,7 +827,8 @@ void linear_move(unsigned long x_steps_remaining, unsigned long y_steps_remainin
error_y = delta_x / 2;
previous_micros_x=micros()*100;
interval = x_interval;
- virtual_full_velocity_steps = long_full_velocity_units * x_steps_per_unit /100;
+ if(e_steps_to_take > 0) virtual_full_velocity_steps = long_full_velocity_units * x_steps_per_unit /100;
+ else virtual_full_velocity_steps = long_travel_move_full_velocity_units * x_steps_per_unit /100;
full_velocity_steps = min(virtual_full_velocity_steps, (delta_x - x_min_constant_speed_steps) / 2);
steps_remaining = delta_x;
steps_to_take = delta_x;
diff --git a/Tonokip_Firmware/configuration.h b/Tonokip_Firmware/configuration.h
index 362c2d2..44d690d 100644
--- a/Tonokip_Firmware/configuration.h
+++ b/Tonokip_Firmware/configuration.h
@@ -10,6 +10,7 @@
//Acceleration settings
float full_velocity_units = 10; // the units between minimum and G1 move feedrate
+float travel_move_full_velocity_units = 3; // used for travel moves
float min_units_per_second = 35.0; // the minimum feedrate
float min_constant_speed_units = 2; // the minimum units of an accelerated move that must be done at constant speed
// Note that if the move is shorter than this value, acceleration won't be perfomed,