Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

current_layer is wrong #137

Closed
nelsongraca opened this issue May 15, 2023 · 6 comments
Closed

current_layer is wrong #137

nelsongraca opened this issue May 15, 2023 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@nelsongraca
Copy link
Contributor

Version of the moonraker integration

0.9.0

Describe the bug

Current layer says 6 when moonraker says 1.

I have done a light reading on the code and it is calculating the layer, I have that information being correctly set with SET_PRINT_STATS_INFO that sets the information on the print_stats.info object exposed by mooraker.
partial example below

{
   "result":{
      "status":{
         "print_stats":{
            "info":{
               "total_layer":132,
               "current_layer":1
            }
         },
         "eventtime":1057200.052048971
      }
   }
}
@marcolivierarsenault marcolivierarsenault added the bug Something isn't working label May 16, 2023
@nelsongraca
Copy link
Contributor Author

nelsongraca commented May 20, 2023

adding this before the current return in calculate_current_layer

if (data["status"]["print_stats"]["info"]["current_layer"] != None):
    return data["status"]["print_stats"]["info"]["current_layer"]

gives me the correct info

@marcolivierarsenault
Copy link
Owner

@nelsongraca we will look at fixing it in the next few weeks, that being said, if you have bandwith, feel free to propose a PR

@nelsongraca
Copy link
Contributor Author

@marcolivierarsenault I'll try to, since I have the code working should be quick, but I want to add an alternative way for the total layer count as well, it's contained in the same object that reports the current layer

@marcolivierarsenault
Copy link
Owner

@nelsongraca any chance with this?

@marcolivierarsenault marcolivierarsenault self-assigned this Jul 2, 2023
@nelsongraca
Copy link
Contributor Author

Creating the PR right now.

@nelsongraca
Copy link
Contributor Author

Done: #156

This has been running on my instance for a while and works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants