Skip to content

Commit

Permalink
minor changes and fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
Frix-x committed Oct 20, 2024
1 parent 69bbe2f commit 359c129
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Follow these steps to install Shake&Tune on your printer:
# their names manually, which can be useful if you prefer to encapsulate them into your own macros.
# timeout: 600
# This defines the maximum processing time (in seconds) to allow to Shake&Tune for generating
# graphs from a .stdata file. 10 minutes should be more than enough in most case, but if you have
# graphs from a .stdata file. 10 minutes should be more than enough in most cases, but if you have
# slower hardware (e.g., older SD cards or low-performance devices), increase it to prevent timeouts.
# measurements_chunk_size: 2
# Each Shake&Tune command uses the accelerometer to take multiple measurements. By default,
Expand All @@ -46,7 +46,7 @@ Follow these steps to install Shake&Tune on your printer:
# conservative setting to avoid Klipper Timer Too Close errors on lower end devices with little
# RAM, and should work for everyone. However, if you are using a powerful computer, you may
# wish to increase this value to keep more measurements in memory (e.g., 15-20) before writing
# the chunk and avoid stressing the SD card too much.
# the chunk and avoid stressing the filesystem too much.
# dpi: 300
# Controls the resolution of the generated graphs. The default value of 300 dpi was optimized
# and strikes a balance between performance and readability, ensuring that graphs are clear
Expand Down
5 changes: 1 addition & 4 deletions shaketune/helpers/accelerometer.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,7 @@ def __init__(self, chunk_size: int):
self._write_processes = []

def clear_measurements(self, keep_last: bool = False):
if keep_last:
self.measurements = [self.measurements[-1]]
else:
self.measurements = []
self.measurements = [self.measurements[-1]] if keep_last else []

def append_samples_to_last_measurement(self, additional_samples: SamplesList):
try:
Expand Down

0 comments on commit 359c129

Please sign in to comment.