Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subroutine unify and move to nc files #100

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

dpslwk
Copy link
Contributor

@dpslwk dpslwk commented Nov 30, 2023

Subroutine unify and move to nc files

The main aim of this PR is to remove the 4 duplicate copies of subroutines that exist in the PB source.

In order to do this the subroutines will be move from under the machine config folder and placed in a new probe_basic folder under nc_files. While doing this move the routines have also been split into 4 sub directories, subroutines, probe, atc, lathe.

All INI files have updated [RS274NGC]SUBROUTINE_PATH's to load the new directories.

Layout before

├── configs
│   ├── atc_sim
│   │   ├── macros_sim_inch
│   │   ├── macros_sim_metric
│   │   ├── python
│   │   └── vismach_parts
│   ├── probe_basic
│   │   ├── hallib
│   │   ├── python
│   │   ├── subroutines
│   │   └── user_tabs
│   │       ├── template_main
│   │       └── template_sidebar
│   └── probe_basic_lathe
│       ├── hallib
│       ├── python
│       └── subroutines

Layout after

├── linuxcnc
│   ├── configs
│   │   ├── probe_basic_atc_sim
│   │   │   ├── python
│   │   │   └── vismach_parts
│   │   ├── probe_basic_manual_sim
│   │   │   ├── hallib
│   │   │   ├── python
│   │   │   └── user_tabs
│   │   │       ├── template_main
│   │   │       └── template_sidebar
│   │   └── probe_basic_lathe_sim
│   │       ├── hallib
│   │       └── python
│   └── nc_files
│       └── probe_basic
│           ├── atc_carousel
│           ├── lathe
│           ├── probe
│           └── subroutines

Our current debain install script first copies configs folder to /usr/share/configs then copies its contents (the 3 sim folders) to ~/linuxcnc/configs/

So current users have the as install configs at /usr/share/configs/ and a user copy in ~/linuxcnc/configs/
Base the current config instructions (forum.linuxcnc.org) user are told to copy the subroutines folder from ~/linuxcnc/configs/probe_basic/subroutines/ to there machine config directory ~/linuxcnc/configs/my-machine/subroutines/
At update we overwrite the whole ~/linuxcnc/configs/probe_basic/subroutines/ folder but there own machine copies of subroutines are not changes in anyway. This does mean they do not automaticity get changes to existing routines but also do not get any new routines we add that might be need by a new ui widget.

After this the install script will copy the two folders linuxcnc/configs and linuxcnc/nc_files to /usr/share/probe_basic/
Then the machine configs under /usr/share/probe_basic/configs/ will be copied to ~/linuxcnc/configs/, overwriting all files therein.
Then the subroutines will be copied from /usr/share/probe_basic/nc_files/probe_basic/ to ~/linuxcnc/nc_files/probe_basic/. Now this will only copy over new files that do not already exist. This means that if a user has modified say ~/linuxcnc/nc_files/probe_basic/atc_carousel/m21.ngc there changes will not be lost, but if we add say /usr/share/probe_basic/nc_files/probe_basic/atc_carousel/m222.ngc it would be copied to ~/linuxcnc/nc_files/probe_basic/atc_carousel/m222.ngc
[RS274NGC]SUBROUTINE_PATH is update to point to all 3 (or 4 for lathe) folders.

New users (or new machine config conversions) will no longer need to copy the subroutines folder into there machine configuration. Existing user may chose to keep there current setup or just update there [RS274NGC]SUBROUTINE_PATH to use the new setup

Split folders

subroutines

This folder contains some basic subroutines called from various parts of the UI
It does include the tool_touch_off routine that is used with a tool setter

probe

This folder contains the probing subroutines that are called form the PROBING tab

atc_carousel

This folder contains carousel style ATC subroutines
These routines are all called form the ATC tab in the main UI or as part of M6 remap.
They automatically support any of the of the sizes currently available (8, 10, 12, 14, 16, 18, 20, 21, 24) based on your INI's \[ATC\]POCKETS setting

If you have an ATC these are the files that you most likely will need to adjust to your needs, see the README.md in the directory for more details

lathe

This folder contains lathe subroutines for probe_basic_lathe
Some of these are unique to the lathe UI and some are tweaked versions of routines in the other folders that override there normal behaviour

Post Merge tasks

  • update qtpyvcp-bookworm-installer/install_for_qtpyvcp.sh (I can file a PR )
  • update "Machine Configuration" Docs
  • update "Py3 - Probe Basic Config Conversion Doc Lcnc 2.9+" docs on forum

@dpslwk dpslwk force-pushed the subroutine_unify_and_move_to_nc_files branch 7 times, most recently from 83aee58 to 21067da Compare December 1, 2023 12:58
@dpslwk dpslwk mentioned this pull request Dec 1, 2023
@dpslwk dpslwk force-pushed the subroutine_unify_and_move_to_nc_files branch 8 times, most recently from 0bf0e2c to 70dc909 Compare December 3, 2023 15:51
@dpslwk dpslwk force-pushed the subroutine_unify_and_move_to_nc_files branch from 70dc909 to bdb98a8 Compare December 7, 2023 13:56
atc_sim > probe_basic_atc_sim
probe_basic > probe_basic_manual_sim
probe_basic_lathe > probe_basic_lathe_sim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant