aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras
diff options
context:
space:
mode:
authorThijs Triemstra <info@collab.nl>2025-07-25 18:31:19 +0200
committerGitHub <noreply@github.com>2025-07-25 12:31:19 -0400
commit60879fd298fe3b4f3dda63561e6a1c9bdc5ee9af (patch)
tree74cd5c84ca4758c2de14f0fd1686b75a74bfa142 /klippy/extras
parentef4c76fe9494d0e011d6da5610fa868d2e702fff (diff)
downloadkutter-60879fd298fe3b4f3dda63561e6a1c9bdc5ee9af.tar.gz
kutter-60879fd298fe3b4f3dda63561e6a1c9bdc5ee9af.tar.xz
kutter-60879fd298fe3b4f3dda63561e6a1c9bdc5ee9af.zip
klippy: fix typos in python code (#6989)
Signed-off-by: Thijs Triemstra <info@collab.nl>
Diffstat (limited to 'klippy/extras')
-rw-r--r--klippy/extras/angle.py2
-rw-r--r--klippy/extras/bed_mesh.py10
-rw-r--r--klippy/extras/display/__init__.py2
-rw-r--r--klippy/extras/display/font8x14.py2
-rw-r--r--klippy/extras/firmware_retraction.py2
-rw-r--r--klippy/extras/htu21d.py2
-rw-r--r--klippy/extras/load_cell.py2
-rw-r--r--klippy/extras/palette2.py2
-rw-r--r--klippy/extras/quad_gantry_level.py2
-rw-r--r--klippy/extras/resonance_tester.py4
-rw-r--r--klippy/extras/sht3x.py4
-rw-r--r--klippy/extras/smart_effector.py2
-rw-r--r--klippy/extras/sos_filter.py2
-rw-r--r--klippy/extras/temperature_probe.py8
-rw-r--r--klippy/extras/thermistor.py4
15 files changed, 25 insertions, 25 deletions
diff --git a/klippy/extras/angle.py b/klippy/extras/angle.py
index 3b1f323e..73af67ca 100644
--- a/klippy/extras/angle.py
+++ b/klippy/extras/angle.py
@@ -97,7 +97,7 @@ class AngleCalibration:
return None
return self.mcu_stepper.mcu_to_commanded_position(self.mcu_pos_offset)
def load_calibration(self, angles):
- # Calculate linear intepolation calibration buckets by solving
+ # Calculate linear interpolation calibration buckets by solving
# linear equations
angle_max = 1 << ANGLE_BITS
calibration_count = 1 << CALIBRATION_BITS
diff --git a/klippy/extras/bed_mesh.py b/klippy/extras/bed_mesh.py
index 3f0498ff..a8e5764c 100644
--- a/klippy/extras/bed_mesh.py
+++ b/klippy/extras/bed_mesh.py
@@ -34,7 +34,7 @@ def constrain(val, min_val, max_val):
def lerp(t, v0, v1):
return (1. - t) * v0 + t * v1
-# retreive commma separated pair from config
+# retrieve comma separated pair from config
def parse_config_pair(config, option, default, minval=None, maxval=None):
pair = config.getintlist(option, (default, default))
if len(pair) != 2:
@@ -54,7 +54,7 @@ def parse_config_pair(config, option, default, minval=None, maxval=None):
% (option, str(maxval)))
return pair
-# retreive commma separated pair from a g-code command
+# retrieve comma separated pair from a g-code command
def parse_gcmd_pair(gcmd, name, minval=None, maxval=None):
try:
pair = [int(v.strip()) for v in gcmd.get(name).split(',')]
@@ -74,7 +74,7 @@ def parse_gcmd_pair(gcmd, name, minval=None, maxval=None):
% (name, maxval))
return pair
-# retreive commma separated coordinate from a g-code command
+# retrieve comma separated coordinate from a g-code command
def parse_gcmd_coord(gcmd, name):
try:
v1, v2 = [float(v.strip()) for v in gcmd.get(name).split(',')]
@@ -914,7 +914,7 @@ class ProbeManager:
for i in range(y_cnt):
for j in range(x_cnt):
if not i % 2:
- # move in positive directon
+ # move in positive direction
pos_x = min_x + j * x_dist
else:
# move in negative direction
@@ -1164,7 +1164,7 @@ class ProbeManager:
def _gen_arc(self, origin, radius, start, step, count):
end = start + step * count
- # create a segent for every 3 degress of travel
+ # create a segent for every 3 degrees of travel
for angle in range(start, end, step):
rad = math.radians(angle % 360)
opp = math.sin(rad) * radius
diff --git a/klippy/extras/display/__init__.py b/klippy/extras/display/__init__.py
index 1cea00e0..da0e861c 100644
--- a/klippy/extras/display/__init__.py
+++ b/klippy/extras/display/__init__.py
@@ -12,7 +12,7 @@ def load_config_prefix(config):
if not config.has_section('display'):
raise config.error(
"A primary [display] section must be defined in printer.cfg "
- "to use auxilary displays")
+ "to use auxiliary displays")
name = config.get_name().split()[-1]
if name == "display":
raise config.error(
diff --git a/klippy/extras/display/font8x14.py b/klippy/extras/display/font8x14.py
index 3d16ee25..66592edb 100644
--- a/klippy/extras/display/font8x14.py
+++ b/klippy/extras/display/font8x14.py
@@ -13,7 +13,7 @@
# ftp://ftp.simtel.net/pub/simtelnet/msdos/screen/fntcol16.zip
# (c) Joseph Gil
#
-# Indivdual fonts are public domain
+# Individual fonts are public domain
######################################################################
VGA_FONT = [
diff --git a/klippy/extras/firmware_retraction.py b/klippy/extras/firmware_retraction.py
index bcecf8f2..da0d67af 100644
--- a/klippy/extras/firmware_retraction.py
+++ b/klippy/extras/firmware_retraction.py
@@ -43,7 +43,7 @@ class FirmwareRetraction:
self.unretract_length = (self.retract_length
+ self.unretract_extra_length)
self.is_retracted = False
- cmd_GET_RETRACTION_help = ("Report firmware retraction paramters")
+ cmd_GET_RETRACTION_help = ("Report firmware retraction parameters")
def cmd_GET_RETRACTION(self, gcmd):
gcmd.respond_info("RETRACT_LENGTH=%.5f RETRACT_SPEED=%.5f"
" UNRETRACT_EXTRA_LENGTH=%.5f UNRETRACT_SPEED=%.5f"
diff --git a/klippy/extras/htu21d.py b/klippy/extras/htu21d.py
index 01b3750d..688338d9 100644
--- a/klippy/extras/htu21d.py
+++ b/klippy/extras/htu21d.py
@@ -158,7 +158,7 @@ class HTU21D:
def _sample_htu21d(self, eventtime):
try:
- # Read Temeprature
+ # Read Temperature
if self.hold_master_mode:
params = self.i2c.i2c_write([HTU21D_COMMANDS['HTU21D_TEMP']])
else:
diff --git a/klippy/extras/load_cell.py b/klippy/extras/load_cell.py
index 4117a92c..5ef2c5b7 100644
--- a/klippy/extras/load_cell.py
+++ b/klippy/extras/load_cell.py
@@ -53,7 +53,7 @@ class ApiClientHelper(object):
wh = self.printer.lookup_object('webhooks')
wh.register_mux_endpoint(path, key, value, self._add_webhooks_client)
-# Class for handling commands related ot load cells
+# Class for handling commands related to load cells
class LoadCellCommandHelper:
def __init__(self, config, load_cell):
self.printer = config.get_printer()
diff --git a/klippy/extras/palette2.py b/klippy/extras/palette2.py
index ec8631b0..4fe72080 100644
--- a/klippy/extras/palette2.py
+++ b/klippy/extras/palette2.py
@@ -235,7 +235,7 @@ class Palette2:
"Initialize the print, and check connection with the Palette 2")
def cmd_O1(self, gcmd):
- logging.info("Initializing print with Pallete 2")
+ logging.info("Initializing print with Palette 2")
if not self._check_P2(gcmd):
raise self.printer.command_error(
"Cannot initialize print, palette 2 is not connected")
diff --git a/klippy/extras/quad_gantry_level.py b/klippy/extras/quad_gantry_level.py
index 7c6febcb..98cd53c5 100644
--- a/klippy/extras/quad_gantry_level.py
+++ b/klippy/extras/quad_gantry_level.py
@@ -1,4 +1,4 @@
-# Mechanicaly conforms a moving gantry to the bed with 4 Z steppers
+# Mechanically conforms a moving gantry to the bed with 4 Z steppers
#
# Copyright (C) 2018 Maks Zolin <mzolin@vorondesign.com>
#
diff --git a/klippy/extras/resonance_tester.py b/klippy/extras/resonance_tester.py
index a4d3876f..ff32dcac 100644
--- a/klippy/extras/resonance_tester.py
+++ b/klippy/extras/resonance_tester.py
@@ -295,7 +295,7 @@ class ResonanceTester:
return parsed_chips
def _get_max_calibration_freq(self):
return 1.5 * self.generator.get_max_freq()
- cmd_TEST_RESONANCES_help = ("Runs the resonance test for a specifed axis")
+ cmd_TEST_RESONANCES_help = ("Runs the resonance test for a specified axis")
def cmd_TEST_RESONANCES(self, gcmd):
# Parse parameters
axis = _parse_axis(gcmd, gcmd.get("AXIS").lower())
@@ -345,7 +345,7 @@ class ResonanceTester:
gcmd.respond_info(
"Resonances data written to %s file" % (csv_name,))
cmd_SHAPER_CALIBRATE_help = (
- "Simular to TEST_RESONANCES but suggest input shaper config")
+ "Similar to TEST_RESONANCES but suggest input shaper config")
def cmd_SHAPER_CALIBRATE(self, gcmd):
# Parse parameters
axis = gcmd.get("AXIS", None)
diff --git a/klippy/extras/sht3x.py b/klippy/extras/sht3x.py
index 79cd7bfe..c76ceb76 100644
--- a/klippy/extras/sht3x.py
+++ b/klippy/extras/sht3x.py
@@ -100,12 +100,12 @@ class SHT3X:
self.i2c.i2c_write_wait_ack(
SHT3X_CMD['PERIODIC']['2HZ']['HIGH_REP']
)
- # Wait <=15.5ms for first measurment
+ # Wait <=15.5ms for first measurement
self.reactor.pause(self.reactor.monotonic() + .0155)
def _sample_sht3x(self, eventtime):
try:
- # Read measurment
+ # Read measurement
retries = 5
params = None
error = None
diff --git a/klippy/extras/smart_effector.py b/klippy/extras/smart_effector.py
index 4b90c309..3caa4e6b 100644
--- a/klippy/extras/smart_effector.py
+++ b/klippy/extras/smart_effector.py
@@ -129,7 +129,7 @@ class SmartEffectorProbe:
start_time = toolhead.get_last_move_time()
# Write generated bits to the control pin
end_time = self.control_pin.write_bits(start_time, bit_stream)
- # Dwell to make sure no subseqent actions are queued together
+ # Dwell to make sure no subsequent actions are queued together
# with the SmartEffector programming
toolhead.dwell(end_time - start_time)
toolhead.wait_moves()
diff --git a/klippy/extras/sos_filter.py b/klippy/extras/sos_filter.py
index 8c405782..293b2258 100644
--- a/klippy/extras/sos_filter.py
+++ b/klippy/extras/sos_filter.py
@@ -116,7 +116,7 @@ class FixedPointSosFilter:
if col != 3: # omit column 3
fixed_coeff = to_fixed_32(coeff, self._coeff_int_bits)
fixed_section.append(fixed_coeff)
- elif coeff != 1.0: # double check colum 3 is always 1.0
+ elif coeff != 1.0: # double check column 3 is always 1.0
raise ValueError("Coefficient 3 is expected to be 1.0"
" but was %f" % (coeff,))
sos_fixed.append(fixed_section)
diff --git a/klippy/extras/temperature_probe.py b/klippy/extras/temperature_probe.py
index 05eac34e..c480ddae 100644
--- a/klippy/extras/temperature_probe.py
+++ b/klippy/extras/temperature_probe.py
@@ -408,7 +408,7 @@ class TemperatureProbe:
except self.printer.command_error:
self._finalize_drift_cal(False, "Error during initial move")
raise
- # Caputure start position and begin initial probe
+ # Capture start position and begin initial probe
toolhead = self.printer.lookup_object("toolhead")
self.start_pos = toolhead.get_position()[:2]
manual_probe.ManualProbeHelper(
@@ -637,7 +637,7 @@ class EddyDriftCompensation:
gcode = self.printer.lookup_object("gcode")
if len(cal_samples) < 3:
raise gcode.error(
- "calbration error, not enough samples"
+ "calibration error, not enough samples"
)
min_temp, _ = cal_samples[0][0]
max_temp, _ = cal_samples[-1][0]
@@ -687,7 +687,7 @@ class EddyDriftCompensation:
return self._calc_freq(freq, origin_temp, self.cal_temp)
def unadjust_freq(self, freq, dest_temp=None):
- # Given a frequency and its orignal sampled temp, find the
+ # Given a frequency and its original sampled temp, find the
# offset frequency based on the current temp
if not self.enabled or freq < self.min_freq:
return freq
@@ -703,7 +703,7 @@ class EddyDriftCompensation:
low_freq = poly(origin_temp)
if freq >= low_freq:
if high_freq is None:
- # Freqency above max calibration value
+ # Frequency above max calibration value
err = poly(dest_temp) - low_freq
return freq + err
t = min(1., max(0., (freq - low_freq) / (high_freq - low_freq)))
diff --git a/klippy/extras/thermistor.py b/klippy/extras/thermistor.py
index 16d6ca61..db26b50c 100644
--- a/klippy/extras/thermistor.py
+++ b/klippy/extras/thermistor.py
@@ -15,7 +15,7 @@ class Thermistor:
self.inline_resistor = inline_resistor
self.c1 = self.c2 = self.c3 = 0.
def setup_coefficients(self, t1, r1, t2, r2, t3, r3, name=""):
- # Calculate Steinhart-Hart coefficents from temp measurements.
+ # Calculate Steinhart-Hart coefficients from temp measurements.
# Arrange samples as 3 linear equations and solve for c1, c2, and c3.
inv_t1 = 1. / (t1 - KELVIN_TO_CELSIUS)
inv_t2 = 1. / (t2 - KELVIN_TO_CELSIUS)
@@ -40,7 +40,7 @@ class Thermistor:
self.c2 = (inv_t12 - self.c3 * ln3_r12) / ln_r12
self.c1 = inv_t1 - self.c2 * ln_r1 - self.c3 * ln3_r1
def setup_coefficients_beta(self, t1, r1, beta):
- # Calculate equivalent Steinhart-Hart coefficents from beta
+ # Calculate equivalent Steinhart-Hart coefficients from beta
inv_t1 = 1. / (t1 - KELVIN_TO_CELSIUS)
ln_r1 = math.log(r1)
self.c3 = 0.