Improve Chamber Lighting Functionality#5180
Improve Chamber Lighting Functionality#5180holdenkilbride wants to merge 3 commits intoprusa3d:masterfrom
Conversation
Replaces the DimmingEnabled toggle (Never/Always/On Idle) with three independent brightness levels: - Chamber Brightness: on user interaction (door, knob, touch) - Print Brightness: during active print, after activity timeout - Idle Brightness: when not printing, after activity timeout Previously there was no way to set distinct brightness for printing vs. idle states. The On Idle mode applied the same dimmed level to both, meaning users could not keep the chamber well-lit during a print while dimming at night when idle. Adds SideStripState::printing alongside the existing dimmed and active states. The active state is now only entered when max_brightness exceeds the current baseline, preventing a pointless brightness flash on interaction when chamber brightness is already at or below baseline. Idle brightness is clamped in the menu to not exceed chamber brightness. side_leds_dimming_enabled is moved to DeprecatedStore for backward compatibility. Print brightness defaults to 255 to preserve behavior for users upgrading from the previous firmware.
43ea564 to
e69896a
Compare
|
Some things I noticed:
|
|
@bkerler Would you happen to know when the master branch gets updated with the release code? |
|
The latest code is always released in the tags, but community development mainly happens in master. Master is normally updated after major releases, I'd expect the next master to be 6.6.0. |
…bled::always now have side_leds_print_brightness set to their configured dimmed_brightness, preserving the intent that LEDs dim during printing after upgrade. Enforce the idle-brightness-must-not-exceed-chamber-brightness invariant in load_config(), set_max_brightness(), and set_dimmed_brightness() so it holds regardless of how values arrive, not only when the menu widget Loop() runs.
Add migration for side_leds_dimming_enabled: users who had DimmingEna…
|
@bkerler I updated the code per your notes/observations. I tested on my Core One and verified the setting upgrade paths worked correctly. Thank you for your review! |
Replace chamber lighting dimming toggle with three-level brightness control
Summary
Replaces the binary
DimmingEnabledsetting (Never / Always / On Idle) with three independent brightness levels for chamber lighting: interaction brightness, print brightness, and idle brightness. This gives users granular control over lighting behavior across all printer states without sacrificing simplicity.Problem
The previous implementation had two configurable values — a maximum brightness and a dimmed brightness — gated by a three-way enum toggle. This created several UX problems:
Changes
side_strip_handlerprintingstate toSideStripStatealongside the existingdimmedandactivestatesDimmingEnabled dimming_enabledmember withuint8_t print_brightnessupdate()logic: when activity timeout expires, transitions toprintingstate if a print is active, otherwisedimmed; theactivestate is onlyentered on user interaction if
max_brightness > baseline(prevents a pointless flash to active when interaction brightness is already at or below currentbrightness)
get_color_for_state()handles the newprintingstate, clamping toprint_brightnessConfig store
side_leds_dimming_enabled(migrated toDeprecatedStore)side_leds_print_brightness(default 255 — full brightness during prints, preserving existing behavior for users upgrading)side_leds_dimmed_brightnessandside_leds_max_brightnessretain their existing hash keys for backward compatibilityMenu items
MI_SIDE_LEDS_DIMMING_ENABLE(the three-way toggle)MI_SIDE_LEDS_PRINT_BRIGTHNESSspinner (0–100%)MI_SIDE_LEDS_DIMMED_BRIGTHNESS::Loop()now enforces that idle brightness cannot exceed chamber brightness, auto-clamping and saving if neededBehavior after this change
Upgrade path
Existing users upgrading from firmware with
DimmingEnabled:side_leds_dimming_enabledis deprecated and migrated away; existing max/dimmed brightness values are preservedTesting
Fixes #5179
