hal: restore working homecomp example - #4337
Open
grandixximo wants to merge 2 commits into
Open
Conversation
grandixximo
force-pushed
the
fix/homecomp-rebuild
branch
from
August 4, 2026 06:52
a08a080 to
9f0d548
Compare
BsAtHome
reviewed
Aug 4, 2026
grandixximo
force-pushed
the
fix/homecomp-rebuild
branch
2 times, most recently
from
August 4, 2026 08:26
76d079c to
2665cb7
Compare
Add per-function documentation to homing.h: what each interface function does, when motmod calls it, and return semantics. Point to it from the code-notes motion-controller section and from the homecomp description so man page readers find it.
grandixximo
force-pushed
the
fix/homecomp-rebuild
branch
from
August 4, 2026 08:29
2665cb7 to
82cd21f
Compare
grandixximo
marked this pull request as ready for review
August 4, 2026 08:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #4329. homecomp.comp was filtered out of the build because it no longer compiled on master; the discussion on #4329 made it clear that should be fixed. This restores homecomp as a real, buildable plug-in homing module that demonstrates something useful, rather than an empty "always-homed" shell.
The default skeleton is a working homing module:
The skeleton's function signatures use opaque pointer and integer arguments, so the default path does not pull in motion.h's heavy transitive includes. The exported symbols still resolve to the names motmod calls.
The advanced HOMING_BASE path is preserved: with HOMING_BASE pointing at a checkout's src/emc/motion/homing.c, the template #includes that file with CUSTOM_HOMEMODULE defined and exposes per-joint request-custom-homing / is-custom-homing pins for users who want to override the base_* helpers. This is the original pattern from the 2.9-era homecomp, kept for completeness. Note that motion.h/homing.h are no longer exported to the halcompile include path since 82f05bc, so the custom block relies on homing.c's own quoted includes and does not include them directly.
Verified: both build modes compile clean with halcompile (zero warnings), and the skeleton was runtime-tested headless as HOMEMOD=homecomp (sim on => all homed; sim off => unhomed; sim off with all home-sw-in closed => homed again).