diff options
author | Thijs Triemstra <info@collab.nl> | 2025-07-25 18:31:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-07-25 12:31:19 -0400 |
commit | 60879fd298fe3b4f3dda63561e6a1c9bdc5ee9af (patch) | |
tree | 74cd5c84ca4758c2de14f0fd1686b75a74bfa142 /scripts | |
parent | ef4c76fe9494d0e011d6da5610fa868d2e702fff (diff) | |
download | kutter-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 'scripts')
-rw-r--r-- | scripts/filter_workbench.ipynb | 12 | ||||
-rwxr-xr-x | scripts/flash-sdcard.sh | 2 | ||||
-rwxr-xr-x | scripts/graph_shaper.py | 4 | ||||
-rw-r--r-- | scripts/motan/readlog.py | 2 | ||||
-rw-r--r-- | scripts/spi_flash/spi_flash.py | 8 | ||||
-rwxr-xr-x | scripts/update_chitu.py | 2 |
6 files changed, 15 insertions, 15 deletions
diff --git a/scripts/filter_workbench.ipynb b/scripts/filter_workbench.ipynb index e912ee86..1e1adfe7 100644 --- a/scripts/filter_workbench.ipynb +++ b/scripts/filter_workbench.ipynb @@ -69,7 +69,7 @@ "metadata": {}, "source": [ "## Sensor Information\n", - "Fill out the sensor's sample frequency, in samples per second, below. This must match the frquency of the captured data in `probe_data`." + "Fill out the sensor's sample frequency, in samples per second, below. This must match the frequency of the captured data in `probe_data`." ] }, { @@ -104,7 +104,7 @@ "metadata": {}, "outputs": [], "source": [ - "# set filter settig here. If you dont want a filter to be used, assign `None` to it\n", + "# set filter setting here. If you dont want a filter to be used, assign `None` to it\n", "drift_filter_cutoff_frequency = 0.8\n", "buzz_filter_cutoff_frequency = 150.0\n", "notch_filter_frequencies = [50.0, 60.0]\n", @@ -182,7 +182,7 @@ "### Calculate Filter Initial Consitions (zi)\n", "This block automatically calculates the filters starting conditions using `signal.sosfilt_zi`.\n", "\n", - "On the MCU, the tare functionality zeros out the grams value so the inital zi matrix doesnt have to be calculated and there will be no filter settling time." + "On the MCU, the tare functionality zeros out the grams value so the initial zi matrix doesnt have to be calculated and there will be no filter settling time." ] }, { @@ -214,7 +214,7 @@ "metadata": {}, "source": [ "## Display Filter Frequency Response\n", - "This block plots the filter's response to sinals from 0 up to the [nyquist frequency]() which is 1/2 the `sensor_frequency`. " + "This block plots the filter's response to signals from 0 up to the [nyquist frequency]() which is 1/2 the `sensor_frequency`. " ] }, { @@ -260,7 +260,7 @@ "## Test Filter Performance\n", "Test `filter_design` on `probe_data`. This shows plots of the filters performance when filtering the force graph in `probe_data`.\n", "\n", - "To help decorate the graphs please prvide the desired trigger threashold of the probe:" + "To help decorate the graphs please provide the desired trigger threshold of the probe:" ] }, { @@ -339,7 +339,7 @@ "metadata": {}, "source": [ "#### `force` vs force filtered with `filter_design`\n", - "In this graph we are looking to see the 'Filtered Force' line remain inside the red lines denoting the trigger force. A Properly filtered force grpah will be horizontal." + "In this graph we are looking to see the 'Filtered Force' line remain inside the red lines denoting the trigger force. A Properly filtered force graph will be horizontal." ] }, { diff --git a/scripts/flash-sdcard.sh b/scripts/flash-sdcard.sh index 08886409..6a08eab1 100755 --- a/scripts/flash-sdcard.sh +++ b/scripts/flash-sdcard.sh @@ -1,5 +1,5 @@ #!/bin/bash -# This script launches flash_sdcard.py, a utitlity that enables +# This script launches flash_sdcard.py, a utility that enables # unattended firmware updates on boards with "SD Card" bootloaders # Non-standard installations may need to change this location diff --git a/scripts/graph_shaper.py b/scripts/graph_shaper.py index 0ea19458..b9a6627c 100755 --- a/scripts/graph_shaper.py +++ b/scripts/graph_shaper.py @@ -20,7 +20,7 @@ SHAPER_DAMPING_RATIO=0.1 STEP_SIMULATION_RESONANCE_FREQ=60. STEP_SIMULATION_DAMPING_RATIO=0.15 -# If set, defines which range of frequencies to plot shaper frequency responce +# If set, defines which range of frequencies to plot shaper frequency response PLOT_FREQ_RANGE = [] # If empty, will be automatically determined #PLOT_FREQ_RANGE = [10., 100.] @@ -159,7 +159,7 @@ def find_shaper_plot_range(shaper, vib_tol): return (left, right) def gen_shaper_response(shaper): - # Calculate shaper vibration responce on a range of requencies + # Calculate shaper vibration response on a range of frequencies response = [] freqs = [] freq, freq_end = find_shaper_plot_range(shaper, vib_tol=0.25) diff --git a/scripts/motan/readlog.py b/scripts/motan/readlog.py index 4c078c9b..43c01619 100644 --- a/scripts/motan/readlog.py +++ b/scripts/motan/readlog.py @@ -234,7 +234,7 @@ class HandleStepQ: step_data.append((step_time, step_halfpos, step_pos)) LogHandlers["stepq"] = HandleStepQ -# Extract tmc currect and stallguard data from the log +# Extract tmc current and stallguard data from the log class HandleStallguard: SubscriptionIdParts = 2 ParametersMin = 2 diff --git a/scripts/spi_flash/spi_flash.py b/scripts/spi_flash/spi_flash.py index 2a4b48ad..e45e0b7c 100644 --- a/scripts/spi_flash/spi_flash.py +++ b/scripts/spi_flash/spi_flash.py @@ -46,7 +46,7 @@ def calc_crc7(data, with_padding=True): crc ^= b & 0xFF for i in range(8): crc = (crc << 1) ^ poly if crc & 0x80 else crc << 1 - # The sdcard protocol likes the crc left justfied with a + # The sdcard protocol likes the crc left justified with a # padded bit if not with_padding: return crc @@ -566,7 +566,7 @@ class SDCardSPI: # At this time MMC is not supported if len(resp) == 5: if self.sd_version == 1 and resp[0] == 1: - # Check acceptable volatage range for V1 cards + # Check acceptable voltage range for V1 cards if resp[2] != 0xFF: raise OSError("flash_sdcard: card does not support" " 3.3v range") @@ -903,7 +903,7 @@ class SDCardSDIO: " out of IDLE after reset") if len(resp) == 4: if self.sd_version == 1: - # Check acceptable volatage range for V1 cards + # Check acceptable voltage range for V1 cards if resp[1] != 0xFF: raise OSError("flash_sdcard: card does not support" " 3.3v range") @@ -1643,7 +1643,7 @@ def main(): logging.basicConfig(level=log_level) flash_args = board_defs.lookup_board(args.board) if flash_args is None: - output_line("Unable to find defintion for board: %s" % (args.board,)) + output_line("Unable to find definition for board: %s" % (args.board,)) sys.exit(-1) flash_args['device'] = args.device flash_args['baud'] = args.baud diff --git a/scripts/update_chitu.py b/scripts/update_chitu.py index a1ef4d8b..cf7fcfe9 100755 --- a/scripts/update_chitu.py +++ b/scripts/update_chitu.py @@ -76,7 +76,7 @@ def encode_file(input, output_file, file_length): xor_crc = 0xef3d4323; - # the input file is exepcted to be in chunks of 0x800 + # the input file is expected to be in chunks of 0x800 # so round the size while len(input_file) % block_size != 0: input_file.extend(b'0x0') |