Open airbornetrooper82573 opened 10 months ago
@airbornetrooper82573 upload to pi via ssh, I used the directory /home/pi/printer_data/config/scripts once uploaded you will have to give it permission to execute. chmod 755 mcu_timing.sh Then you can run it with ./mcu_timing.sh install The next time you need to update klipper when there is an update you would ssh to the pi and to go to the directory were you have it /home/pi/printer_data/config/scripts and run the script but with the update parameter ./mcu_timing.sh update.
I didn't want to do that each time to I just made a macro in mainsail so i just have a button to update. I first created a file klipper_update_mcu_timing.sh and gave is 755 permissions and put only the update section of the script in the file.
echo "Updating klipper repo and restoring custom mcu.py file..."
# save the custom mcu.py file
cp ~/klipper/klippy/mcu.py /tmp/mcu.py
# remove the custom mcu.py file
rm ~/klipper/klippy/mcu.py
cd ~/klipper || exit
# update the klipper repo
git pull
# restore the custom mcu.py file
cp /tmp/mcu.py ~/klipper/klippy/mcu.py
# remove the backed up custom mcu.py file
rm /tmp/mcu.py
# Report success or failure
if grep -q "TRSYNC_TIMEOUT = 0.05" ~/klipper/klippy/mcu.py; then
echo -e "\e[32mUpdated successfully\e[0m"
else
echo -e "\e[31mUpdate failed\e[0m"
fi
I then have a seperate file called shell_commands.cfg with this info in it.
[gcode_shell_command mcu_timing_cfg]
command: sh /home/pi/printer_data/config/scripts/klipper_update_mcu_timing.sh
timeout: 30.
verbose: True
[gcode_macro MCU_FIX_CFG]
gcode:
RUN_SHELL_COMMAND CMD=mcu_timing_cfg
This allows me to have a button to update via the dashboard.
@airbornetrooper82573,
@o1hitman1o has the right idea.
I have tried to covey as well that this mcu_timing script is a sort of band-aid for this issue. No one should use it unless they have no other option to correct this problem.
Additionally, there have been some changes pushed to the Klipper mcu firmware recently that should help with this issue so for many this script should no longer be necessary.
The new update changes TR_SYNC to give it more buffer during homing, which is where most people encounter this issue.
You may remember needing to reflash your firmwares recently, that was the update that made this change.
So for anyone still using this script, I do recommend trying again without it to see if you no longer need it.
Feel free to add any additional suggestions/questions, and let me know if you still find you need this script after the new update!
I need to adjust mcu_timing because I keep getting communication errors when running QGL on my voron 2.4 350mm. I have no other can bus issues I could find but this is becoming more of an issue. Google led me here. I just can't figure out how to install and make this script work.