ballaswag / guppyscreen

A native Touch UI for 3D Printers running Klipper/Moonraker.
GNU General Public License v3.0
166 stars 14 forks source link

Layer counts on print screen not updating when printing from slicer #51

Open ajs123 opened 2 months ago

ajs123 commented 2 months ago

With SET_PRINT_STATS_INFO TOTAL_LAYER=[total_layer_count] in the print start gcode, and SET_PRINT_STATS_INFO CURRENT_LAYER={layer_num + 1} at each layer...

  1. Power up printer (or restart firmware from Guppyscreen) and print from the slicer: Layer number and total display as expected.
  2. Print a second print from the slicer: Layer number and total indicate the last layer from the prior print. In my quick testing, this happens even if I hit "back" in the print status screen prior to initiating the print from the slicer.
  3. Print something from the Guppyscreen menu: Layer number and total display as expected.

Scanning, the source code, it looks like total_layer and cur_layer aren't being initialized when printing is started via moonraker, then display of the changes is blocked by

if (new_total_layer > total_layer || new_cur_layer > cur_layer) {

sigmashig commented 2 months ago

Vote for this issue. I have the same problem.

PJW58 commented 1 month ago

+1 - Same issue here. I am currently resetting Guppy Screen between each print job to compensate.

ballaswag commented 1 month ago

Try latest release. Layer count resets should have been fixed.

SSPW commented 4 weeks ago

I tried 0.0.23-beta today. ... At first i also still had no layers.

I took a look at your code and i read the issue https://github.com/ballaswag/guppyscreen/issues/47 and did some general klipper searches only to realize that total layers and current layer had to be supplied by the slicer.

I niavely assumed this info was available in klipper because it was already showing on my FLUID screens!

When i added;

SET_PRINT_STATS_INFO TOTAL_LAYER=[total_layer_count] SET_PRINT_STATS_INFO CURRENT_LAYER=0

to my orca slicer start gcode, and

SET_PRINT_STATS_INFO CURRENT_LAYER={layer_num+1}

to my orca slicer layer change gcode

The layer display started working.

I would suggest you add this requirement to the README.MD.