Skip to content

Commit

Permalink
Merge branch 'main' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Frix-x authored Mar 4, 2024
2 parents 3bcc2df + bad68da commit 36137d5
Show file tree
Hide file tree
Showing 9 changed files with 127 additions and 9 deletions.
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]
2 changes: 1 addition & 1 deletion config/mcu_definitions/main/BTT_Kraken_v1.0.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ aliases:
MCU_MOSI=PC8 , MCU_MISO=PC7 , MCU_SCK=PC6 ,

MCU_MOTOR_SERVO=PE7 ,
MCU_RGB1=PF10 , MCU_RGB2=PF11 ,
MCU_RGB1=PF12 , MCU_RGB2=PF11 ,
MCU_MIN1=PC15 , MCU_MIN2=PF0 , MCU_MIN3=PF1 , MCU_MIN4=PF2 ,
MCU_MIN5=PF3 , MCU_MIN6=PF4 , MCU_MIN7=PF10 , MCU_MIN8=PC0 ,

Expand Down
39 changes: 39 additions & 0 deletions config/mcu_definitions/main/BTT_Manta_M5P_v1.0.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[board_pins mcu_manufacturer]
aliases:
MCU_M1_STEP=PC8 , MCU_M1_DIR=PC9 , MCU_M1_EN=PA15 , MCU_M1_CS=PD9 ,
MCU_M2_STEP=PA10 , MCU_M2_DIR=PA14 , MCU_M2_EN=PA13 , MCU_M2_CS=PD8 ,
MCU_M3_STEP=PC6 , MCU_M3_DIR=PC7 , MCU_M3_EN=PA9 , MCU_M3_CS=PB10 ,
MCU_M4_STEP=PB12 , MCU_M4_DIR=PB11 , MCU_M4_EN=PA8 , MCU_M4_CS=PB2 ,
MCU_M5_STEP=PB0 , MCU_M5_DIR=PB1 , MCU_M5_EN=PC4 , MCU_M5_CS=PA6 ,

MCU_M1_STOP=PD3 , MCU_M2_STOP=PD2 , MCU_M3_STOP=PC3 , MCU_M4_STOP=PC2 ,

MCU_HE0=PC5 , MCU_HE1=PA7 ,

MCU_BED_OUT=PA5 ,

MCU_THB=PA0 , MCU_TH0=PA1 , MCU_TH1=PA2 ,

MCU_FAN0=PA4 , MCU_FAN1=PA3 ,

MCU_RGB1=PC11 , MCU_RGB2=PC14 ,

MCU_PROBE1=PC15 , MCU_PROBE2=PC13 ,
MCU_IND_PROBE=PC15 ,

MCU_SPI2_MOSI=PB15 , MCU_SPI2_MISO=PB14 , MCU_SPI2_SCK=PB13 , MCU_SPI2_CS=PC0 ,


# EXP1 header
EXP1_1=PD5 , EXP1_2=PD4 ,
EXP1_3=PB3 , EXP1_4=PD6 ,
EXP1_5=PB5 , EXP1_6=PB4 , # Slot in the socket on this side
EXP1_7=PB7 , EXP1_8=PB6 ,
EXP1_9=<GND> , EXP1_10=<5V> ,

