mirror of
https://github.com/Klipper4FlashForge/firmware.git
synced 2026-10-23 13:52:16 -05:00
The Moonraker component and the Klipper macros behind Mainsail's Timelapse
tab, pinned by commit because upstream has never cut a tag.
Upstream's scripts/install.sh is not used: it clones into a home directory,
symlinks into a Moonraker checkout, appends to live config and registers an
update_manager entry that re-clones itself over the network. All of those are
things this repo does differently, so the tarball is a source like any other
and the two files it contributes are placed by hand. timelapse.py lands
inside anvil-moonraker's directory because Moonraker resolves a component
with import_module(".components.<name>", "moonraker") and looks nowhere else.
No BUILD_TIMELAPSE flag, unlike every other optional piece here.
moonraker.conf carries a [timelapse] section and printer.base.cfg an
[include timelapse.cfg]; Moonraker dies on a section with no component behind
it and Klipper on an include it cannot find, so the off position of that flag
would not be a printer without timelapses -- it would be a printer that does
not come up.
The dependency arrow runs one way on purpose. anvil-timelapse does NOT depend
on anvil-moonraker, though it plainly needs it: anvil-moonraker already
depends on this package for the config section above, and declaring both
would be a cycle. Only the direction that is a hard failure is written down.
frame_path is /usr/data/anvil-timelapse rather than the default
/tmp/timelapse/: /tmp here is tmpfs, so a tall print's frames would be
hundreds of megabytes of RAM on the machine running that print.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TSmXJv47Wwq2J7FfgCgpCe
58 lines
3.0 KiB
Plaintext
58 lines
3.0 KiB
Plaintext
# anvil-klipper-config -- the toolchanger's Klipper config: the ff-*.cfg
|
|
# includes, and printer.base.cfg which includes them.
|
|
#
|
|
# THESE WERE anvil-core's AND SHOULD NEVER HAVE BEEN. They are Klipper config
|
|
# and mean nothing to a machine that is not running Klipper; anvil-core is
|
|
# what makes the machine ours, and it had these only because it was the first
|
|
# recipe written.
|
|
#
|
|
# NOT PART OF pkgs/klipper, and the reason is the gate rather than the
|
|
# subject: these are BUILD_TOOLCHANGE's, while pkgs/klipper carries the
|
|
# program that implements these sections and is not optional at all. Config a
|
|
# printer's owner overrides from printer.cfg and code that ships whatever they
|
|
# choose are two different lifetimes.
|
|
#
|
|
# ARCHITECTURE all: Klipper .cfg, not one byte of native code.
|
|
PKG_NAME=anvil-klipper-config
|
|
PKG_ARCH=all
|
|
|
|
# The release's version, as anvil-core's is and for the same reason: these
|
|
# files have no upstream. PKG_STAMP_EXTRA is what actually notices an edit.
|
|
PKG_VERSION="$MOD_VER"
|
|
PKG_RELEASE=1
|
|
PKG_SECTION=base
|
|
PKG_EXCLUDE=".version"
|
|
|
|
# NO DEPENDS, AND THE DIRECTION IS THE POINT. ff-chamber.cfg drives a chamber
|
|
# heater this package does not declare, so depending on the virtual name both
|
|
# model packages provide looks right -- and puts the arrow the wrong way
|
|
# round: opkg would resolve it by picking whichever provider it found first,
|
|
# a coin flip between two files that describe DIFFERENT HARDWARE.
|
|
#
|
|
# The model is not a detail to be resolved, it is the thing the installer
|
|
# knows and opkg does not. So the model package is what you install, and it
|
|
# depends on this one. Nothing sensible installs this package by name.
|
|
#
|
|
# The one Depends does not contradict that: the argument above is against a
|
|
# VIRTUAL name with two providers. anvil-timelapse is one concrete package, and
|
|
# printer.base.cfg's [include timelapse.cfg] is its file -- Klipper refuses to
|
|
# start on an include it cannot find.
|
|
PKG_DEPENDS="anvil-timelapse"
|
|
PKG_BUILD_DEPENDS=""
|
|
|
|
# The flag that turns the toolchanger off. With these files in anvil-core it
|
|
# did NOT gate the .cfg, so BUILD_TOOLCHANGE=0 shipped the config of a
|
|
# disabled feature -- harmless, and exactly the kind of flag that reads as
|
|
# working until somebody relies on it.
|
|
PKG_WHEN='[ "${BUILD_TOOLCHANGE:-1}" = "1" ]'
|
|
|
|
PKG_STAMP_EXTRA="$(pkg_payload_hash)"
|
|
|
|
# PRINTER.BASE.CFG IS THIS RECIPE'S TOO, and sits in prog/ because it lands on
|
|
# /usr/prog rather than under the prefix. It was in pkgs/klipper, which was
|
|
# wrong twice over: it is Klipper CONFIG rather than part of the Klipper
|
|
# program -- it carries the [include] lines and is the entry point to
|
|
# everything else here -- and it is installed under BUILD_TOOLCHANGE, which
|
|
# pkgs/klipper does not answer to.
|
|
PKG_DESCRIPTION="The toolchanger's Klipper config: printer.base.cfg and the includes it pulls in -- toolchange, tool offsets, filament handling, runout recovery, chamber macros and the legacy compatibility layer. The includes install to \$MODDIR/config and the installer copies them to /usr/data/config, where printer.base.cfg's relative includes resolve."
|