eyal0 / OctoPrint-TimeToFilament

Display time until next filament change and other time-until-whatever info in OctoPrint
3 stars 1 forks source link

Layer xxx in #27

Closed Sekisback closed 3 years ago

Sekisback commented 3 years ago

Hey eyal,

don't know, maybe a part from TimeToFilament. The State shows the actual Layer in "Layer xxx in

image

See Pic for Example: actual Layer 161 from 375 Layer 161 in 00:00:08

I expected Layer 162 in 00:00:08

eyal0 commented 3 years ago

The layer names come from the file. If you open up the file, you can see the names in there.

It might be that the file started counting from 0 and octoprint is counting from 1? OctoPrint doesn't look at the comments in the file. I think that it guesses the layer based on how much up and down movement the print head has made. It might be that the initial cleaning of the head or something has cause the count to be off by 1.

Sekisback commented 3 years ago

OK understood. Not a big deal, i changed the regex to

Next Layer in <b>${formatDuration(this.progress.printTimeLeft - this.plugins.TimeToFilament["^;LAYER:(\\d+)"].timeLeft)}</b>

case closed ;-)