LazeMSS / OctoPrint-TopTemp

Topbar temperature plugin for OctoPrint
21 stars 2 forks source link

[FR] read data from DisplayLayerProgress #55

Closed electronicm closed 1 year ago

electronicm commented 3 years ago

You are a genius at UI customization! I like the look and functionality of this plugin, as well as UI Customizer.

I would like to add the following values to the header with icons:

These are already provided by the plugin DisplayLayerProgress. However, these would currently have to be fetched, for each value individually, in a very resource consuming way. It would be a more user-friendly and resource-saving way if you could integrate the data, for example via EventHandler.

I'm looking for an alternative way to get these values into the header, since I don't like the way "DisplayLayerProgress" looks and it can't be adjusted accordingly via CSS.

LazeMSS commented 3 years ago

They are on the nice to list

puterboy commented 2 years ago

You can easily get print time left (as well as remaining percent) using a custom parameter.

This is what I do for time remaining: Name: Time Remaining Type: From printer Regexp: ^NORMAL MODE:.print time remaining in mins: (\d+);. (or if using silent mode: ^SILENT MODE:.print time remaining in mins: (\d+);.* Post calculate: X+1 NOTE: Add '1' minutes since when says '0' really up to 1 minute left +Only show while printer is printing -Input is a temperature value +Show overlay with more details on mouse hover Unit: m Label: "Time: " Width: 0 Icon: fas fa-hourglass-end -Colorize icons to indicate hot or not Number of digits: 0 Decimal seperator: . +Show graph backup Graph transparency: 0.2 Graph height: 50 Graph line width: 1 Graph line color:

For percent completed, I do:

Name: Percent Printed Type: From printer Regexp: ^NORMAL MODE: Percent done: (\d+);. (or for silent mode: ^SILENT MODE: Percent done: (\d+);. Post calculate: +Only show while printer is printing -Input is a temperature value +Show overlay with more details on mouse hover Unit: % Label: "Done: " Width: 0 Icon: fas fa-percent +Colorize icons to indicate hot or not Color change level: 95 NOTE: Change color when 95% completed Number of digits: 0 Decimal seperator: . +Show graph backup Graph transparency: 0.2 Graph height: 50 Graph line width: 1

puterboy commented 2 years ago

Note estimated end time can be calculated from remaining time and current time

LazeMSS commented 1 year ago

Closing - this can be done as Puterboy wrote :)