bchanudet / OctoPrint-Octorant

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

Toggle to switch from KB/MB printed as the measure of progress to the actual percentage from Octoprint? #37

Open laposheureux opened 4 years ago

laposheureux commented 4 years ago

I've noticed that Octorant, at present, triggers its percentage threshold messages based on the actual number of bytes completed so far over the total bytes. This often does not actually match the percentage progress from Octoprint and also makes for inconsistently timed reports of progress (most often notable when there is a significantly large and slow first layer which represents a large chunk of the printable time but is not particularly complex in gcode).

Is it possible to expose a toggle to switch between the existing functionality and actually tracking the Octoprint progress value?

bchanudet commented 4 years ago

Hello and thanks for using Octorant!

I get what you mean with how, on some prints, the first layer takes a meaningful part of the print and the percentage may not be accurate. However, Octorant is using the "official and documented" way to get the percentage, via the ProgressPlugin mixin that Octoprint offers.

I would have guessed that Octoprint itself uses the same value but maybe that changed a bit since the last time I checked. Which version of Octoprint are you using?

I noticed also some values to be deprecated in v1.4, so it seems like a good time to have a thorough check of the plugin to be ready for the future. :)