|
From: Luca T. <no...@gi...> - 2026-10-11 09:35:19
|
Branch: refs/heads/master Home: https://github.com/LinuxCNC/linuxcnc Commit: 8229dd5621d38b68bf87692de0e4ecfff290d692 https://github.com/LinuxCNC/linuxcnc/commit/8229dd5621d38b68bf87692de0e4ecfff290d692 Author: Luca Toniolo <107...@us...> Date: 2026-10-06 (Tue, 06 Oct 2026) Changed paths: M src/Makefile M src/emc/kinematics/switchkins.c M src/emc/kinematics/switchkins.h A src/emc/kinematics/switchkins_main.c Log Message: ----------- switchkins: separate the dispatch from rtapi_app_main() switchkins.c owned rtapi_app_main(), so a module could only use it by having no main of its own, which ruled out halcompile components: the switchable kinematics in hal/components each carry a private copy of the dispatch. Move rtapi_app_main(), rtapi_app_exit() and the coordinates= and sparm= parameters to switchkins_main.c and give switchkins.c one entry point, switchkinsInit(comp_id, kp, coordinates), which counts and validates the registered types, creates the pins and starts on type 0. The caller owns the component. The types switchkinsSetup() supplies now go through switchkinsRegister() like any others, so one registration path checks every type and a double registration is refused. The eight existing modules add switchkins_main.o to their objects and are otherwise untouched. Commit: 5c5936c1ef40f6a6439889649f5ffa677cf97930 https://github.com/LinuxCNC/linuxcnc/commit/5c5936c1ef40f6a6439889649f5ffa677cf97930 Author: Luca Toniolo <107...@us...> Date: 2026-10-06 (Tue, 06 Oct 2026) Changed paths: M docs/src/motion/switchkins.adoc M src/Makefile M src/emc/kinematics/switchkins.h M src/hal/components/Submakefile M src/hal/components/millturn.comp M src/hal/components/xyzab_tdr_kins.comp M src/hal/components/xyzacb_trsrn.comp M src/hal/components/xyzbca_trsrn.comp Log Message: ----------- switchkins: let halcompile components use the switchkins core millturn, xyzab_tdr_kins, xyzacb_trsrn and xyzbca_trsrn each carried a copy of the switchkins dispatch, a private switchkins_type, a hand-written kinematicsSwitch() and a setup that had to hal_set_unready() the component again. Now that the dispatch is separate from the main program a component links it and calls switchkinsInit() from EXTRA_SETUP(). Two build changes: the generated per-comp .mak takes a <component>-extra-objs list, and switchkins.h is copied to ../include and installed so <switchkins.h> resolves from a generated source. Each of the four registers its types and calls switchkinsInit(); their identity type comes from kins_util.c, which gets them the coordinates= parameter, and a bad motion.switchkins-type is refused instead of stranding the module. Pin names are unchanged except millturn's unused in/out template pins. The four sim configs give the same positions through the same MDI sequence as before, in every kinematics type. Commit: ee76b1bdc1b66204ae0b8f96dcc8426010539234 https://github.com/LinuxCNC/linuxcnc/commit/ee76b1bdc1b66204ae0b8f96dcc8426010539234 Author: Luca Toniolo <107...@us...> Date: 2026-10-06 (Tue, 06 Oct 2026) Changed paths: M src/emc/kinematics/5axiskins.c M src/emc/kinematics/genhexkins.c M src/emc/kinematics/genserkins.c M src/emc/kinematics/pumakins.c M src/emc/kinematics/scarakins.c M src/emc/kinematics/switchkins.c M src/emc/kinematics/three21kins.c M src/emc/kinematics/xyzac-trt-kins.c M src/emc/kinematics/xyzbc-trt-kins.c Log Message: ----------- kins: include switchkins.h as an exported header The kinematics modules are users of switchkins, not part of it, so they take the header the way any other user would. switchkins.c and switchkins_main.c keep the quoted form, being the source itself. Commit: b4b19d7b91a8e5e2c933c7719294aff91e97012d https://github.com/LinuxCNC/linuxcnc/commit/b4b19d7b91a8e5e2c933c7719294aff91e97012d Author: Luca Toniolo <107...@us...> Date: 2026-10-06 (Tue, 06 Oct 2026) Changed paths: M docs/src/hal/components.adoc M docs/src/motion/switchkins.adoc M src/Makefile M src/emc/kinematics/kins_util.c A src/emc/kinematics/switchkins_core.c A src/hal/components/switchkinscomp.comp A tests/kins-switchkins-core/README A tests/kins-switchkins-core/checkresult A tests/kins-switchkins-core/sim.hal A tests/kins-switchkins-core/test-ui.py A tests/kins-switchkins-core/test.ini A tests/kins-switchkins-core/test.sh A tests/kins-switchkins-core/tool.tbl Log Message: ----------- switchkins: a core module and a template for out-of-tree kinematics An out-of-tree module could not reach the switchkins implementation, so it reimplemented kinematicsSwitch() and the kinstype.is-N pins or did without. A realtime module cannot link a library, and including the implementation as source puts C files and an extra include path in every module build. switchkins_core is the implementation as a module of its own: switchkins.c and kins_util.c with no kinematics types. switchkins.c already exports its interface, since motion reaches the kinematics entry points in another module; kins_util.c now exports the identity kinematics and helpers kinematics.h declares. A module loaded after switchkins_core includes <switchkins.h>, registers its types and calls switchkinsInit() from EXTRA_SETUP(); motion finds the kinematics entry points in switchkins_core. The in-tree modules keep linking the objects, so their configs are unchanged. switchkinscomp.comp is the template, built in tree like any other component. tests/kins-switchkins-core loads it behind switchkins_core, homes, moves in both of its types, switches between them and has a type it does not provide refused. Renamed and built with halcompile out of tree it loads the same way. Commit: cdbf2339d966ac94be3c92ae654e69404d9b4aff https://github.com/LinuxCNC/linuxcnc/commit/cdbf2339d966ac94be3c92ae654e69404d9b4aff Author: Luca Toniolo <107...@us...> Date: 2026-10-06 (Tue, 06 Oct 2026) Changed paths: M src/emc/sai/saicanon.cc Log Message: ----------- saicanon: report a kinematics switch through the canon macro saicanon.cc printed SELECT_KINS_TYPE with a raw printf, beside the canon output on stdout. saicanon exists to echo the canonical commands, so it now reports through the same macro as the rest of the file, with a line number and the argument. Commit: 85f75dfde4314e83d695a8522f6136de8e9e35a4 https://github.com/LinuxCNC/linuxcnc/commit/85f75dfde4314e83d695a8522f6136de8e9e35a4 Author: Luca Toniolo <107...@us...> Date: 2026-10-11 (Sun, 11 Oct 2026) Changed paths: M docs/src/hal/components.adoc M docs/src/motion/switchkins.adoc M src/Makefile M src/emc/kinematics/5axiskins.c M src/emc/kinematics/genhexkins.c M src/emc/kinematics/genserkins.c M src/emc/kinematics/kins_util.c M src/emc/kinematics/pumakins.c M src/emc/kinematics/scarakins.c M src/emc/kinematics/switchkins.c M src/emc/kinematics/switchkins.h A src/emc/kinematics/switchkins_core.c A src/emc/kinematics/switchkins_main.c M src/emc/kinematics/three21kins.c M src/emc/kinematics/xyzac-trt-kins.c M src/emc/kinematics/xyzbc-trt-kins.c M src/emc/sai/saicanon.cc M src/hal/components/Submakefile M src/hal/components/millturn.comp A src/hal/components/switchkinscomp.comp M src/hal/components/xyzab_tdr_kins.comp M src/hal/components/xyzacb_trsrn.comp M src/hal/components/xyzbca_trsrn.comp A tests/kins-switchkins-core/README A tests/kins-switchkins-core/checkresult A tests/kins-switchkins-core/sim.hal A tests/kins-switchkins-core/test-ui.py A tests/kins-switchkins-core/test.ini A tests/kins-switchkins-core/test.sh A tests/kins-switchkins-core/tool.tbl Log Message: ----------- Merge pull request #4595 from grandixximo/switchkins-unify switchkins: one dispatch for kinematics modules, halcompile components and out-of-tree modules Compare: https://github.com/LinuxCNC/linuxcnc/compare/d6372e66e541...85f75dfde431 To unsubscribe from these emails, change your notification settings at https://github.com/LinuxCNC/linuxcnc/settings/notifications |