crysxd / OctoApp-Plugin

Companion plugin for OctoApp
GNU Affero General Public License v3.0
54 stars 4 forks source link

(Tune) Pulling current values #4

Closed escfoe2 closed 2 years ago

escfoe2 commented 2 years ago

So in the Tune menu of the app, you mention values not always being shown because Octoprint can't poll the printer for them; however, you have a gcode viewer that can watch what the printer is working on per layer. With this, you can pull the GCode commands for Feed Rate, Flow Rate, and Fan Speed to display them on screen without a need to poll the printer.

Here's how I can imagine it working: 1) If any particular value has not been manually set in the Tune section, use current layer the printer is on and pull the values from the GCode 1a) Just use a reverse For-Loop from the current layer and work your way backward until you find the most recent update to that value

2) If any value has been manually set, show that value. 2a) Save the layer it was manually set on and only display that manual value if it hasn't been updated by the GCode in a later layer

I can't see this being too difficult, but maybe I'm missing something. I hope it helps. I love the app 10 seconds after opening it and immediately supported with the maximum support amount. Thank you for taking the time to make this.

crysxd commented 2 years ago

The main issue with those values is that they are not coming from Gcode (exclusively). The user can change those values directly at the printer and OctoPrint can't track this change. That's kinda the root issue. OctoPrint opted in their last release to fully remove those values with the idea it's better to not show values than showing wrong values.

For OctoApp I have a different approach. Whenever you open the Tune menu the app is querying the current values from the printer, but not all printers can do that. If the printer responds, the app shows those values. This means the message you are referring to is slightly outdated, but there is also a bug in the 1.11 release you are using that prevents the app from capturing the values. With 1.12 this should be fixed and works great as far as I can tell :)

I will leave this open for now, let me know if this works well for you once you got the 1.12 release (next week).