summaryrefslogtreecommitdiff
path: root/Tonokip_Firmware
diff options
context:
space:
mode:
authorkliment <kliment.yanev@gmail.com>2011-04-27 23:31:54 +0200
committerkliment <kliment.yanev@gmail.com>2011-04-27 23:31:54 +0200
commit896b01ab4a69b1ba202a51e3203fdd6ebc39637e (patch)
tree418dce929c5c7693c02f81329febabed5de69a6a /Tonokip_Firmware
parentef8099b6dd474a5630bfec49538c88c8b05e97e1 (diff)
parentbc6eeb7aa63b5cbde3aaef7d4f5d484516542aef (diff)
Merge branch 'master' of git@github.com:kliment/Klimentkip
Diffstat (limited to 'Tonokip_Firmware')
-rw-r--r--Tonokip_Firmware/Tonokip_Firmware.pde7
-rw-r--r--Tonokip_Firmware/configuration.h9
2 files changed, 11 insertions, 5 deletions
diff --git a/Tonokip_Firmware/Tonokip_Firmware.pde b/Tonokip_Firmware/Tonokip_Firmware.pde
index a7c748f..9615320 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;
@@ -825,7 +826,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;
@@ -835,7 +837,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 8f8dbb0..aba5176 100644
--- a/Tonokip_Firmware/configuration.h
+++ b/Tonokip_Firmware/configuration.h
@@ -9,9 +9,12 @@
#define SDSUPPORT 1
//Acceleration settings
-float full_velocity_units = 0.6; // the units between minimum and G1 move feedrate
-float min_units_per_second = 60.0; // the minimum feedrate
-float min_constant_speed_units = 0.6; // the minimum units of an accelerated move that must be done at constant speed
+float full_velocity_units = 10; // the units between minimum and G1 move feedrate
+float travel_move_full_velocity_units = 10; // 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,
+ // but will be done at the minimum between min_units_per_seconds and move feedrate speeds.
// AD595 THERMOCOUPLE SUPPORT UNTESTED... USE WITH CAUTION!!!!