aboutsummaryrefslogtreecommitdiffstats
path: root/klippy
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2019-02-27 13:11:12 -0500
committerKevin O'Connor <kevin@koconnor.net>2019-02-27 13:11:12 -0500
commitee1236805e677f2e1987c1a42a9125ebab953a27 (patch)
tree4e0f4fbe544f253b3ae483642fc1d4e9db55ad45 /klippy
parentb934313c3da7bd57d2f6bb665dc5a9039ccfb076 (diff)
downloadkutter-ee1236805e677f2e1987c1a42a9125ebab953a27.tar.gz
kutter-ee1236805e677f2e1987c1a42a9125ebab953a27.tar.xz
kutter-ee1236805e677f2e1987c1a42a9125ebab953a27.zip
toolhead: Wrap code to 80 columns
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy')
-rw-r--r--klippy/toolhead.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/klippy/toolhead.py b/klippy/toolhead.py
index 9629dc8f..edf6d326 100644
--- a/klippy/toolhead.py
+++ b/klippy/toolhead.py
@@ -53,9 +53,7 @@ class Move:
return
# Allow extruder to calculate its maximum junction
extruder_v2 = self.toolhead.extruder.calc_junction(prev_move, self)
- # Find max velocity using approximated centripetal velocity as
- # described at:
- # https://onehossshay.wordpress.com/2011/09/24/improving_grbl_cornering_algorithm/
+ # Find max velocity using "approximated centripetal velocity"
axes_d = self.axes_d
prev_axes_d = prev_move.axes_d
junction_cos_theta = -((axes_d[0] * prev_axes_d[0]
@@ -66,7 +64,8 @@ class Move:
return
junction_cos_theta = max(junction_cos_theta, -0.999999)
sin_theta_d2 = math.sqrt(0.5*(1.0-junction_cos_theta))
- R = self.toolhead.junction_deviation * sin_theta_d2 / (1. - sin_theta_d2)
+ R = (self.toolhead.junction_deviation * sin_theta_d2
+ / (1. - sin_theta_d2))
tan_theta_d2 = sin_theta_d2 / math.sqrt(0.5*(1.0+junction_cos_theta))
move_centripetal_v2 = .5 * self.move_d * tan_theta_d2 * self.accel
prev_move_centripetal_v2 = (.5 * prev_move.move_d * tan_theta_d2
@@ -263,7 +262,8 @@ class ToolHead:
raise config.error(msg)
# SET_VELOCITY_LIMIT command
gcode = self.printer.lookup_object('gcode')
- gcode.register_command('SET_VELOCITY_LIMIT', self.cmd_SET_VELOCITY_LIMIT,
+ gcode.register_command('SET_VELOCITY_LIMIT',
+ self.cmd_SET_VELOCITY_LIMIT,
desc=self.cmd_SET_VELOCITY_LIMIT_help)
gcode.register_command('M204', self.cmd_M204)
# Print time tracking