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

[Bug]: Torch does not turn off #204

Open
JumpmanJunior opened this issue Nov 23, 2022 · 4 comments
Open

[Bug]: Torch does not turn off #204

JumpmanJunior opened this issue Nov 23, 2022 · 4 comments
Labels
potential bug Bug reported but yet to be analysed
Milestone

Comments

@JumpmanJunior
Copy link

Description of the bug

I want to use only torch mode. The LEDs turn on if I e.g. press the torch button or if I configure it to turn on automatically when viewing the webcam. But they do not turn off after the configured time frame or after pressing the button again if enabled toggle. They do turn off if I e.g. save the settings or do this via the Utilities page.

Steps to reproduce

  1. Enable torch mode and configure that it lasts for e.g. 5 seconds
  2. Save settings. LEDs are off.
  3. Press torch button at the top. LEDs turn on.
  4. Wait for 5 seconds. LEDs stay on.

What happened instead?

LEDs stay on.

Plugin version

0.8.1

OctoPrint version

1.8.6

(if relevant) OctoPi version

0.18.0

Log Files & Screenshots

No response

Anything else?

No response

@github-actions github-actions bot added the potential bug Bug reported but yet to be analysed label Nov 23, 2022
@cp2004
Copy link
Owner

cp2004 commented Nov 26, 2022

Log Files & Screenshots

No response

Please enable debug logging, and then upload the plugin_ws281x_led_status_debug.log file after you have reproduced the issue.

@JumpmanJunior
Copy link
Author

debug.log

You can see in the log that I first try it with a timeout of 4 seconds and then with enabled toggle. In both cases the torch does not turn off. When I press the torch button to disable it nothing gets logged.

@cp2004
Copy link
Owner

cp2004 commented Nov 29, 2022

This is likely a bug that has been triggered by all the other effects being disabled. The way the plugin turns the torch off is by replacing it with whatever effect was running previously. Here that gets blocked because everything is disabled.

As a workaround, you could try enabling the startup effect, set it to solid colour black (so it's like it's off) and then if I understand correctly the torch will work as intended.

This part of the code is quite fragile as there are loads of different conditions to work through, at some point I plan to rewrite how it works but it won't be for a while - hopefully the workaround works as I won't be able to fix the issue at the moment.

@kevinvalk
Copy link

For the workaround to work, I had to reboot the raspberry when settings the off color on startup effect before the torch worked correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
potential bug Bug reported but yet to be analysed
Projects
None yet
Development

No branches or pull requests

3 participants