Skip to content

Commit

Permalink
Merge pull request #452 from Frix-x/develop
Browse files Browse the repository at this point in the history
v4.3.0
  • Loading branch information
Frix-x authored Feb 27, 2024
2 parents 4dd8a61 + 20f41e8 commit eeb4916
Show file tree
Hide file tree
Showing 161 changed files with 4,288 additions and 2,727 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Mark and Manage Stale Issues and Pull Requests

on:
schedule:
- cron: '30 7 * * *'

jobs:
stale:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write

steps:
- uses: actions/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 30
days-before-close: 14
stale-issue-message: >
📌 **This issue has been marked as stale because it has not had activity in the past 30 days.**
To keep it open, please respond to this message or add new information. Otherwise, this will be closed in 14 days.
Thank you for your contributions!
stale-pr-message: >
📌 **This pull request has been marked as stale because it has not had activity in the past 30 days.**
Please update the PR or comment to keep it active. Otherwise, this will be closed in 14 days.
We appreciate your contribution!
stale-issue-label: 'stale'
stale-pr-label: 'stale, reviewer-needed'
exempt-issue-labels: 'tracking'
exempt-pr-labels: 'tracking'
close-issue-message: 'This issue was closed due to inactivity for 14 days. Feel free to reopen it if you think it was an error or if you have new information or progress to share'
close-pr-message: 'This pull request was closed due to inactivity for 14 days. Please reopen it if you think it was an error or if you wish to continue the contribution.'
exempt-all-milestones: true
exempt-all-assignees: true
exempt-draft-prs: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
/*.cfg
/*.conf
/.VERSION
/scripts/K-ShakeTune


# -------------------------------------------------------------------
Expand Down
114 changes: 57 additions & 57 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
# Klippain

> Klippain - The pain-free recipe for (french)bread and butter Klipper configuration!
Klippain is a generic, modular, and highly customizable Klipper configuration for 3D printers. Designed for use on various machines such as Cartesian, CoreXY and CoreXZ, it has been reported working correctly on Voron V2.4, Voron Trident, Voron V0, Voron SwitchWire, TriZero, VZbot, Ender5, Ender3, Prusas, etc...

![Klippain](./docs/klippain.png)

Klippain is regularly updated with new features and merged PRs from users. You can reach me on the Voron Discord as **Frix_x#0161**.

Fun fact: "pain" \pɛ̃\ is the French word for bread, so there's no pain in this pain—only joy! Thanks to the French channel "honhonhonbaguette-FR" on the Voron Discord for the joke and name suggestion!


## Features

Klippain is designed for versatility. By selecting and enabling the desired hardware and software options, it can be used on a wide range of machines.

Custom features available out of the box include **adaptive bed mesh**, **custom printer calibration macros**, **automated input shaper workflows**, and **vibration measurement** macros and scripts, ... Refer to the [features documentation](./docs/features.md) for a detailed list and usage instructions.


## Installation

To install Klippain, first ensure you have already Klipper, Moonraker, and a WebUI installed on your printer. If not, use [KIAUH](https://github.com/th33xitus/kiauh).

Then, run the installation script using the following command over SSH. This script will backup your old configuration, download this GitHub repository to your RaspberryPi home directory, and set up Klippain in `~/printer_data/config`. You will also be prompted to select and install MCU board_pins templates. This is recommended for faster `mcu.cfg` setup, but you can do it manually later if you prefer.

```bash
wget -O - https://raw.githubusercontent.com/Frix-x/klippain/main/install.sh | bash
```

Finally, Klippain requires a few simple steps to configure and customize it for your printer: please follow the [configuration guide](./docs/configuration.md).

> **Warning**
>
> General rule to keep the auto-update feature working: **never modify Klippain files directly**, but instead add overrides as per the documentation! To proceed, you can modify all the pre-installed templates in your config root folder (`printer.cfg`, `mcu.cfg`, `variables.cfg` and `overrides.cfg`) as they will be preserved on update.

## Removing Klippain

In case Klippain doesn't suit your needs or if you installed it by mistake, you can easily remove Klippain and revert to your previous configuration by using the automated uninstall script. During the uninstallation process, the script will remove all specific Klippain files and configurations. Additionally, you will be given an option to restore your previously backed-up configuration, allowing your printer to return to its last working state (from before Klippain was installed).

To run the uninstall script, execute the following command over SSH:

```bash
wget -O - https://raw.githubusercontent.com/Frix-x/klippain/main/uninstall.sh | bash
```

> **Note**
>
> All backups are preserved during the uninstallation process. So, you can easily revert back at any time if you wish to :stuck_out_tongue_winking_eye:

## Support the Project

I strive to accommodate user requests that align with this configuration's design. Feel free to open an issue or a PR for specific hardware device support or new features.

Alternatively, consider buying me a coffee or contributing to new hardware purchases to support my work!
# Klippain

> Klippain - The pain-free recipe for (french)bread and butter Klipper configuration!
Klippain is a generic, modular, and highly customizable Klipper configuration for 3D printers. Designed for use on various machines such as Cartesian, CoreXY and CoreXZ, it has been reported working correctly on Voron V2.4, Voron Trident, Voron V0, Voron SwitchWire, TriZero, VZbot, Ender5, Ender3, Prusas, etc...

![Klippain](./docs/klippain.png)

Klippain is regularly updated with new features and merged PRs from users. You can reach me on the Voron Discord as **Frix_x#0161**.

Fun fact: "pain" \pɛ̃\ is the French word for bread, so there's no pain in this pain—only joy! Thanks to the French channel "honhonhonbaguette-FR" on the Voron Discord for the joke and name suggestion!


## Features

Klippain is designed for versatility. By selecting and enabling the desired hardware and software options, it can be used on a wide range of machines.

Custom features available out of the box include a full featured set of standard macros, **adaptive bed mesh**, **custom printer calibrations**, **automated input shaper workflows**, and **vibration measurement** macros and scripts, ... Refer to the [features documentation](./docs/features.md) for a detailed list and usage instructions.


## Installation

To install Klippain, first ensure you have already Klipper, Moonraker, and a WebUI installed on your printer. If not, you can use [KIAUH](https://github.com/th33xitus/kiauh).

Then, run the installation script using the following command over SSH. This script will backup your old configuration, download this GitHub repository to your RaspberryPi home directory, and set up Klippain in `~/printer_data/config`. You will also be prompted to select and install MCU board_pins templates. This is recommended for faster `mcu.cfg` setup, but you can do it manually later if you prefer.

```bash
wget -O - https://raw.githubusercontent.com/Frix-x/klippain/main/install.sh | bash
```

Finally, Klippain requires a few simple steps to configure and customize it for your printer: please follow the [configuration guide](./docs/configuration.md).

> **Warning**:
>
> General rule to keep the auto-update feature working: **never modify Klippain files directly**, but instead add overrides as per [the documentation](./docs/overrides.md)! To proceed, you can modify all the pre-installed templates in your config root folder (`printer.cfg`, `mcu.cfg`, `variables.cfg` and `overrides.cfg`) as they will be preserved on update.

## Removing Klippain

In case Klippain doesn't suit your needs or if you installed it by mistake, you can easily remove Klippain and revert to your previous configuration by using the automated uninstall script. During the uninstallation process, the script will remove all specific Klippain files and configurations. Additionally, you will be given an option to restore your previously backed-up configuration, allowing your printer to return to its last working state (from before Klippain was installed).

To run the uninstall script, execute the following command over SSH:

```bash
wget -O - https://raw.githubusercontent.com/Frix-x/klippain/main/uninstall.sh | bash
```

> **Note**:
>
> All backups are preserved during the uninstallation process. So, you can easily revert back at any time if you wish to :stuck_out_tongue_winking_eye:

## Support the Project

I strive to accommodate user requests that align with this configuration's design. Feel free to open an issue or a PR for specific hardware device support or new features.

Alternatively, consider buying me a coffee or contributing to new hardware purchases to support my work!
8 changes: 8 additions & 0 deletions config/hardware/accelerometers/adxl345_Fysetc_SB_Can_TH.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[include generics/adxl345_software_spi.cfg]

# As it's a toolhead ADXL, we add some default pins overrides from here
[adxl345]
cs_pin: toolhead:ADXL_CS
spi_software_sclk_pin: toolhead:ADXL_SCLK
spi_software_mosi_pin: toolhead:ADXL_MOSI
spi_software_miso_pin: toolhead:ADXL_MISO
3 changes: 1 addition & 2 deletions config/hardware/accelerometers/adxl345_rpi.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@ probe_points:
# Include the IS calibration macros to unlock them when
# an accelerometer is installed on the machine
[include ../../../macros/helpers/resonance_override.cfg]
[include ../../../macros/calibration/IS_shaper_calibrate.cfg]
[include ../../../macros/calibration/IS_vibrations_measurement.cfg]
[include ../../../scripts/K-ShakeTune/K-SnT_*.cfg]
3 changes: 1 addition & 2 deletions config/hardware/accelerometers/adxl345_usb.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,4 @@ probe_points:
# Include the IS calibration macros to unlock them when
# an accelerometer is installed on the machine
[include ../../../macros/helpers/resonance_override.cfg]
[include ../../../macros/calibration/IS_shaper_calibrate.cfg]
[include ../../../macros/calibration/IS_vibrations_measurement.cfg]
[include ../../../scripts/K-ShakeTune/K-SnT_*.cfg]
3 changes: 1 addition & 2 deletions config/hardware/accelerometers/adxl345_usb_rampon.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@ probe_points:
# Include the IS calibration macros to unlock them when
# an accelerometer is installed on the machine
[include ../../../macros/helpers/resonance_override.cfg]
[include ../../../macros/calibration/IS_shaper_calibrate.cfg]
[include ../../../macros/calibration/IS_vibrations_measurement.cfg]
[include ../../../scripts/K-ShakeTune/K-SnT_*.cfg]
3 changes: 1 addition & 2 deletions config/hardware/accelerometers/adxl345_usb_rp2040_spi1.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,4 @@ probe_points:
# Include the IS calibration macros to unlock them when
# an accelerometer is installed on the machine
[include ../../../macros/helpers/resonance_override.cfg]
[include ../../../macros/calibration/IS_shaper_calibrate.cfg]
[include ../../../macros/calibration/IS_vibrations_measurement.cfg]
[include ../../../scripts/K-ShakeTune/K-SnT_*.cfg]
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@ probe_points:
# Include the IS calibration macros to unlock them when
# an accelerometer is installed on the machine
[include ../../../../macros/helpers/resonance_override.cfg]
[include ../../../../macros/calibration/IS_shaper_calibrate.cfg]
[include ../../../../macros/calibration/IS_vibrations_measurement.cfg]
[include ../../../../scripts/K-ShakeTune/K-SnT_*.cfg]
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ probe_points:
# Include the IS calibration macros to unlock them when
# an accelerometer is installed on the machine
[include ../../../../macros/helpers/resonance_override.cfg]
[include ../../../../macros/calibration/IS_shaper_calibrate.cfg]
[include ../../../../macros/calibration/IS_vibrations_measurement.cfg]
[include ../../../../scripts/K-ShakeTune/K-SnT_*.cfg]
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,4 @@ probe_points:
# Include the IS calibration macros to unlock them when
# an accelerometer is installed on the machine
[include ../../../../macros/helpers/resonance_override.cfg]
[include ../../../../macros/calibration/IS_shaper_calibrate.cfg]
[include ../../../../macros/calibration/IS_vibrations_measurement.cfg]
[include ../../../../scripts/K-ShakeTune/K-SnT_*.cfg]
5 changes: 2 additions & 3 deletions config/hardware/accelerometers/lis2dw_usb_rp2040_spi1.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ serial: /dev/serial/by-id/xxx
[lis2dw]
cs_pin: lis2dw_mcu:gpio9
spi_bus: spi1a
axes_map: -y,x,-z
axes_map: x,y,z

[resonance_tester]
accel_chip: lis2dw
Expand All @@ -22,5 +22,4 @@ probe_points:
# Include the IS calibration macros to unlock them when
# an accelerometer is installed on the machine
[include ../../../macros/helpers/resonance_override.cfg]
[include ../../../macros/calibration/IS_shaper_calibrate.cfg]
[include ../../../macros/calibration/IS_vibrations_measurement.cfg]
[include ../../../scripts/K-ShakeTune/K-SnT_*.cfg]
2 changes: 1 addition & 1 deletion config/hardware/axis/X/TMC/TMC5160.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ spi_software_mosi_pin: DRIVER_SPI_MOSI
spi_software_miso_pin: DRIVER_SPI_MISO
interpolate: True
run_current: 0.8
sense_resistor: 0.110
sense_resistor: 0.075
stealthchop_threshold: 0
2 changes: 1 addition & 1 deletion config/hardware/axis/Y/TMC/TMC5160.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ spi_software_mosi_pin: DRIVER_SPI_MOSI
spi_software_miso_pin: DRIVER_SPI_MISO
interpolate: True
run_current: 0.8
sense_resistor: 0.110
sense_resistor: 0.075
stealthchop_threshold: 0
18 changes: 18 additions & 0 deletions config/hardware/axis/Z/TMC/TMC5160_1-Motor.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Z TMC5160 definition

# User variable only needed here as they are called recursively
[gcode_macro _USER_VARIABLES]
variable_z_driver: "tmc5160"
gcode:


[tmc5160 stepper_z]
cs_pin: Z_TMCUART
spi_speed: 500000
spi_software_sclk_pin: DRIVER_SPI_SCK
spi_software_mosi_pin: DRIVER_SPI_MOSI
spi_software_miso_pin: DRIVER_SPI_MISO
interpolate: True
run_current: 0.8
sense_resistor: 0.075
stealthchop_threshold: 0
23 changes: 23 additions & 0 deletions config/hardware/axis/Z/TMC/TMC5160_3-Motors.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[include TMC5160_1-Motor.cfg]

[tmc5160 stepper_z1]
cs_pin: Z1_TMCUART
spi_speed: 500000
spi_software_sclk_pin: DRIVER_SPI_SCK
spi_software_mosi_pin: DRIVER_SPI_MOSI
spi_software_miso_pin: DRIVER_SPI_MISO
interpolate: True
run_current: 0.8
sense_resistor: 0.075
stealthchop_threshold: 0

[tmc5160 stepper_z2]
cs_pin: Z2_TMCUART
spi_speed: 500000
spi_software_sclk_pin: DRIVER_SPI_SCK
spi_software_mosi_pin: DRIVER_SPI_MOSI
spi_software_miso_pin: DRIVER_SPI_MISO
interpolate: True
run_current: 0.8
sense_resistor: 0.075
stealthchop_threshold: 0
12 changes: 12 additions & 0 deletions config/hardware/axis/Z/TMC/TMC5160_4-Motors.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[include TMC5160_3-Motors.cfg]

[tmc5160 stepper_z3]
cs_pin: Z3_TMCUART
spi_speed: 500000
spi_software_sclk_pin: DRIVER_SPI_SCK
spi_software_mosi_pin: DRIVER_SPI_MOSI
spi_software_miso_pin: DRIVER_SPI_MISO
interpolate: True
run_current: 0.8
sense_resistor: 0.075
stealthchop_threshold: 0
18 changes: 18 additions & 0 deletions config/hardware/axis/Z/Trident_TR8x2_1.8deg.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[stepper_z]
rotation_distance: 2
microsteps: 32
full_steps_per_rotation: 200

[stepper_z1]
rotation_distance: 2
microsteps: 32
full_steps_per_rotation: 200

[stepper_z2]
rotation_distance: 2
microsteps: 32
full_steps_per_rotation: 200

# We also include the default wiring and speeds from here to avoid duplicating
[include default_wiring_3M.cfg]
[include default_speed.cfg]
12 changes: 8 additions & 4 deletions config/hardware/displays/BTT_mini12864.cfg
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# Neopixel leds integrated in the BTT mini12864 display
[gcode_macro _USER_VARIABLES]
variable_status_leds_minidisplay_enabled = True
variable_status_leds_minidisplay_knob_only = True
variable_status_leds_minidisplay_led_name: "btt_mini12864"
variable_status_leds_minidisplay_idx: '1,2'

gcode:

# Also include directly the leds control macros from here
[include ../../../macros/hardware_functions/status_leds.cfg]

# Include adaptations to the menus
[include ../../../config/software/display/display.cfg]

[display]
lcd_type: uc1701
Expand Down Expand Up @@ -36,10 +40,10 @@ initial_BLUE: 0.0
color_order: RGB

# Set RGB values on boot up for each Neopixel.
# Index 1 = display, Index 2 and 3 = Knob
# Index 3 = display, Index 1 and 2 = Knob
[delayed_gcode setdisplayneopixel]
initial_duration: 1
gcode:
SET_LED LED=btt_mini12864 RED=1 GREEN=1 BLUE=1 INDEX=1 TRANSMIT=0
SET_LED LED=btt_mini12864 RED=1 GREEN=0 BLUE=0 INDEX=1 TRANSMIT=0
SET_LED LED=btt_mini12864 RED=1 GREEN=0 BLUE=0 INDEX=2 TRANSMIT=0
SET_LED LED=btt_mini12864 RED=1 GREEN=0 BLUE=0 INDEX=3
SET_LED LED=btt_mini12864 RED=1 GREEN=1 BLUE=1 INDEX=3
12 changes: 8 additions & 4 deletions config/hardware/displays/BTT_mini12864_inversed.cfg
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# Neopixel leds integrated in the BTT mini12864 display
[gcode_macro _USER_VARIABLES]
variable_status_leds_minidisplay_enabled = True
variable_status_leds_minidisplay_knob_only = True
variable_status_leds_minidisplay_led_name: "btt_mini12864"
variable_status_leds_minidisplay_idx: '1,2'

gcode:

# Also include directly the leds control macros from here
[include ../../../macros/hardware_functions/status_leds.cfg]

# Include adaptations to the menus
[include ../../../config/software/display/display.cfg]

[display]
lcd_type: uc1701
Expand Down Expand Up @@ -36,10 +40,10 @@ initial_BLUE: 0.0
color_order: RGB

# Set RGB values on boot up for each Neopixel.
# Index 1 = display, Index 2 and 3 = Knob
# Index 3 = display, Index 1 and 2 = Knob
[delayed_gcode setdisplayneopixel]
initial_duration: 1
gcode:
SET_LED LED=btt_mini12864 RED=1 GREEN=1 BLUE=1 INDEX=1 TRANSMIT=0
SET_LED LED=btt_mini12864 RED=1 GREEN=0 BLUE=0 INDEX=1 TRANSMIT=0
SET_LED LED=btt_mini12864 RED=1 GREEN=0 BLUE=0 INDEX=2 TRANSMIT=0
SET_LED LED=btt_mini12864 RED=1 GREEN=0 BLUE=0 INDEX=3
SET_LED LED=btt_mini12864 RED=1 GREEN=1 BLUE=1 INDEX=3
Loading

0 comments on commit eeb4916

Please sign in to comment.