diff --git a/config/sensorless.cfg b/config/homing.cfg similarity index 86% rename from config/sensorless.cfg rename to config/homing.cfg index 516db810..2cf031d9 100644 --- a/config/sensorless.cfg +++ b/config/homing.cfg @@ -1,4 +1,4 @@ -[gcode_macro _SENSORLESS_PARAMS] +[gcode_macro _HOMING_PARAMS] variable_homing_current: 1.5 variable_safe_z: 3 # force move for homing after M84 or power off @@ -17,7 +17,7 @@ variable_home_y_before_x: False # coordinates that the _POST_HOME_XY will position the nozzle before homing z variable_home_x: 150 variable_home_y: 150 -# if you are rocking other than TMC 2209 drivers should should configure it here +# if you are rocking other than TMC 2209 drivers should configure it here variable_driver_type: "tmc2209" gcode: @@ -48,9 +48,9 @@ gcode: {% set klicky = (printer["gcode_macro _KLICKY_VARIABLES"] != null) %} {% set sensorless_homing = ('virtual_endstop' in printer.configfile.settings['stepper_x'].endstop_pin and 'virtual_endstop' in printer.configfile.settings['stepper_y'].endstop_pin) %} - {% set repeat_home_xy = printer["gcode_macro _SENSORLESS_PARAMS"].repeat_home_xy %} + {% set repeat_home_xy = printer["gcode_macro _HOMING_PARAMS"].repeat_home_xy %} {% set home_count = 2 if sensorless_homing and repeat_home_xy else 1 %} - {% set home_y_before_x = printer["gcode_macro _SENSORLESS_PARAMS"].home_y_before_x %} + {% set home_y_before_x = printer["gcode_macro _HOMING_PARAMS"].home_y_before_x %} {% set home_axes_order = ['y', 'x'] if home_y_before_x else ['x', 'y'] %} {% set btteddy_wait_for_temp = (printer["gcode_macro _BTTEDDY_MACRO_PARAMS"] != null and printer["gcode_macro _BTTEDDY_MACRO_PARAMS"].wait_for_temp) %} @@ -144,7 +144,7 @@ gcode: gcode: {% set sensorless_homing = ('virtual_endstop' in printer.configfile.settings['stepper_x'].endstop_pin) %} {% if sensorless_homing %} - {% set HOMING_CURRENT = printer["gcode_macro _SENSORLESS_PARAMS"].homing_current %} + {% set HOMING_CURRENT = printer["gcode_macro _HOMING_PARAMS"].homing_current %} SET_TMC_CURRENT STEPPER=stepper_x CURRENT={HOMING_CURRENT} SET_TMC_CURRENT STEPPER=stepper_y CURRENT={HOMING_CURRENT} {% endif %} @@ -154,7 +154,7 @@ gcode: gcode: {% set sensorless_homing = ('virtual_endstop' in printer.configfile.settings['stepper_y'].endstop_pin) %} {% if sensorless_homing %} - {% set HOMING_CURRENT = printer["gcode_macro _SENSORLESS_PARAMS"].homing_current %} + {% set HOMING_CURRENT = printer["gcode_macro _HOMING_PARAMS"].homing_current %} SET_TMC_CURRENT STEPPER=stepper_x CURRENT={HOMING_CURRENT} SET_TMC_CURRENT STEPPER=stepper_y CURRENT={HOMING_CURRENT} {% endif %} @@ -166,7 +166,7 @@ variable_camera_started: True gcode: {% set camera_started = printer["gcode_macro START_CAMERA"].started|default(true) %} SET_GCODE_VARIABLE MACRO=_PRE_HOME_Z VARIABLE=camera_started VALUE={camera_started} - {% set stop_start_camera = printer["gcode_macro _SENSORLESS_PARAMS"].stop_start_camera %} + {% set stop_start_camera = printer["gcode_macro _HOMING_PARAMS"].stop_start_camera %} {% set klicky = (printer["gcode_macro _KLICKY_VARIABLES"] != null) %} {% if stop_start_camera and camera_started %} @@ -178,8 +178,8 @@ gcode: {% if klicky %} ATTACH_PROBE MANUAL=0 {% elif printer['output_pin _saf_z_endstop'] != null %} - {% set home_x = printer["gcode_macro _SENSORLESS_PARAMS"].home_x|int %} - {% set home_y = printer["gcode_macro _SENSORLESS_PARAMS"].home_y|int %} + {% set home_x = printer["gcode_macro _HOMING_PARAMS"].home_x|int %} + {% set home_y = printer["gcode_macro _HOMING_PARAMS"].home_y|int %} G90 G0 X{home_x} Y{home_y} F15000 SET_PIN PIN=_saf_z_endstop VALUE=1 @@ -189,7 +189,7 @@ gcode: gcode: {% set sensorless_homing = ('virtual_endstop' in printer.configfile.settings['stepper_x'].endstop_pin) %} {% if sensorless_homing %} - {% set homing_move_away_x = printer["gcode_macro _SENSORLESS_PARAMS"].homing_move_away_x %} + {% set homing_move_away_x = printer["gcode_macro _HOMING_PARAMS"].homing_move_away_x %} {% set x_position_endstop = printer.configfile.settings['stepper_x'].position_endstop %} {% set x_position_min = printer.configfile.settings['stepper_x'].position_min %} G91 @@ -199,7 +199,7 @@ gcode: G1 X+{homing_move_away_x } F1200 {% endif %} - {% set driver = printer["gcode_macro _SENSORLESS_PARAMS"].driver_type %} + {% set driver = printer["gcode_macro _HOMING_PARAMS"].driver_type %} {% set RUN_CURRENT_X = printer.configfile.settings[driver ~ ' stepper_x'].run_current|float %} {% set RUN_CURRENT_Y = printer.configfile.settings[driver ~ ' stepper_y'].run_current|float %} @@ -214,7 +214,7 @@ gcode: gcode: {% set sensorless_homing = ('virtual_endstop' in printer.configfile.settings['stepper_y'].endstop_pin) %} {% if sensorless_homing %} - {% set homing_move_away_y = printer["gcode_macro _SENSORLESS_PARAMS"].homing_move_away_y %} + {% set homing_move_away_y = printer["gcode_macro _HOMING_PARAMS"].homing_move_away_y %} {% set y_position_endstop = printer.configfile.settings['stepper_y'].position_endstop %} {% set y_position_min = printer.configfile.settings['stepper_y'].position_min %} G91 @@ -224,7 +224,7 @@ gcode: G1 Y+{homing_move_away_y} F1200 {% endif %} - {% set driver = printer["gcode_macro _SENSORLESS_PARAMS"].driver_type %} + {% set driver = printer["gcode_macro _HOMING_PARAMS"].driver_type %} {% set RUN_CURRENT_X = printer.configfile.settings[driver ~ ' stepper_x'].run_current|float %} {% set RUN_CURRENT_Y = printer.configfile.settings[driver ~ ' stepper_y'].run_current|float %} @@ -238,9 +238,9 @@ gcode: [gcode_macro _POST_HOME_Z] gcode: {% set camera_started = printer["gcode_macro _PRE_HOME_Z"].camera_started|default(true) %} - {% set stop_start_camera = printer["gcode_macro _SENSORLESS_PARAMS"].stop_start_camera %} + {% set stop_start_camera = printer["gcode_macro _HOMING_PARAMS"].stop_start_camera %} {% set klicky = (printer["gcode_macro _KLICKY_VARIABLES"] != null) %} - {% set homing_move_away_z = printer["gcode_macro _SENSORLESS_PARAMS"].homing_move_away_z|int %} + {% set homing_move_away_z = printer["gcode_macro _HOMING_PARAMS"].homing_move_away_z|int %} {% if stop_start_camera and camera_started %} G4 P1000 @@ -265,8 +265,8 @@ gcode: # where motors were turned off or printer power cycled / klipper restarted # so if at least one axis has been homed printer.toolhead.homed_axes = "xyz" # so this safe force move step only occurs when no axis are homed - {% set force_move = printer["gcode_macro _SENSORLESS_PARAMS"].force_move %} - {% set safe_z = printer["gcode_macro _SENSORLESS_PARAMS"].safe_z|int %} + {% set force_move = printer["gcode_macro _HOMING_PARAMS"].force_move %} + {% set safe_z = printer["gcode_macro _HOMING_PARAMS"].safe_z|int %} {% if printer.toolhead.homed_axes != "xyz" and force_move %} RESPOND TYPE=command MSG='Force moving Z {safe_z} mm distance' @@ -284,8 +284,8 @@ gcode: [gcode_macro _POST_HOME_XY] gcode: {% if "xy" in printer.toolhead.homed_axes %} - {% set home_x = printer["gcode_macro _SENSORLESS_PARAMS"].home_x|int %} - {% set home_y = printer["gcode_macro _SENSORLESS_PARAMS"].home_y|int %} + {% set home_x = printer["gcode_macro _HOMING_PARAMS"].home_x|int %} + {% set home_y = printer["gcode_macro _HOMING_PARAMS"].home_y|int %} G90 G0 X{home_x} Y{home_y} F3200 diff --git a/k1/installer.sh b/k1/installer.sh index 6dd0af09..9612298f 100755 --- a/k1/installer.sh +++ b/k1/installer.sh @@ -806,14 +806,14 @@ function install_klipper() { cp /usr/data/pellcorp/k1/services/S13mcu_update /etc/init.d/ || exit $? fi - cp /usr/data/pellcorp/config/sensorless.cfg /usr/data/printer_data/config/ || exit $? - $CONFIG_HELPER --add-include "sensorless.cfg" || exit $? + cp /usr/data/pellcorp/config/homing.cfg /usr/data/printer_data/config/ || exit $? + $CONFIG_HELPER --add-include "homing.cfg" || exit $? x_position_mid=$($CONFIG_HELPER --get-section-entry "stepper_x" "position_max" --divisor 2 --integer) - $CONFIG_HELPER --file sensorless.cfg --replace-section-entry "gcode_macro _SENSORLESS_PARAMS" "variable_home_x" "$x_position_mid" || exit $? + $CONFIG_HELPER --file homing.cfg --replace-section-entry "gcode_macro _HOMING_PARAMS" "variable_home_x" "$x_position_mid" || exit $? y_position_mid=$($CONFIG_HELPER --get-section-entry "stepper_y" "position_max" --divisor 2 --integer) - $CONFIG_HELPER --file sensorless.cfg --replace-section-entry "gcode_macro _SENSORLESS_PARAMS" "variable_home_y" "$y_position_mid" || exit $? + $CONFIG_HELPER --file homing.cfg --replace-section-entry "gcode_macro _HOMING_PARAMS" "variable_home_y" "$y_position_mid" || exit $? # just make sure the baud is written $CONFIG_HELPER --replace-section-entry "mcu" "baud" 230400 || exit $? @@ -824,11 +824,11 @@ function install_klipper() { # for Ender 5 Max we need to disable sensorless homing, reversing homing order,don't move away and do not repeat homing # but we are still going to use homing override even though the max has physical endstops to make things a bit easier if [ "$MODEL" = "F004" ]; then - $CONFIG_HELPER --file sensorless.cfg --replace-section-entry "gcode_macro _SENSORLESS_PARAMS" "variable_home_y_before_x" "True" || exit $? + $CONFIG_HELPER --file homing.cfg --replace-section-entry "gcode_macro _HOMING_PARAMS" "variable_home_y_before_x" "True" || exit $? fi if [ "$kinematics" = "corexy" ]; then # by default we want to home twice when using sensorless - $CONFIG_HELPER --file sensorless.cfg --replace-section-entry "gcode_macro _SENSORLESS_PARAMS" "variable_repeat_home_xy" "True" || exit $? + $CONFIG_HELPER --file homing.cfg --replace-section-entry "gcode_macro _HOMING_PARAMS" "variable_repeat_home_xy" "True" || exit $? fi cp /usr/data/pellcorp/k1/internal_macros.cfg /usr/data/printer_data/config/ || exit $? @@ -892,6 +892,7 @@ function install_klipper() { $CONFIG_HELPER --remove-section-entry "tmc2209 stepper_x" "hold_current" || exit $? $CONFIG_HELPER --remove-section-entry "tmc2209 stepper_y" "hold_current" || exit $? + $CONFIG_HELPER --remove-include "sensorless.cfg" || exit $? $CONFIG_HELPER --remove-include "printer_params.cfg" || exit $? $CONFIG_HELPER --remove-include "gcode_macro.cfg" || exit $? $CONFIG_HELPER --remove-include "custom_gcode.cfg" || exit $? @@ -1365,7 +1366,7 @@ function setup_bltouch() { $CONFIG_HELPER --add-include "bltouch_macro.cfg" || exit $? # for bltouch probe deploy issues occur with safe z at 3 - $CONFIG_HELPER --file sensorless.cfg --replace-section-entry "gcode_macro _SENSORLESS_PARAMS" "variable_safe_z" "5" || exit $? + $CONFIG_HELPER --file homing.cfg --replace-section-entry "gcode_macro _HOMING_PARAMS" "variable_safe_z" "5" || exit $? # need to add a empty bltouch section for baby stepping to work $CONFIG_HELPER --remove-section "bltouch" || exit $? @@ -1687,7 +1688,7 @@ function setup_beacon() { $CONFIG_HELPER --add-include "beacon.cfg" || exit $? # for beacon can't use homing override - $CONFIG_HELPER --file sensorless.cfg --remove-section "homing_override" + $CONFIG_HELPER --file homing.cfg --remove-section "homing_override" y_position_mid=$($CONFIG_HELPER --get-section-entry "stepper_y" "position_max" --divisor 2 --integer) x_position_mid=$($CONFIG_HELPER --get-section-entry "stepper_x" "position_max" --divisor 2 --integer) @@ -2485,13 +2486,17 @@ fi if [ -f /usr/data/pellcorp-backups/printer.factory.cfg ]; then # we want a copy of the file before config overrides are re-applied so we can correctly generate diffs # against different generations of the original file - for file in printer.cfg start_end.cfg fan_control.cfg ${probe}.conf spoolman.conf internal_macros.cfg useful_macros.cfg timelapse.conf moonraker.conf webcam.conf sensorless.cfg ${probe}_macro.cfg ${probe}.cfg; do + for file in printer.cfg start_end.cfg fan_control.cfg ${probe}.conf spoolman.conf internal_macros.cfg useful_macros.cfg timelapse.conf moonraker.conf webcam.conf homing.cfg ${probe}_macro.cfg ${probe}.cfg; do if [ -f /usr/data/printer_data/config/$file ]; then cp /usr/data/printer_data/config/$file /usr/data/pellcorp-backups/$file fi done fi + # remove old cfg files + [ -f /usr/data/pellcorp-backups/sensorless.cfg ] && rm /usr/data/pellcorp-backups/sensorless.cfg + [ -f /usr/data/printer_data/config/sensorless.cfg ] && rm /usr/data/printer_data/config/sensorless.cfg + apply_overrides=0 # there will be no support for generating pellcorp-overrides unless you have done a factory reset if [ -f /usr/data/pellcorp-backups/printer.factory.cfg ]; then diff --git a/k1/readme.md b/k1/readme.md index 56b6d902..86917523 100644 --- a/k1/readme.md +++ b/k1/readme.md @@ -6,7 +6,7 @@ The following files were originally from other projects. Some of these files ar - k1/services/S56moonraker_service -> https://github.com/Guilouz/Creality-Helper-Script/blob/main/files/services/S56moonraker_service - k1/moonraker.conf -> https://github.com/Guilouz/Creality-Helper-Script/blob/main/files/moonraker/moonraker.conf - k1/services/S55klipper_service -> https://raw.githubusercontent.com/K1-Klipper/installer_script_k1_and_max/main/S55klipper_service -- config/sensorless.cfg -> https://raw.githubusercontent.com/K1-Klipper/installer_script_k1_and_max/main/sensorless.cfg +- config/homing.cfg -> https://raw.githubusercontent.com/K1-Klipper/installer_script_k1_and_max/main/sensorless.cfg - k1/tools/curl -> https://raw.githubusercontent.com/ballaswag/k1-discovery/main/bin/curl - k1/tools/supervisorctl -> https://raw.githubusercontent.com/Guilouz/Creality-Helper-Script/main/files/fixes/supervisorctl - k1/tools/systemctl -> https://github.com/Guilouz/Creality-Helper-Script/blob/main/files/fixes/systemctl diff --git a/rpi/incus/incus.sh b/rpi/incus/incus.sh index b03eab8c..fb86a782 100755 --- a/rpi/incus/incus.sh +++ b/rpi/incus/incus.sh @@ -50,14 +50,14 @@ while true; do done incus file push $HOME/.ssh/id_rsa.pub "klipper/root/id_rsa.pub" + +# seems like running this again before setup might fix some issues no idea why, perhaps this is a fedora thing +sudo iptables -P FORWARD ACCEPT + incus exec klipper -- /opt/projects/incus/setup.sh IP_ADDRESS=$(incus info klipper | grep inet | head -1 | awk -F ':' '{print $2}' | sed 's:/24 (global)::g' | tr -d '[:space:]') -#IP_ADDRESS=$(incus exec klipper -- bash -c "ip route | grep 'default' | awk '{print \$9}' | tail -1" 2> /dev/null) ssh-keygen -f "$HOME/.ssh/known_hosts" -R $IP_ADDRESS > /dev/null 2>&1 ssh-keyscan -t rsa "$IP_ADDRESS" >> "$HOME/.ssh/known_hosts" 2> /dev/null -# seems like running this again after setup might fix some issues no idea why, perhaps this is a fedora thing -sudo iptables -P FORWARD ACCEPT - ssh me@$IP_ADDRESS diff --git a/rpi/install-klipper.sh b/rpi/install-klipper.sh index f24a6d48..379b056f 100755 --- a/rpi/install-klipper.sh +++ b/rpi/install-klipper.sh @@ -187,19 +187,19 @@ if [ $? -ne 0 ]; then # most stuff only works with corexy and cartesian if [ "$kinematics" = "corexy" ] || [ "$kinematics" = "cartesian" ]; then - cp $BASEDIR/pellcorp/config/sensorless.cfg $BASEDIR/printer_data/config/homing_override.cfg || exit $? - $CONFIG_HELPER --add-include "homing_override.cfg" || exit $? + cp $BASEDIR/pellcorp/config/homing.cfg $BASEDIR/printer_data/config/ || exit $? + $CONFIG_HELPER --add-include "homing.cfg" || exit $? x_position_mid=$($CONFIG_HELPER --get-section-entry "stepper_x" "position_max" --divisor 2 --integer) - $CONFIG_HELPER --file homing_override.cfg --replace-section-entry "gcode_macro _SENSORLESS_PARAMS" "variable_home_x" "$x_position_mid" || exit $? + $CONFIG_HELPER --file homing.cfg --replace-section-entry "gcode_macro _HOMING_PARAMS" "variable_home_x" "$x_position_mid" || exit $? y_position_mid=$($CONFIG_HELPER --get-section-entry "stepper_y" "position_max" --divisor 2 --integer) - $CONFIG_HELPER --file homing_override.cfg --replace-section-entry "gcode_macro _SENSORLESS_PARAMS" "variable_home_y" "$y_position_mid" || exit $? + $CONFIG_HELPER --file homing.cfg --replace-section-entry "gcode_macro _HOMING_PARAMS" "variable_home_y" "$y_position_mid" || exit $? # there is an assumption the same stepper driver will be used for stepper x and y tmc_driver=$($CONFIG_HELPER --list-sections tmc% | grep stepper_x | awk -F ' ' '{print $1}') if [ -n "$tmc_driver" ] && [ "$tmc_driver" != "tmc2209" ]; then - $CONFIG_HELPER --file homing_override.cfg --replace-section-entry "gcode_macro _SENSORLESS_PARAMS" "variable_driver_type" "\"$tmc_driver\"" || exit $? + $CONFIG_HELPER --file homing.cfg --replace-section-entry "gcode_macro _HOMING_PARAMS" "variable_driver_type" "\"$tmc_driver\"" || exit $? fi cp $BASEDIR/pellcorp/config/start_end.cfg $BASEDIR/printer_data/config/ || exit $? diff --git a/rpi/installer.sh b/rpi/installer.sh index 3e6bf7f0..22ca37cc 100755 --- a/rpi/installer.sh +++ b/rpi/installer.sh @@ -383,7 +383,7 @@ function setup_bltouch() { $CONFIG_HELPER --add-include "bltouch_macro.cfg" || exit $? # for bltouch probe deploy issues occur with safe z at 3 - $CONFIG_HELPER --file homing_override.cfg --replace-section-entry "gcode_macro _SENSORLESS_PARAMS" "variable_safe_z" "5" || exit $? + $CONFIG_HELPER --file homing.cfg --replace-section-entry "gcode_macro _HOMING_PARAMS" "variable_safe_z" "5" || exit $? # need to add a empty bltouch section for baby stepping to work $CONFIG_HELPER --remove-section "bltouch" || exit $? @@ -672,7 +672,7 @@ function setup_beacon() { $CONFIG_HELPER --add-include "beacon.cfg" || exit $? # for beacon can't use homing override - $CONFIG_HELPER --file homing_override.cfg --remove-section "homing_override" + $CONFIG_HELPER --file homing.cfg --remove-section "homing_override" y_position_mid=$($CONFIG_HELPER --get-section-entry "stepper_y" "position_max" --divisor 2 --integer) x_position_mid=$($CONFIG_HELPER --get-section-entry "stepper_x" "position_max" --divisor 2 --integer) @@ -1470,7 +1470,7 @@ fi # we want a copy of the file before config overrides are re-applied so we can correctly generate diffs # against different generations of the original file - for file in printer.cfg start_end.cfg fan_control.cfg ${probe}.conf spoolman.conf timelapse.conf moonraker.conf crowsnest.conf webcam.conf useful_macros.cfg homing_override.cfg ${probe}_macro.cfg ${probe}.cfg; do + for file in printer.cfg start_end.cfg fan_control.cfg ${probe}.conf spoolman.conf timelapse.conf moonraker.conf crowsnest.conf webcam.conf useful_macros.cfg homing.cfg ${probe}_macro.cfg ${probe}.cfg; do if [ -f $BASEDIR/printer_data/config/$file ]; then cp $BASEDIR/printer_data/config/$file $BASEDIR/pellcorp-backups/$file fi @@ -1495,6 +1495,12 @@ fi fi fi + # remove old cfg files + [ -f $BASEDIR/pellcorp-backups/sensorless.cfg ] && rm $BASEDIR/pellcorp-backups/sensorless.cfg + [ -f $BASEDIR/pellcorp-backups/homing_override.cfg ] && rm $BASEDIR/pellcorp-backups/homing_override.cfg + [ -f $BASEDIR/printer_data/config/sensorless.cfg ] && rm $BASEDIR/printer_data/config/sensorless.cfg + [ -f $BASEDIR/printer_data/config/homing_override.cfg ] && rm $BASEDIR/printer_data/config/homing_override.cfg + fixup_client_variables_config fixup_client_variables_config=$? if [ $fixup_client_variables_config -eq 0 ]; then diff --git a/tools/apply-overrides.sh b/tools/apply-overrides.sh index 28be613e..bb0b46cd 100755 --- a/tools/apply-overrides.sh +++ b/tools/apply-overrides.sh @@ -43,6 +43,16 @@ apply_overrides() { base_file=eddyng.cfg elif [ "$base_file" = "grumpyscreen.cfg" ] && [ -f $BASEDIR/printer_data/config/grumpyscreen.ini ]; then base_file=grumpyscreen.ini + elif [ "$base_file" = "sensorless.cfg" ] && [ -f $BASEDIR/printer_data/config/homing.cfg ]; then + # this is for ancient migration of SENSORLESS_PARAMS + sed -i 's/gcode_macro SENSORLESS_PARAMS/gcode_macro _SENSORLESS_PARAMS/g' $overrides_dir/sensorless.cfg + # this is for recent migration of sensorless.cfg to homing.cfg + sed -i 's/gcode_macro _SENSORLESS_PARAMS/gcode_macro _HOMING_PARAMS/g' $overrides_dir/sensorless.cfg + base_file=homing.cfg + elif [ "$base_file" = "homing_override.cfg" ] && [ -f $BASEDIR/printer_data/config/homing.cfg ]; then + # for rpi migration from homing_override.cfg to homing.cfg + sed -i 's/gcode_macro _SENSORLESS_PARAMS/gcode_macro _HOMING_PARAMS/g' $overrides_dir/homing_override.cfg + base_file=homing.cfg fi if [ "$file" != "$base_file" ] && [ -f "$BASEDIR/pellcorp/k1/$base_file" ] && [ -f $BASEDIR/printer_data/config/${base_file} ]; then @@ -71,11 +81,6 @@ apply_overrides() { echo "WARN: Ignoring $file ..." elif [ -f "$BASEDIR/pellcorp-backups/$file" ] || [ -f "$BASEDIR/pellcorp/config/$file" ] || [ -f "$BASEDIR/pellcorp/k1/$file" ]; then if [ -f $BASEDIR/printer_data/config/$file ]; then - # we renamed the SENSORLESS_PARAMS to hide it - if [ "$file" = "sensorless.cfg" ]; then - sed -i 's/gcode_macro SENSORLESS_PARAMS/gcode_macro _SENSORLESS_PARAMS/g' $BASEDIR/pellcorp-overrides/sensorless.cfg - fi - # we are migrating the bltouch and microprobe sections from printer.cfg to their own files, so we need to # ignore any existing config overrides for these sections from printer.cfg, we won't try and automatically # migrate them, as we have already done that for generating config overrides so the only time this diff --git a/tools/config-overrides.sh b/tools/config-overrides.sh index 99036104..5bfcbcc9 100755 --- a/tools/config-overrides.sh +++ b/tools/config-overrides.sh @@ -126,7 +126,13 @@ override_file() { # we renamed the SENSORLESS_PARAMS to hide it if [ -f $BASEDIR/pellcorp-overrides/sensorless.cfg ]; then + # so this is for ancient sed -i 's/gcode_macro SENSORLESS_PARAMS/gcode_macro _SENSORLESS_PARAMS/g' $BASEDIR/pellcorp-overrides/sensorless.cfg + # this caters for recent change + sed -i 's/gcode_macro _SENSORLESS_PARAMS/gcode_macro _HOMING_PARAMS/g' $BASEDIR/pellcorp-overrides/sensorless.cfg + elif [ -f $BASEDIR/pellcorp-overrides/homing_override.cfg ]; then + # this is for rpi only + sed -i 's/gcode_macro _SENSORLESS_PARAMS/gcode_macro _HOMING_PARAMS/g' $BASEDIR/pellcorp-overrides/homing_override.cfg elif [ -f $BASEDIR/pellcorp-overrides/KAMP_Settings.cfg ]; then # remove any overrides for these values which do not apply to Smart Park and Line Purge sed -i '/variable_verbose_enable/d' $BASEDIR/pellcorp-overrides/KAMP_Settings.cfg