bchanudet / OctoPrint-Octorant

Discord plugin for OctoPrint
MIT License
26 stars 14 forks source link

As soon as I enable "Printing Progress" (to every 20 % in this example) it posts INSTANTLY multiple screenshots #71

Closed thenixhex311 closed 11 months ago

thenixhex311 commented 1 year ago

Like it is doing a screen shot every second. I would get 'xxx is at 4% over and over and over as discord posts.

Not sure what is going on. https://imgur.com/WpuqHlK

bchanudet commented 1 year ago

Hi,

Basically, once you start a print, OctoRant starts a "watch" in the background, that every 0.5 second will get the progress status and see if any of the "Progress settings" matches. If so, it will send a message to Discord.

For the timed interval setting, it works like this: every 0.5 second, OctoRant will calculate how many seconds has elapsed since the previous message. If it's more that the number set in the settings, it sends a message. In your case, I see in your screenshot that you have set an interval of 0 second. So OctoRant is trying to send a message every time, because any time interval will be higher than 0.

You also have the same problem with the "Height" set at 0 mm, though here it's a little less problematic as the hotend can spend a long time at the same height. But you'd still receive message for every layer change.

There are two different ways to fix this: