Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Layer progress gauge. #8

Closed
StefanCohen opened this issue Sep 11, 2019 · 11 comments
Closed

Layer progress gauge. #8

StefanCohen opened this issue Sep 11, 2019 · 11 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@StefanCohen
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
The progress gauge only displays the total print progress.

Describe the solution you'd like
Add a gauge or enhance the existing progress gauge to display the progress of the current layer.

Describe alternatives you've considered
N/A

Additional context
The per layer progress should be possible to get from the Gcode Viewer tab.

@StefanCohen StefanCohen added the enhancement New feature or request label Sep 11, 2019
@StefanCohen StefanCohen self-assigned this Sep 11, 2019
@StefanCohen StefanCohen removed this from To do in Dashboard Nextrelease Sep 15, 2019
@j7126
Copy link
Owner

j7126 commented Oct 1, 2019

@StefanCohen are you currently working on this?

@j7126
Copy link
Owner

j7126 commented Oct 1, 2019

I have just been looking at this briefly and I think i have a way to get the percentage of the current layer from the gcode viewer tab

$('#gcode_command_slider>.slider-track>.slider-selection').width() / $('#gcode_command_slider>.slider-track>.slider-selection').parent().width() * 100

The only problem is that when the gcode viewer tab is not focused it does not update

@j7126
Copy link
Owner

j7126 commented Oct 1, 2019

I have found a way of getting the percentage from the Gcode View Model.

Will make a pull request when it is done.

@StefanCohen
Copy link
Collaborator Author

Nice. Have you managed to get it when the gcode tab is out of focus?

@j7126
Copy link
Owner

j7126 commented Oct 1, 2019

Yes.
The way I am doing it is basically hijacking gcodeViewModel._processData and then I have looked at the octoprint code for that function and basically doing the same thing that that function does to get the percentage but removing the check for the tab it is focused or not.

@StefanCohen
Copy link
Collaborator Author

StefanCohen commented Oct 1, 2019

Cool.

I was thinking that It would be nice to display the layer progress using the same types of gauges as the total layer (circle or bar). I think the Layer progress gauge type has to be independently selectable so you can for example use circle for Total Progress and Bar for Layer progress, etc...

Screenshot 2019-10-01 at 08 20 55

What do you think?

@j7126
Copy link
Owner

j7126 commented Oct 1, 2019

Looks good, I will try to do that

@StefanCohen StefanCohen added this to the 1.8.0 milestone Oct 1, 2019
@StefanCohen StefanCohen assigned j7126 and unassigned StefanCohen Oct 1, 2019
@j7126
Copy link
Owner

j7126 commented Oct 1, 2019

This might take a while, I am encountering a lot of problems.

@StefanCohen StefanCohen removed this from the 1.8.0 milestone Oct 4, 2019
@j7126
Copy link
Owner

j7126 commented Oct 5, 2019

I will make a Pull request soon adding this as an experimental feature.

@j7126
Copy link
Owner

j7126 commented Oct 5, 2019

It still has some bugs but it is pretty good at this point. Marked it as an experimental feature in the settings page.

PR #72

@StefanCohen
Copy link
Collaborator Author

That PR It is absolutely fantastic. Thanks!

I haven't found any bugs yet but I'll run some more tests tomorrow to see if can find something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants