1. Got a question or need help troubleshooting? Post to the troubleshooting forum or Search the forums!

OctoPrint Toggle Autolevel plugin

Discussion in 'Software' started by OutsourcedGuru, Sep 18, 2017.

  1. OutsourcedGuru

    OutsourcedGuru Active Member

    Joined:
    Jun 3, 2017
    Messages:
    752
    Likes Received:
    141
    For reasons that will make more sense in this thread, I decided to implement an OctoPrint plugin to simply ignore G29 GCODE commands rather than editing them out of some of my files and startup scripts.

    Github
     
  2. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,865
    Likes Received:
    3,561
    I am glad you found an exercise to improve your coding skills, I would still edit startup files or just go to a leveling method that requires more than G29 with no parameters to actually perform the auto-leveling. Rarely will someone take sliced code (gcode) over a mesh file (stl) and most will want the original 3D model over the mesh file, so I am not sure I see broad appeal to a plugin that only comments out G29 lines.
     
    Geof likes this.
  3. OutsourcedGuru

    OutsourcedGuru Active Member

    Joined:
    Jun 3, 2017
    Messages:
    752
    Likes Received:
    141
    Lately, as I've been troubleshooting printing a lot more than actual printing, I find myself in a text editor commenting out a single line. For me, this is now something-that-I-used-to-do with respect to G29. I don't really care whether or not I've stored an old GCODE file with it nor if I import one from someone else. I have the ability to programmatically and confidently toggle it off. Honestly, you'd think that "Include Autoleveling" would be a toggle in the OctoPrint interface there with the printer profile or something.

    For anyone else who's interested in writing a plugin, the entire activity was about as easy as it gets. This was no more than 45 minutes work. If you can imagine a string replace activity and wanted to implement that as a plugin, you could go to school on this one.

    I spent two full hours last night getting to the bare metal on measuring the C2 platform's plane. It's fairly off, to be honest. Even if I do eventually turn autoleveling back on after all this effort, at least I don't have to worry about the feature polluting my tests now.
     
  4. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    21,544
    Likes Received:
    7,062
    Nah, for most things (but not even remotely all) OctoPrint is a host program so it is just passing along your GCode.
    Yes, it has startup, ending scripts and the like, but it is mainly just a host program :)

    Everyone has their own approach to dealing with this stuff. Once we made the choice to front every printer with an OctoPrint instance we moved all of the printer specific init code to OctoPrint and largely moved on.
     
    Ed Ferguson likes this.

Share This Page