# EXP2 header
EXP2_1=PB14 , EXP2_2=PB13 ,
EXP2_3=PB8 , EXP2_4=PB9 ,
EXP2_5=PC10 , EXP2_6=PB15 , # Slot in the socket on this side
EXP2_7=PC12 , EXP2_8=PF2 ,
EXP2_9=<GND> , EXP2_10=<NC> ,
8 changes: 6 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ function check_download {
if [ ! -d "${FRIX_CONFIG_PATH}" ]; then
echo "[DOWNLOAD] Downloading Klippain repository..."
if git -C $frixtemppath clone -b $frixbranchname https://github.com/Frix-x/klippain.git $frixreponame; then
chmod +x ${FRIX_CONFIG_PATH}/install.sh
printf "[DOWNLOAD] Download complete!\n\n"
else
echo "[ERROR] Download of Klippain git repository failed!"
Expand All @@ -94,6 +93,11 @@ function check_download {

# Step 3: Backup the old Klipper configuration
function backup_config {
if [ ! -e "${USER_CONFIG_PATH}" ]; then
printf "[BACKUP] No previous config found, skipping backup...\n\n"
return 0
fi

mkdir -p ${BACKUP_DIR}

# Copy every files from the user config ("2>/dev/null || :" allow it to fail silentely in case the config dir doesn't exist)
Expand All @@ -104,7 +108,7 @@ function backup_config {
# If Klippain is not already installed (we check for .VERSION in the backup to detect it),
# we need to remove, wipe and clean the current user config folder...
if [ ! -f "${BACKUP_DIR}/.VERSION" ]; then
rm -R ${USER_CONFIG_PATH}
rm -fR ${USER_CONFIG_PATH}
fi

printf "[BACKUP] Backup of current user config files done in: ${BACKUP_DIR}\n\n"
Expand Down
2 changes: 1 addition & 1 deletion macros/base/control.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ description: Turn off the printer and shutdown the host
gcode:
_OFF ; Shortcut to turn everything off (see above for this macro)
{action_respond_info('action:poweroff')} ; OctoPrint compatible host shutdown
{action_call_remote_method("shutdown_machine")} ; Moonraker compatible host shutdown
{action_call_remote_method("shutdown_machine")} ; Moonraker compatible host shutdown
12 changes: 9 additions & 3 deletions macros/base/park.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ gcode:
{% set z_safe = max_z %}
{% endif %}

{% if printer.toolhead.homed_axes != "xyz" %}
{action_raise_error("Cannot park the toolhead because axis are not homed!")}
{% endif %}

SAVE_GCODE_STATE NAME=PARK

_CG28 ; home if not already homed

{% if printer.extruder.can_extrude %}
{% if params.E is defined %}
{% set E = params.E|float|abs %}
Expand Down Expand Up @@ -71,10 +73,14 @@ gcode:
{% set St = printer["gcode_macro _USER_VARIABLES"].travel_speed * 60 %}
{% set Sz = printer["gcode_macro _USER_VARIABLES"].z_drop_speed * 60 %}

_CG28 ; home if not already homed
{% if printer.toolhead.homed_axes != "xyz" %}
{action_raise_error("Cannot park the toolhead in maintenance position because axis are not homed!")}
{% endif %}

SAVE_GCODE_STATE NAME=PARK_FRONT

G90 ; absolute positioning
G0 Z{printer.toolhead.axis_maximum.z/3*2} F{Sz}
G0 X{printer.toolhead.axis_maximum.x/2} Y{printer.toolhead.axis_minimum.y+10} F{St}

RESTORE_GCODE_STATE NAME=PARK_FRONT
7 changes: 6 additions & 1 deletion uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ function delete_current_klippain {
function restore_latest_backup {
local restore_backup latest_backup

if [[ ! -e "${BACKUP_PATH}" ]]; then
printf "[RESTORE] No backup folder found! Skipping...\n\n"
return
fi

read < /dev/tty -rp "[RESTORE] Would you like to restore your last config backup? This script will look for the last one before running Klippain (Y/n) " restore_backup
if [[ -z "$restore_backup" ]]; then
restore_backup="y"
Expand All @@ -94,7 +99,7 @@ function restore_latest_backup {
return
fi

latest_backup=$(find ${BACKUP_PATH} -type d -not -path "${BACKUP_PATH}" -exec sh -c 'if [ ! -f "$1/.VERSION" ]; then echo "$1"; fi' sh {} \; | sort -r | head -n 1)
latest_backup=$(find ${BACKUP_PATH} -maxdepth 1 -type d -not -path "${BACKUP_PATH}" -exec sh -c 'if [ ! -f "$1/.VERSION" ]; then echo "$1"; fi' sh {} \; | sort -r | head -n 1)
if [ -n "${latest_backup}" ]; then
cp -fa ${latest_backup}/. ${USER_CONFIG_PATH} 2>/dev/null || :
printf "[RESTORE] Latest backup restored from: ${latest_backup}\n\n"
Expand Down
46 changes: 46 additions & 0 deletions user_templates/mcu_defaults/main/BTT_Manta_M5P_v1.0.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#--------------------------------------------#
#### BTT MANTA M5P v1.0 MCU definition #####
#--------------------------------------------#
[mcu]
##--------------------------------------------------------------------
# This board works by using a serial connection by default. If you
# want to use CAN, invert the commented lines and use canbus_uuid.

#serial: /dev/serial/by-id/change-me-to-the-correct-mcu-path
# canbus_uuid: change-me-to-the-correct-canbus-id
##--------------------------------------------------------------------

[include config/mcu_definitions/main/BTT_Manta_M5P_v1.0.cfg] # Do not remove this line
[board_pins mantam5p10_mcu]
mcu: mcu
aliases:
X_STEP=MCU_M1_STEP , X_DIR=MCU_M1_DIR , X_ENABLE=MCU_M1_EN , X_TMCUART=MCU_M1_CS ,
Y_STEP=MCU_M2_STEP , Y_DIR=MCU_M2_DIR , Y_ENABLE=MCU_M2_EN , Y_TMCUART=MCU_M2_CS ,

Z_STEP=MCU_M3_STEP , Z_DIR=MCU_M3_DIR , Z_ENABLE=MCU_M3_EN , Z_TMCUART=MCU_M3_CS ,
Z1_STEP=MCU_M4_STEP , Z1_DIR=MCU_M4_DIR , Z1_ENABLE=MCU_M4_EN , Z1_TMCUART=MCU_M4_CS ,
Z2_STEP=MCU_M5_STEP , Z2_DIR=MCU_M5_DIR , Z2_ENABLE=MCU_M5_EN , Z2_TMCUART=MCU_M5_CS ,

#E_STEP=MCU_M5_STEP , E_DIR=MCU_M5_DIR , E_ENABLE=MCU_M5_EN , E_TMCUART=MCU_M5_CS ,

DRIVER_SPI_MOSI=MCU_SPI2_MOSI , # Used in case of SPI drivers such as TMC2240 or TMC5160
DRIVER_SPI_MISO=MCU_SPI2_MISO , # Used in case of SPI drivers such as TMC2240 or TMC5160
DRIVER_SPI_SCK=MCU_SPI2_SCK , # Used in case of SPI drivers such as TMC2240 or TMC5160

X_STOP=MCU_M1_STOP , Y_STOP=MCU_M3_STOP , Z_STOP=MCU_M4_STOP ,
PROBE_INPUT=MCU_PROBE2 ,
RUNOUT_SENSOR=MCU_M4_STOP ,

E_HEATER=MCU_HE0 , E_TEMPERATURE=MCU_TH0 ,
BED_HEATER=MCU_BED_OUT , BED_TEMPERATURE=MCU_THB ,

FILTER_FAN=MCU_FAN0 ,
CONTROLLER_FAN=MCU_FAN1 ,

CHAMBER_TEMPERATURE=MCU_TH1 ,

LIGHT_OUTPUT=MCU_HE1 ,
STATUS_NEOPIXEL=MCU_RGB1 ,
MCU_PS_ON=MCU_RGB2 ,

SERVO_PIN=MCU_PROBE1 ,
2 changes: 1 addition & 1 deletion user_templates/mcu_defaults/mmu/Fysetc_ERCF_ERB.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ serial: /dev/serial/by-id/change-me-to-the-correct-mcu-path
# board is defined using the "mmu" name. So you should use "pin: mmu:PIN_NAME"
# in your own overrides.cfg files.

[include config/mcu_definitions/mmu/Mellow_fly_ERCF.cfg] # Do not remove this line
[include config/mcu_definitions/mmu/Fysetc_ERCF_ERB.cfg] # Do not remove this line
[board_pins mmu_mcu]
mcu: mmu
aliases:
Expand Down

0 comments on commit 36137d5

Please sign in to comment.