Add prepare time override setting for printer profiles #679

Closed
opened 2026-04-05 16:25:45 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @AndyHazz on 2/20/2026

Description

Adds a "Prepare time override" setting to Printer > Basic information > Advanced that lets users specify a custom prepare time (in seconds) for the total print time estimate. When set to a non-zero value, it replaces the auto-estimated prepare time derived from the start G-code. Set to 0 (default) to keep using the automatic estimate.

This addresses a long-standing issue for Klipper and other printers where the start G-code only calls a macro (e.g. PRINT_START) that the slicer cannot parse — resulting in a prepare time estimate of ~1 second instead of the actual 5-20 minutes of heating, bed leveling, and calibration.

Changes:

  • PrintConfig.hpp/cpp — New machine_prepare_time config option (Float, default 0, in seconds), placed alongside existing machine timing settings (machine_load_filament_time, machine_tool_change_time)
  • GCodeProcessor.hpp/cpp — Loads the config value into the TimeProcessor struct. When non-zero, overrides the calculated prepare time in both the G-code export comments and the GUI time statistics display. The total time is adjusted by the delta (override - auto estimate) so model printing time stays accurate
  • Tab.cpp — Adds the UI control in the Printer settings, Basic information > Advanced section, next to "Time cost"

5 files changed, +40/-4 lines. Follows existing patterns for machine_load_filament_time / machine_tool_change_time.

Closes #5796

Screenshots/Recordings

The new setting appears as a numeric input field labeled "Prepare time override" with unit "s" (seconds) in the Printer tab > Basic information page > Advanced section, directly below "Time cost". The tooltip explains the purpose and notes that 0 uses the automatic estimate.

Tests

  • Full Docker build (scripts/DockerBuild.sh) completed successfully with exit code 0 — all modified source files (GCodeProcessor.cpp, PrintConfig.cpp, Tab.cpp) compiled without errors or warnings
  • The override logic preserves backward compatibility: default value of 0 means no change to existing behavior
  • When a non-zero value is set, the delta between the user's value and the auto-estimated prepare time is applied consistently to both the GUI display and the G-code file comments
  • Model printing time calculation (total - prepare) remains correct since both total and prepare time are adjusted by the same delta
*Originally created by @AndyHazz on 2/20/2026* # Description Adds a **"Prepare time override"** setting to `Printer > Basic information > Advanced` that lets users specify a custom prepare time (in seconds) for the total print time estimate. When set to a non-zero value, it replaces the auto-estimated prepare time derived from the start G-code. Set to `0` (default) to keep using the automatic estimate. This addresses a long-standing issue for **Klipper** and other printers where the start G-code only calls a macro (e.g. `PRINT_START`) that the slicer cannot parse — resulting in a prepare time estimate of ~1 second instead of the actual 5-20 minutes of heating, bed leveling, and calibration. **Changes:** - **PrintConfig.hpp/cpp** — New `machine_prepare_time` config option (Float, default 0, in seconds), placed alongside existing machine timing settings (`machine_load_filament_time`, `machine_tool_change_time`) - **GCodeProcessor.hpp/cpp** — Loads the config value into the TimeProcessor struct. When non-zero, overrides the calculated prepare time in both the G-code export comments and the GUI time statistics display. The total time is adjusted by the delta (override - auto estimate) so model printing time stays accurate - **Tab.cpp** — Adds the UI control in the Printer settings, Basic information > Advanced section, next to "Time cost" **5 files changed, +40/-4 lines.** Follows existing patterns for `machine_load_filament_time` / `machine_tool_change_time`. Closes #5796 # Screenshots/Recordings The new setting appears as a numeric input field labeled **"Prepare time override"** with unit **"s"** (seconds) in the Printer tab > Basic information page > Advanced section, directly below "Time cost". The tooltip explains the purpose and notes that 0 uses the automatic estimate. ## Tests - Full Docker build (`scripts/DockerBuild.sh`) completed successfully with exit code 0 — all modified source files (`GCodeProcessor.cpp`, `PrintConfig.cpp`, `Tab.cpp`) compiled without errors or warnings - The override logic preserves backward compatibility: default value of 0 means no change to existing behavior - When a non-zero value is set, the delta between the user's value and the auto-estimated prepare time is applied consistently to both the GUI display and the G-code file comments - Model printing time calculation (`total - prepare`) remains correct since both total and prepare time are adjusted by the same delta
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/OrcaSlicer#679