Giter Club home page Giter Club logo

Comments (3)

rootiest avatar rootiest commented on July 4, 2024 1

@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!

from zippy-klipper_config.

github-actions avatar github-actions commented on July 4, 2024

Welcome airbornetrooper82573!\nCongrats on creating your first issue.\nPlease follow the issue template to help us resolve your issue quickly.

from zippy-klipper_config.

o1hitman1o avatar o1hitman1o commented on July 4, 2024

@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.

from zippy-klipper_config.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.