Skip to content

Commit

Permalink
updated defaults config values and README
Browse files Browse the repository at this point in the history
  • Loading branch information
Frix-x committed Sep 25, 2024
1 parent 7e2ff9d commit 69bbe2f
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 19 deletions.
43 changes: 28 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,38 @@ Follow these steps to install Shake&Tune on your printer:
```
[shaketune]
# result_folder: ~/printer_data/config/ShakeTune_results
# The folder where the results will be stored. It will be created if it doesn't exist.
# number_of_results_to_keep: 3
# The number of results to keep in the result folder. The oldest results will
# be automatically deleted after each runs.
# Path where the processed results will be stored. If the folder doesn't exist,
# it will be automatically created. You can change this if you'd like to store
# results in a different location.
# number_of_results_to_keep: 10
# This setting defines how many results you want to keep in the result folder.
# Once the specified number is exceeded, older results will be automatically deleted
# to free up space on the SD card and avoid cluttering the results folder.
# keep_raw_data: False
# If True, the raw data files will be kept in the result folder alongside the
# PNG graphs for archive and debbuging purposes. Please attach them on GitHub when
# reporting any issue to help understand and solve them.
# If set to True, Shake&Tune will store both the processed graphs and the raw accelerometer
# .stdata files in the results folder. This can be useful for debugging or archiving purposes.
# Please always attach them when reporting any issues on GitHub or Discord.
# show_macros_in_webui: True
# Mainsail and Fluidd doesn't create buttons for "system" macros that are not in the
# printer.cfg file. If you want to see the macros in the webui, set this to True.
# Mainsail and Fluidd doesn't create buttons for system commands (macros that are not part
# of the printer.cfg file). This option allow Shake&Tune to inject them into the webui at runtime.
# If set to False, the macros will be hidden but still accessible from the console by typing
# their names manually, which can be useful if you prefer to encapsulate them into your own macros.
# timeout: 600
# The maximum time in seconds to let Shake&Tune process the data and generate the graphs.
# measurements_chunk_size: 15
# The number of measurements to keep in RAM before writing them to disk. This is useful
# to avoid running out of memory when processing large datasets like for the vibrations
# measurements. If you get Timer Too Close errors, try reducing this value (minimum is 2).
# 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
# 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,
# Shake&Tune will write a chunk of data to disk every two measurements, and at the end of the
# command will merge these chunks into the final .stdata file for processing. "2" is a very
# 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.
# dpi: 300
# The resolution of the generated graphs. This usually doesn't need to be changed.
# 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
# without using too much RAM to generate them. Usually, you shouldn't need to change this value.
```

Don't forget to check out **[Shake&Tune documentation here](./docs/README.md)**.
4 changes: 2 additions & 2 deletions shaketune/shaketune.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
from .shaketune_process import ShakeTuneProcess

DEFAULT_FOLDER = '~/printer_data/config/ShakeTune_results'
DEFAULT_NUMBER_OF_RESULTS = 3
DEFAULT_NUMBER_OF_RESULTS = 10
DEFAULT_KEEP_RAW_DATA = False
DEFAULT_DPI = 150
DEFAULT_TIMEOUT = 600
DEFAULT_SHOW_MACROS = True
DEFAULT_MEASUREMENTS_CHUNK_SIZE = 15 # Maximum number of measurements to keep in memory at once
DEFAULT_MEASUREMENTS_CHUNK_SIZE = 2 # Maximum number of measurements to keep in memory at once
ST_COMMANDS = {
'EXCITATE_AXIS_AT_FREQ': (
'Maintain a specified excitation frequency for a period '
Expand Down
4 changes: 2 additions & 2 deletions shaketune/shaketune_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ class ShakeTuneConfig:
def __init__(
self,
result_folder: Path = RESULTS_BASE_FOLDER,
keep_n_results: int = 3,
keep_n_results: int = 10,
keep_raw_data: bool = False,
chunk_size: int = 15,
chunk_size: int = 2,
dpi: int = 150,
) -> None:
self._result_folder = result_folder
Expand Down

0 comments on commit 69bbe2f

Please sign in to comment.