mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-08-09 14:55:09 -06:00
homing: Remove EndstopError
There's no reason to distinguish between an EndstopError and a CommandError, so just use CommandError. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
1f3a160f47
commit
f6dd97b784
11 changed files with 21 additions and 25 deletions
|
@ -4,7 +4,7 @@
|
|||
#
|
||||
# This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
import logging
|
||||
import stepper, homing
|
||||
import stepper
|
||||
|
||||
class CartKinematics:
|
||||
def __init__(self, toolhead, config):
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#
|
||||
# This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
import logging, math
|
||||
import stepper, homing
|
||||
import stepper
|
||||
|
||||
class CoreXYKinematics:
|
||||
def __init__(self, toolhead, config):
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#
|
||||
# This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
import logging, math
|
||||
import stepper, homing
|
||||
import stepper
|
||||
|
||||
class CoreXZKinematics:
|
||||
def __init__(self, toolhead, config):
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#
|
||||
# This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
import math, logging
|
||||
import stepper, homing, mathutil
|
||||
import stepper, mathutil
|
||||
|
||||
# Slow moves once the ratio of tower to XY movement exceeds SLOW_RATIO
|
||||
SLOW_RATIO = 3.
|
||||
|
|
|
@ -107,13 +107,13 @@ class PrinterExtruder:
|
|||
def check_move(self, move):
|
||||
axis_r = move.axes_r[3]
|
||||
if not self.heater.can_extrude:
|
||||
raise homing.EndstopError(
|
||||
raise self.printer.command_error(
|
||||
"Extrude below minimum temp\n"
|
||||
"See the 'min_extrude_temp' config option for details")
|
||||
if (not move.axes_d[0] and not move.axes_d[1]) or axis_r < 0.:
|
||||
# Extrude only move (or retraction move) - limit accel and velocity
|
||||
if abs(move.axes_d[3]) > self.max_e_dist:
|
||||
raise homing.EndstopError(
|
||||
raise self.printer.command_error(
|
||||
"Extrude only move too long (%.3fmm vs %.3fmm)\n"
|
||||
"See the 'max_extrude_only_distance' config"
|
||||
" option for details" % (move.axes_d[3], self.max_e_dist))
|
||||
|
@ -127,7 +127,7 @@ class PrinterExtruder:
|
|||
area = axis_r * self.filament_area
|
||||
logging.debug("Overextrude: %s vs %s (area=%.3f dist=%.3f)",
|
||||
axis_r, self.max_extrude_ratio, area, move.move_d)
|
||||
raise homing.EndstopError(
|
||||
raise self.printer.command_error(
|
||||
"Move exceeds maximum extrusion (%.3fmm^2 vs %.3fmm^2)\n"
|
||||
"See the 'max_extrude_cross_section' config option for details"
|
||||
% (area, self.max_extrude_ratio * self.filament_area))
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#
|
||||
# This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
import logging, math
|
||||
import stepper, homing
|
||||
import stepper
|
||||
|
||||
class PolarKinematics:
|
||||
def __init__(self, toolhead, config):
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#
|
||||
# This file may be distributed under the terms of the GNU GPLv3 license.
|
||||
import math, logging
|
||||
import stepper, homing, mathutil, chelper
|
||||
import stepper, mathutil, chelper
|
||||
|
||||
class RotaryDeltaKinematics:
|
||||
def __init__(self, toolhead, config):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue