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

support multiple machine-specific configurations ("profiles") #57

Merged
merged 1 commit into from
Mar 6, 2024

Conversation

scgtrp
Copy link
Contributor

@scgtrp scgtrp commented Feb 28, 2024

This makes Candle2 usable for driving multiple machines from the same computer, by making separate copies of the entire config file per machine.

By default, nothing will change; the file format is unchanged, and the current configuration is treated as a default profile. If multiple profiles are present at startup, the user is prompted to select one. If the environment variable $CANDLE_PROFILE is present and non-empty, that profile is used without prompting.

Profiles are stored in the app config directory, as urlencode(profilename) + ".ini". (URL-encoding the names allows profiles to be named without regard for the platform's file naming rules.)

There is currently no UI for managing profiles; they may be created by manually copying settings.ini to a new file in the same directory, or by setting $CANDLE_PROFILE to a profile that does not yet exist (it will be created with default settings).

@scgtrp
Copy link
Contributor Author

scgtrp commented Feb 28, 2024

My use case here is that I have two GRBL machines now, a laser engraver and a CNC router, and I wanted different user command buttons for each.

I'm not opposed to adding a UI for this; I didn't in this PR because (1) I wanted to make sure you're okay with this before I go expanding on it, and (2) UI design is hard and I don't feel like doing it tonight. :)

This makes Candle2 usable for driving multiple machines from the same computer, by making separate copies of the entire config file per machine.

By default, nothing will change; the file format is unchanged, and the current configuration is treated as a default profile. If multiple profiles are present at startup, the user is prompted to select one. If the environment variable $CANDLE_PROFILE is present and non-empty, that profile is used without prompting.

Profiles are stored in the app config directory, as urlencode(profilename) + ".ini". (URL-encoding the names allows profiles to be named without regard for the platform's file naming rules.)

There is currently no UI for managing profiles; they may be created by manually copying `settings.ini` to a new file in the same directory, or by setting $CANDLE_PROFILE to a profile that does not yet exist (it will be created with default settings).
@Schildkroet Schildkroet self-assigned this Feb 29, 2024
@Schildkroet Schildkroet added the enhancement New feature or request label Feb 29, 2024
@Schildkroet Schildkroet merged commit 26e745e into Schildkroet:master Mar 6, 2024
1 check passed
@Schildkroet
Copy link
Owner

Thx for the contribution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants