diff --git a/README.md b/README.md index fb37b8f..9cd7ead 100644 --- a/README.md +++ b/README.md @@ -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, @@ -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 diff --git a/shaketune/helpers/accelerometer.py b/shaketune/helpers/accelerometer.py index 6f7e6a1..3fc1f5c 100644 --- a/shaketune/helpers/accelerometer.py +++ b/shaketune/helpers/accelerometer.py @@ -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: