-
Notifications
You must be signed in to change notification settings - Fork 397
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
🐛 | GenericMultiTimerClass broken #2386
Comments
Also see typos in the same file: |
Ah sorry, yes, I did not thoroughly look through other issues nor the state on development. So no, I just used this functionality on top of |
I wanted to come back to this again. Thank you for the detailed review initially! Thank you for the detailed review! You've identified two significant issues:
I disagree with your assessment about |
* feat: Add Idle Shutdown Timer support This adds an optional idle shutdown timer which can be enabled via timers.idle_shutdown.timeout_sec in the jukebox.yaml config. The system will shut down after the given number of seconds if no activity has been detected during that time. Activity is defined as: - music playing - active SSH sessions - changes in configs or audio content. Fixes: #1970 * refactor: Break down IdleTimer into 2 standard GenericMultiTimerClass and GenericEndlessTimerClass timers * feat: Introducing new Timer UI, including Idle Shutdown * refactor: Abstract into functions * Adding Sleep timer / not functional * Finalize Volume Fadeout Shutdown timer * Fix flake8 * Fix more flake8s * Fix small bugs * Improve multitimer.py suggested by #2386 * Fix flake8 --------- Co-authored-by: pabera <[email protected]>
Version
3.5.3
Branch
future3/main
OS
Ubuntu 22.04
Pi model
Laptop
Hardware
No response
What happened?
https://github.com/MiczFlor/RPi-Jukebox-RFID/blob/future3/main/src/jukebox/jukebox/multitimer.py#L249
self._function = self._callee(*self.class_args, iterations=self._iterations, **self.class_kwargs)
Instead of modifying the function call, so that later
self._function
can be called, here the function is already executed. In my case the return value isNone
, so later theMultiTimer
tries to call none, and the program dies.GenericMultiTimerClass tries to pass on the paramter
iterations
andMultiTimer
tries to pass on parameteriteration
so this clashes.Should those two classes be interchangeable or not? I don't get the value of GenericMultiTimerClass because you can build just the same thing by simply using the
MultiTimer
so my cleanest suggestion is: Delete the GenericMultiTimerClass.If you want to keep it, here's a fix that worked for me, on first shallow testing:
FixGenericMultiTimerClass.patch.txt
Logs
No response
Configuration
No response
More info
No response
The text was updated successfully, but these errors were encountered: