mirror of
https://github.com/Klipper4FlashForge/firmware.git
synced 2026-10-23 13:52:16 -05:00
Light the chamber at startup; firmwareExe is not there to do it
printer.base.cfg declares [led chamber_led] on white_pin PB5 and stops
there. Klipper's led module defaults initial_WHITE to 0, and nothing in
the mod ever set it: switching the light was firmwareExe's job, done
from its own UI, and that binary is precisely what this mod replaces.
The result is a chamber that stays dark forever and reads as a dead
lamp rather than a missing command.
Fixed by overriding the one option instead of restating the section.
Klipper parses with RawConfigParser(strict=False), so a second
[led chamber_led] merges into the first and white_pin carries over.
That is what keeps FlashForge's printer.base.cfg byte-for-byte -- it is
shipped verbatim and bin/unpack.sh warns when it differs from the stock
package -- so the pin stays theirs and only the initial value is ours.
ff-chamber.cfg is included after printer.base.cfg, which is what makes
the override land at all.
Verified against the parser rather than assumed: reading the two files
in order with klippy/configfile.py's exact RawConfigParser settings
leaves white_pin PB5 and hardware_pwm False intact alongside
initial_white 1.0, and getfloat('initial_WHITE') finds it despite
configparser folding the key to lower case.
The file grew a second subject, so its title line says so now.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
424ef059a7
commit
a70462b323
1 file changed
+27
-1
@@ -2,7 +2,7 @@
|
||||
# territorial integrity and my support for UN GA resolution ES-11/1.
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# ff-chamber.cfg -- chamber heater for Mainsail prints, off on the Creator 5
|
||||
# ff-chamber.cfg -- the chamber: heater (gated by model) and light
|
||||
#
|
||||
# The Creator 5 Pro has a chamber heater; the plain Creator 5 does not. The
|
||||
# two models ship the SAME Klipper tree -- printer.base.cfg declares
|
||||
@@ -96,3 +96,29 @@ gcode:
|
||||
{% if target > 0 and 'heater_generic chamber_heater' in printer %}
|
||||
TEMPERATURE_WAIT SENSOR="heater_generic chamber_heater" MINIMUM={target - ff.wait_band|float}
|
||||
{% endif %}
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# The chamber light, on at startup.
|
||||
#
|
||||
# printer.base.cfg declares [led chamber_led] (white_pin PB5) and stops there.
|
||||
# Klipper's led module defaults initial_WHITE to 0, so a freshly started
|
||||
# Klipper leaves the light OFF and nothing ever turns it on: switching it was
|
||||
# firmwareExe's job, from its own UI, and that binary is what this mod
|
||||
# replaces. On stock firmware the app lit it; here the chamber simply stayed
|
||||
# dark, which reads as a broken lamp rather than a missing command.
|
||||
#
|
||||
# Overriding one option rather than restating the section: Klipper parses with
|
||||
# RawConfigParser(strict=False), so a second [led chamber_led] MERGES into the
|
||||
# first and white_pin carries over from printer.base.cfg. That matters because
|
||||
# printer.base.cfg is FlashForge's file verbatim -- bin/unpack.sh compares it
|
||||
# against every stock package and warns when it differs -- so the pin stays
|
||||
# where FlashForge put it and only the initial value is ours. This file is
|
||||
# included after printer.base.cfg, which is what makes the override land.
|
||||
#
|
||||
# To drive it by hand, or from a macro of your own:
|
||||
# SET_LED LED=chamber_led WHITE=1 ; on
|
||||
# SET_LED LED=chamber_led WHITE=0 ; off
|
||||
# Set initial_WHITE back to 0 for a machine that should boot dark.
|
||||
# ---------------------------------------------------------------------------
|
||||
[led chamber_led]
|
||||
initial_WHITE: 1.0
|
||||
Reference in new issue
Block a user