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

Add configuration option to disable spoolman integration #61

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

adec
Copy link

@adec adec commented Mar 21, 2024

New printer configuration option "disable_spoolman" has been added to allow the spoolman integration to be disabled on a per-printer basis. Setting this option to true only disables the guppyscreen integration with spoolman and does not affect Moonraker. This is useful if incompatibility with a particular spoolman version prevents guppyscreen from initialising (such as issue #49).

@georgiy364
Copy link

Hello!

Can you please help and explain how to install it? You're gonna be a big help to me
I deleted previous Guppy and installed your using this code
sh -c "$(wget --no-check-certificate -qO - https://raw.githubusercontent.com/ballaswag/guppyscreen/e4fdf4e6224de7896c8fc96ef5b7b9640f322533/installer.sh)"
Is that right? And my screen is still not working. Is there anything else I need to do?

@adec
Copy link
Author

adec commented Mar 23, 2024

Hi @georgiy364,

Unfortunately the installation script will just pull down and install the latest release version not the version with this fix. Let me see if I can make the compiled version of the guppyscreen binary that you can install over the release version.

Just double-checking, are you using spoolman? If so, you may be able to resolve the issue by making sure that all your filament entries in spool man have the vendor, material type, etc filled in.

I'm working on a proper fix for the issue (this was pull request was really to buy some time to fix things properly).

@georgiy364
Copy link

Thank you a lot!

Yes, the issue was with the spoolman and your advice works perfectly! Appreciate

auto v = conf->get_json(conf->df() + "disable_spoolman");
auto disable_spoolman = false;
if (!v.is_null()) {
if (v.template get<bool>()) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be disable_spoolman = v.template get<bool>() because even if he attribute exists, it can be either true/false.

}
Config *conf = Config::get_instance();
auto v = conf->get_json(conf->df() + "disable_spoolman");
auto disable_spoolman = false;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 74 to 79 can be replaced with auto disable_spoolman = !v.is_null() && v.template get<bool>();

Copy link
Author

@adec adec Apr 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much better than my code… which is why I should stick to architecture (boxes and fluffy clouds). 🤣 I'll update my pull request.

@ballaswag
Copy link
Owner

PR looks good overall. Even though you figured out the underlying issue relating to not checking for optional fields, it's nice to have the ability to disable spoolman completely.

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.

3 participants