Skip to content

Commit

Permalink
Update upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
ksummers92 committed Mar 20, 2024
2 parents f087a6a + 1c5c662 commit 10183c0
Show file tree
Hide file tree
Showing 166 changed files with 4,332 additions and 2,798 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/stale@v9.0.0
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
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ Fun fact: "pain" \pɛ̃\ is the French word for bread, so there's no pain in thi

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.
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, use [KIAUH](https://github.com/th33xitus/kiauh).
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.

Expand All @@ -45,9 +45,9 @@ After this you need to install Happy_Hare V2 from it's own repo: https://github.

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

> **Warning**
> **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.
> 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
Expand All @@ -60,7 +60,7 @@ To run the uninstall script, execute the following command over SSH:
wget -O - https://raw.githubusercontent.com/Frix-x/klippain/main/uninstall.sh | bash
```

> **Note**
> **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:
Expand Down
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]
25 changes: 25 additions & 0 deletions config/hardware/accelerometers/lis2dw_usb_rp2040_spi1.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# This LIS2DW file is dedicated to be used with USB RP2040 boards where the LIS2DW
# is connected to SPI1

# This include BTT S2DW V1.0, ...


# You need to set the proper serial in your overrides.cfg file
[mcu lis2dw_mcu]
serial: /dev/serial/by-id/xxx

[lis2dw]
cs_pin: lis2dw_mcu:gpio9
spi_bus: spi1a
axes_map: x,y,z

[resonance_tester]
accel_chip: lis2dw
probe_points:
-1,-1,-1


# Include the IS calibration macros to unlock them when
# an accelerometer is installed on the machine
[include ../../../macros/helpers/resonance_override.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]
18 changes: 18 additions & 0 deletions config/hardware/axis/Z/Trident_TR8x8_0.9deg.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[stepper_z]
rotation_distance: 8
microsteps: 32
full_steps_per_rotation: 400

[stepper_z1]
rotation_distance: 8
microsteps: 32
full_steps_per_rotation: 400

[stepper_z2]
rotation_distance: 8
microsteps: 32
full_steps_per_rotation: 400

# 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
6 changes: 5 additions & 1 deletion config/hardware/displays/Fysetc_mini12864.cfg
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# Neopixel leds integrated in the Fysetc 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: "fysetc_mini12864"
variable_status_leds_minidisplay_idx: '2,3'

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
6 changes: 5 additions & 1 deletion config/hardware/displays/Fysetc_mini12864_inversed.cfg
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# Neopixel leds integrated in the Fysetc 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: "fysetc_mini12864"
variable_status_leds_minidisplay_idx: '2,3'

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
Loading

0 comments on commit 10183c0

Please sign in to comment.