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

Show both layer time and tick info when tick is highlighted #2312

Merged
merged 2 commits into from
Oct 4, 2023

Conversation

Noisyfox
Copy link
Collaborator

@Noisyfox Noisyfox commented Oct 4, 2023

This addresses the concern at #2305 (comment)

image

@Noisyfox
Copy link
Collaborator Author

Noisyfox commented Oct 4, 2023

Hold on... Just realized that the layer time is the time when current layer is completed, however pause happens at the beginning of current layer. This is confusing.

@Noisyfox Noisyfox marked this pull request as draft October 4, 2023 03:03
@discip
Copy link
Contributor

discip commented Oct 4, 2023

Uh! That's a shame. 😅

Coming from Cura, this is what happend to confuse me as well!
But I think that's intentional, just in case someone needs to insert 'custom code' before the first layer.
Thinking loud: But then again it's not possible to insert 'custom code' at the end of the last layer this way.

  1. Perhaps this behavior could be changed so that 'custom code' is inserted at the end of a layer.
    And if someone needed to insert code before the first layer, this could be achieved by changing the start g-code. 🤷‍♂️

  2. Or just show the time of the previous layer.

What do you think?

@Noisyfox
Copy link
Collaborator Author

Noisyfox commented Oct 4, 2023

2. Or just show the time of the previous layer.

This will be the easier solution, however it might be inaccurate due to the existence of the before/after_layer_change gcode.

For a layer with a pause, the gcodes are:

  1. before_layer_change
  2. layer_change
  3. pause
  4. each object until the end of current layer

The layer time is calculated from (1) to (4), but the pause gcode is inserted at (3), so if (1), (2) take a lot of time, then the time of pause will be significantly different from previous layer's end time.

@Noisyfox
Copy link
Collaborator Author

Noisyfox commented Oct 4, 2023

But then, how accurate do we actually need? I think it's perfectly fine to use the previous layer's end time as a good estimation.

@discip
Copy link
Contributor

discip commented Oct 4, 2023

But then, how accurate do we actually need? I think it's perfectly fine to use the previous layer's end time as a good estimation.

That should suffice, because ideally you want to be there shortly before the actual pause so that you can immediately resume printing.

Thank you a lot for taking this on! 😃👍

@Noisyfox Noisyfox force-pushed the dev/slider-tick-time branch from 18cb1e5 to b02eae2 Compare October 4, 2023 13:46
@Noisyfox Noisyfox marked this pull request as ready for review October 4, 2023 13:47
@Noisyfox
Copy link
Collaborator Author

Noisyfox commented Oct 4, 2023

Currently if pauses is added to the first layer then there is no previous layer finish time to use, hens it won't show the time. Other than that, this should be good.

There is a way to get the start time of first layer however it's quite complicated, and I think this is a very edge use case which can be ignored for now.

@discip
Copy link
Contributor

discip commented Oct 4, 2023

Thank you!

@SoftFever
Copy link
Owner

Cool!
Thanks for working this

@SoftFever SoftFever merged commit d31ca04 into SoftFever:main Oct 4, 2023
0 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants