Git Product home page Git Product logo

Comments (23)

FormerLurker avatar FormerLurker commented on May 30, 2024

Will you try installing the new beta development branch, I just fixed a similar issue with another printer yesterday! Replace master.zip with BetaDevelopment.zip.

It could also be that the homing command is split. I wrote my code to handle this, but it's not something that appears in any of my test prints (time to add that).

If I have time I'll take a look later tonight, if not tomorrow night (I have a thing in a few hours). If you don't mind, can you post plugin_octolapse.log and your GCode file? Fyi, the log may be empty depending on your debug settings.

from octolapse.

FormerLurker avatar FormerLurker commented on May 30, 2024

Forgot to mention, the button in the upper right corner plays the most recent N frames.of the timelapse. You'll see it work after a few frames. I need to make that more clear.

The pop up is all kinds of messed up in chrome (works fine in ff). Working on that, as well as the poor dialog css (bootstrap 2, ug) Both items were a last minute (last day actually) addition to the beta build.

Let me know if the preview animation works for you once we get snapshots working.

from octolapse.

Shadowen avatar Shadowen commented on May 30, 2024

I installed from BetaDevelopment and it still doesn't seem to detect homing.

/home/pi/.octoprint/logs/plugin_octolapse.log doesn't have anything interesting:

2018-02-22 22:29:31,161 Octolapse - loaded and active.
2018-02-22 22:29:31,834 Octolapse - is loading template configurations.
2018-02-22 22:36:44,296 Saving Settings.

I tried once with verbose logging and it didn't seem to have anthing still. Am I looking at the right log?

GCode file is a cube.
cube.txt


Also, I'm wondering how you usually do development? How do you deploy the development build to your Pi? Right now I have to uninstall and reinstall through plugin manager, but that only gets me the tip of a branch. I'm assuming you have a way to just sync source code across to the Pi and run it immediately?

from octolapse.

Shadowen avatar Shadowen commented on May 30, 2024

Oops. Found the rest of the log.
plugin_octolapse.log

Relevant portion:

2018-02-22 22:41:08,937 Position - Unable to parse the Gcode:G28 X0 Y0
2018-02-22 22:41:11,078 Position - Unable to parse the Gcode:G28 Z0
2018-02-22 22:42:48,053 Position - Unable to parse the Gcode:G28 X0 Y0
2018-02-22 22:42:54,324 Position - Unable to parse the Gcode:G28 Z0
2018-02-22 22:44:07,058 Position - Unable to parse the Gcode:G28 X0 Y0
2018-02-22 22:44:13,232 Position - Unable to parse the Gcode:G28 Z0
2018-02-22 22:45:04,014 Position - Unable to parse the Gcode:G28 X0 Y0
2018-02-22 22:45:09,919 Position - Unable to parse the Gcode:G28 Z0
2018-02-22 22:50:25,181 Position - Unable to parse the Gcode:G28 X0 Y0
2018-02-22 22:50:30,812 Position - Unable to parse the Gcode:G28 Z0

Seems like you were correct. If you can give me some pointers on running development code, I can probably fix this up :)

from octolapse.

FormerLurker avatar FormerLurker commented on May 30, 2024

from octolapse.

FormerLurker avatar FormerLurker commented on May 30, 2024

Looking at the log, it looks to be a problem with my regex (I am not so good with regex, but getting better). I can send you a visual studio solution with some instructions on getting a virtual environment for python to work if you want to tinker. Let me know, and thanks for reporting the issue! I'd live to integrate a pull request sometime. So cool.

from octolapse.

FormerLurker avatar FormerLurker commented on May 30, 2024

Ok, last message tonight :) If you're good with regex, the problem code is here on line 275.. I've never seen numbers after the X, Y or Z, so that's definitely the problem. For example, for the y parameter I have:

(?i)^(y)

I probably need something more like this:
(?i)^y(?P-?[0-9]{0,15}.?[0-9]{1,15})$

Somehow those numbers must be made to be optional. What do those numbers even do? Is it saying y = 0 after the home command? I'll have to do some research to figure that out. I'll also have to modify position.py (you can search for G28) and figure out how to handle the parameters. I might be able to just ignore them since I send an M114 (get position) command right after homing to auto detect the origin, and I allow an origin to be manually entered in the printer profiles.

