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

Update Estimated Printing Time Logic #3360

Merged
merged 3 commits into from
Jan 17, 2024
Merged

Conversation

iZonex
Copy link
Contributor

@iZonex iZonex commented Jan 12, 2024

Description

This PR introduces changes to the logic used for calculating and displaying the estimated printing time in our printing software. It specifically adds a conditional check to distinguish between BBL and non-BBL printers, affecting how the estimated printing time is displayed.

Changes Made

  1. Conditional Check for BBL Printers: Implemented a check to determine if the printer is a BBL printer using if (!print.is_BBL_Printer()). This allows for different handling of estimated printing times based on the printer type.

  2. Separate Handling for Estimated Printing Time:

    • For non-BBL printers, the code now includes the estimated printing time in a specific mode (normal constant).
    • For BBL printers, the estimated printing time is replaced with the model printing time and total estimated time.

Rationale

This change is important to provide accurate and relevant printing time estimates tailored to the type of printer being used. Differentiating between BBL and non-BBL printers allows us to display the most relevant information to the user, enhancing the usability and accuracy of the software.

Testing

The changes have been tested in various scenarios to ensure that:

  • The correct time estimates are displayed for both BBL and non-BBL printers.
  • There are no buffer overflows or memory issues with the formatted strings.

Request for Review

I request the reviewers to focus on:

  • The correctness of the conditional logic for printer types.
  • The format and clarity of the displayed messages.
  • Any potential edge cases that might have been overlooked.

@iZonex iZonex marked this pull request as draft January 12, 2024 13:40
@Eldenroot
Copy link

Also would be nice to see the "first layer" time. PS does this and it is useful.

@iZonex
Copy link
Contributor Author

iZonex commented Jan 15, 2024

Also would be nice to see the "first layer" time. PS does this and it is useful.

Will be nice to see your contribution, thanks!

@iZonex iZonex marked this pull request as ready for review January 15, 2024 05:05
@SaltWei
Copy link
Collaborator

SaltWei commented Jan 17, 2024

+1 for these patch. I think they can be merged. Thank you very much for contribution! @iZonex

@lanewei120 lanewei120 merged commit 10e5365 into bambulab:master Jan 17, 2024
2 checks passed
@lanewei120
Copy link
Collaborator

thanks for doing this

lanewei120 added a commit that referenced this pull request Jan 19, 2024
/Users/ci.slave/slicer/patch_build/1/bamboo_slicer/src/libslic3r/GCode/GCodeProcessor.cpp:486:33: error: cannot pass non-trivial object of type 'std::string' (aka 'basic_string<char, char_traits<char>, allocator<char>>') to variadic function; expected type from format string was 'char *' [-Wnon-pod-varargs]
                                  get_time_dhms(machine.time));
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~

github pull request: #3360
Change-Id: If13ee145b20ef9532b23a58bb3b0a29f30d8c0a8

Change-Id: I98fd87417c432c3afae67a3d2bc29c79f8bffa3c
hadess pushed a commit to hadess/BambuStudio that referenced this pull request Jun 22, 2024
/Users/ci.slave/slicer/patch_build/1/bamboo_slicer/src/libslic3r/GCode/GCodeProcessor.cpp:486:33: error: cannot pass non-trivial object of type 'std::string' (aka 'basic_string<char, char_traits<char>, allocator<char>>') to variadic function; expected type from format string was 'char *' [-Wnon-pod-varargs]
                                  get_time_dhms(machine.time));
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~

github pull request: bambulab#3360
Change-Id: If13ee145b20ef9532b23a58bb3b0a29f30d8c0a8

Change-Id: I98fd87417c432c3afae67a3d2bc29c79f8bffa3c
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.

4 participants