Giter Club home page Giter Club logo

Comments (2)

davidramiro avatar davidramiro commented on May 27, 2024

Hi there,

to port it the way the manufacturer intended, you can have a look at their source code. Basically they do three things:

Modifying G5 GCode to initialize power loss resume: https://github.com/ANYCUBIC-3D/I3-MEGA/blob/master/Marlin_TFT_CR_V1.1.1/Marlin_main.cpp#L4163

Implement a function to save current position, stop motors and heaters: https://github.com/ANYCUBIC-3D/I3-MEGA/blob/master/Marlin_TFT_CR_V1.1.1/Marlin_main.cpp#L849

And finally a function to clear current values held in EEPROM and write the new position data: https://github.com/ANYCUBIC-3D/I3-MEGA/blob/305b0a041e99b0c964d1f7b20a15ae45da92718e/Marlin_TFT_CR_V1.1.1/configuration_store.cpp#L1052

Baking it straight into Marlin_main.cpp and using GCode as initialization is not the most beautiful way to do it imo, but it works. There are other ways to implement it, e.g. using the Creality power loss feature that got introduced to Marlin officially a while back.

Since I do not experience power outages, this feature is not really high up on my list of priorities but please let me know if you decide to have a go at porting it.

from marlin-ai3m.

davidramiro avatar davidramiro commented on May 27, 2024

Closing due to lack of response. Feel free to get in touch again later on.

from marlin-ai3m.

Related Issues (20)

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.