I'm going to make this a priority issue. It will be fixed prob tomorrow. In the meanwhile, just get rid of the numbers, or just use plain old g28. Not sure why your sliced code homing the way it is unless it's something specific to your printer. I worked an issue yesterday, I'm pretty sure it was the same model printer, and it was homing with just g28, so I think it should be OK.

from octolapse.

Shadowen avatar Shadowen commented on May 30, 2024
The X, Y, and Z parameters act only as flags. Any coordinates given are ignored. For example, G28 Z10 results in the same behavior as G28 Z.

http://reprap.org/wiki/G-code#G28:_Move_to_Origin_.28Home.29

I'll take a look at the regex tonight. My slicer profile might be doing something funny to the homing code, or it might be Slic3r Prusa Edition.

from octolapse.

FormerLurker avatar FormerLurker commented on May 30, 2024

from octolapse.

Shadowen avatar Shadowen commented on May 30, 2024

By the way, I usually use PyCharm, if that's an option. If you can point me to this virtual printer setup you have, I can see if I can resolve some of your issues.

from octolapse.

FormerLurker avatar FormerLurker commented on May 30, 2024

from octolapse.

ninjamojo avatar ninjamojo commented on May 30, 2024

Hey, I think this regex will work:

(?i)^(x)(?:-?[0-9]{1,15}(?:.[0-9]{1,15})?)?$

Here it is in action: https://regex101.com/r/oKsQdE/2

I've not tested 100% yet, will get to that today still hopefully.

from octolapse.

Shadowen avatar Shadowen commented on May 30, 2024

I was using something similar.

Still working my way through your parsing logic (You split, then regex each part? I would've written a single monstrous regex with capture groups for each thing o.O)

Got OctoPrint working on my computer though, so that's nice.

+1 for non-capturing groups though. Totally forgot about that, so I was getting multiple captures and it was failing :(

from octolapse.

FormerLurker avatar FormerLurker commented on May 30, 2024

from octolapse.

Shadowen avatar Shadowen commented on May 30, 2024

Haha, I can really tell you're not a Python developer. Brackets everywhere, weird variable naming schemes... I'm not exactly a Python developer either, but let me see if I can get you this PR.

from octolapse.

FormerLurker avatar FormerLurker commented on May 30, 2024

I REALLY struggled with the naming conventions. I started out using one more familiar to me, but it RADICALLY conflicted with the parameter, function, member conventions I was seeing. I'm used to being able to do 100% safe project wide refactoring, and found this very difficult in Python, else I'd have tried to fix this embarrassing stuff.

How well can pycharm refactor? I'd love to run something similar to resharper on this project and just make everything consistent.

from octolapse.

Shadowen avatar Shadowen commented on May 30, 2024

I don't think Python as a language supports project-wide refactoring. You don't know which class you're referring to until runtime...

from octolapse.

FormerLurker avatar FormerLurker commented on May 30, 2024

Given a choice I prefer strongly typed languages, but I am starting to see some of the power (and potential disorder in the wrong hands) of python.

from octolapse.

Shadowen avatar Shadowen commented on May 30, 2024

I prefer Java. C++ feels like they want to become Python, but they're still carrying around the C baggage. Oh well.

from octolapse.

FormerLurker avatar FormerLurker commented on May 30, 2024

from octolapse.

FormerLurker avatar FormerLurker commented on May 30, 2024

Hey, it looks like that code fixed the issue! I'm running it through the virtual printer as we speak, and it's happily snapping away again! I'll leave this open until you confirm.

So were you able to get everything working properly in pycharm (debugger included)? If so I would love to get some quick start type instructions to add to the repo for people interested in assisting with the plugin.

This issue went very well! It's just fun to cooperate after working alone on this for so long. Thank you so much!

from octolapse.

Shadowen avatar Shadowen commented on May 30, 2024

from octolapse.

FormerLurker avatar FormerLurker commented on May 30, 2024

I believe this issue is fixed. I've not seen an issue detecting home in a while. Closed!

from octolapse.

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.