Skip to content

Temperature override and +/- steppers for the numeric controls - #25

Merged
bbolinger merged 5 commits into
mainfrom
feature/temp-override
Jul 16, 2026
Merged

bbolinger merged 5 commits into
mainfrom
feature/temp-override

Conversation

@bbolinger

Copy link
Copy Markdown
Owner

Highlights

  • Bed and nozzle temperature override. For custom filament run on a stock profile, dial the nozzle and bed temp right in the form. Each value is gated to a per-material safe range sourced from Snapmaker's own U1 presets, published material guides, and the U1's hardware limits (hotend 300C, bed 100C).
  • A +/- stepper for every numeric control. Temperature, infill, walls, and top/bottom shells are now a one-row stepper, so you dial any exact value ("+"/"-", plus "+5"/"-5" where the range is wide) instead of picking from a fixed list. Pattern and the on/off toggles stay as buttons.
  • Each control's header shows the profile's current value, and tapping it keeps that value.

Safety

  • A low or off bed is always allowed (a cool or cold plate is a real setup), so only the maximum is gated. An out-of-range value is rejected, and the slicer clamps as a backstop.
  • The override lands in the real sliced gcode (temps as M104/M109/M140/M190, infill and walls in the config), confirmed by an end-to-end slice test.

Notes

  • Temperature current values and ranges are read per material from the loaded filament's profile; the process values from the print profile.
  • Also swapped the em-dash in the print-head label for a middot.
  • Full test suite green (1047 passed, 8 skipped).

The slice side of the optional bed/nozzle temperature control:

- u1_temps: per-material nozzle/bed envelopes sourced from Snapmaker's own U1
  filament presets, published material guides, and the U1 hardware spec
  (hotend 300, bed 100). Bed has no minimum so a cool/cold plate or bed-off is
  never blocked; only the max is gated.
- apply_filament_overrides: patches the flattened filament profile's temps,
  clamped to the material envelope, written across both layers and every bed
  plate variant so the filament stays self-consistent.
- real_orca_slice gains a filament_overrides argument.

Real-Orca e2e confirms an override lands in the sliced gcode; unit tests cover
the clamp, the cold-plate bed-off case, and the no-op path.
The form half of the bed/nozzle temperature override:

- u1_form: a Temperature category with material-dynamic Nozzle and Bed
  controls. The schema carries each material's current temp and sourced
  range, so the renderer resolves the header and shows only in-range
  options. Parse validates the pick against the material range and maps it
  to filament_overrides; an out-of-range pick fails loudly.
- u1_form_telegram: material-dynamic rendering (current temp in the header,
  out-of-range options hidden, bed-off offered for a cool or cold plate),
  plus a reset of any temp pick when the head changes.
- u1_kit_workflow: resolves the per-material current temps and threads the
  filament override into the slice.
- u1_arrange: applies the filament override before slicing.

Tests cover the schema, parse validation, and the material-dynamic
renderer. The readiness review already sweeps nozzle and bed temp, so an
override shows there as a change automatically.
The kit slices through arrange_slice, not real_orca_slice, so add an e2e
that slices a cube through arrange_slice with a temp override and asserts
the overridden nozzle/bed land in the plate gcode.
The step buttons only offered 10C increments. Replace them with a one-row
stepper (-5, -, +, +5) so the operator dials any exact temperature. A
full-width header shows the setting and the current target, and tapping it
keeps the profile value. The dialed value is clamped to the material's
sourced range and lives in form["temp"], separate from the option
selections, so nothing indexes an option list with a temperature. Review,
the changed count, and the answer payload read the stepper target;
changing the head clears it. New T: callback prefix added to the gateway
routing pattern.
Infill, walls, and top/bottom shells were option grids; make them the same
+/- stepper as temperature. Infill keeps the 5-jump (-5/-/+/+5); walls and
shells use just -/+. Pattern, one-wall-on-top, and the on/off/named
controls stay as option buttons.

The stepper base comes from the profile's resolved value; the dialed value
maps to the process override with its unit (infill -> "36%", walls -> "7"),
clamped to sane bounds and range-checked at parse. A general _stepper_state
resolves the base from the material (temps) or the profile (process), and
form["steps"] holds every stepper's target. Changing the head clears only
the temperature steppers; the numeric ones are absolute. Also swap the
em-dash in the print-head label for a middot.
@bbolinger
bbolinger merged commit 68253cc into main Jul 16, 2026
3 checks passed
@bbolinger
bbolinger deleted the feature/temp-override branch July 16, 2026 12:14
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.

1 participant