Skip to content

Commit

Permalink
small improvements to the IS and vibration docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Frix-x committed Jun 18, 2023
1 parent e070cde commit 6195dcc
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 12 deletions.
18 changes: 12 additions & 6 deletions docs/features/is_workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,32 @@ Results can be found in the [ADXL results folder](./../../adxl_results/) that is
## Installation

1. Copy the [IS_shaper_calibrate.cfg](./../../macros/calibration/IS_shaper_calibrate.cfg) macro file directly into your own config.
2. Be sure to have the `gcode_shell_command.py` Klipper extension installed. Easiest way to install it is to use the advanced section of KIAUH.
2. Be sure to have the `gcode_shell_command.py` Klipper extension installed. Easiest way to install it is to use the advanced section of KIAUH. This is done automatically when running Klippain.
3. Add my [scripts](./../../scripts/) folder at the root of your own config (ie. in your `~/printer_data/config/` directory).

Note: if using Windows to do the copy/paste of the files, be careful with the line endings for the `plot_graphs.sh` file and the `graph_vibrations.py` file: **Linux line endings (LF or \n) are mandatory!** If the file are using Windows line endings, you will get errors like `\r : unknown command` when running the script. If you're not confident regarding your text editor behavior, the best way is to directly download the files on the pi by using for example wget over SSH:

```
```bash
wget -P ~/printer_data/config/scripts https://raw.githubusercontent.com/Frix-x/klippain/main/scripts/plot_graphs.sh
wget -P ~/printer_data/config/scripts https://raw.githubusercontent.com/Frix-x/klippain/main/scripts/graph_vibrations.py
```

4. Make the scripts executable using SSH. When in the folder, use:
4. Make the scripts executable using SSH. When in the folder (`cd ~/printer_data/config/scripts`), use:

```
```bash
chmod +x ./plot_graphs.sh
chmod +x ./graph_vibrations.py
```

5. Include the `shell_commands.cfg` to your config to be able to call the plot_graphs script. You can either copy/paste its content to your own `printer.cfg` file or just include it using `[include path/to/shell_commands.cfg]`.
5. Add this new section at the end of your `printer.cfg` file:
```
[gcode_shell_command plot_graph]
command: bash /home/pi/printer_data/config/scripts/plot_graphs.sh
timeout: 500.0
verbose: True
```

Note: if your user is not `pi`, please correct it in the `[gcode_shell_command plot_graph]` command accordingly.
Note: if your user is not `pi`, please correct the path in the command accordingly.

6. (Optional) You can modify the first lines of the `plot_graphs.sh` script to configure where you want to store the results. Default: `~/printer_data/config/adxl_results`

Expand Down
18 changes: 12 additions & 6 deletions docs/features/vibr_measurements.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,32 @@ Results can be found in the [ADXL results folder](./../../adxl_results/) that is
## Installation

1. Copy the [IS_vibrations_measurement.cfg](./../../macros/calibration/IS_vibrations_measurement.cfg) macro file directly into your own config.
2. Be sure to have the `gcode_shell_command.py` Klipper extension installed. Easiest way to install it is to use the advanced section of KIAUH.
2. Be sure to have the `gcode_shell_command.py` Klipper extension installed. Easiest way to install it is to use the advanced section of KIAUH. This is done automatically when running Klippain.
3. Add my [scripts](./../../scripts/) folder at the root of your own config (ie. in your `~/printer_data/config/` directory).

Note: if using Windows to do the copy/paste of the files, be careful with the line endings for the `plot_graphs.sh` file and the `graph_vibrations.py` file: **Linux line endings (LF or \n) are mandatory!** If the file are using Windows line endings, you will get errors like `\r : unknown command` when running the script. If you're not confident regarding your text editor behavior, the best way is to directly download the files on the pi by using for example wget over SSH:

```
```bash
wget -P ~/printer_data/config/scripts https://raw.githubusercontent.com/Frix-x/klippain/main/scripts/plot_graphs.sh
wget -P ~/printer_data/config/scripts https://raw.githubusercontent.com/Frix-x/klippain/main/scripts/graph_vibrations.py
```

4. Make the scripts executable using SSH. When in the folder, use:
4. Make the scripts executable using SSH. When in the folder (`cd ~/printer_data/config/scripts`), use:

```
```bash
chmod +x ./plot_graphs.sh
chmod +x ./graph_vibrations.py
```

5. Include the `shell_commands.cfg` to your config to be able to call the plot_graphs script. You can either copy/paste its content to your own `printer.cfg` file or just include it using `[include path/to/shell_commands.cfg]`.
5. Add this new section at the end of your `printer.cfg` file:
```
[gcode_shell_command plot_graph]
command: bash /home/pi/printer_data/config/scripts/plot_graphs.sh
timeout: 500.0
verbose: True
```

Note: if your user is not `pi`, please correct it in the `[gcode_shell_command plot_graph]` command accordingly.
Note: if your user is not `pi`, please correct the path in the command accordingly.

6. (Optional) You can modify the first lines of the `plot_graphs.sh` script to configure where you want to store the results. Default: `~/printer_data/config/adxl_results`

Expand Down

0 comments on commit 6195dcc

Please sign in to comment.