-
Notifications
You must be signed in to change notification settings - Fork 4
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
Light up buttons #25
Light up buttons #25
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #25 +/- ##
==========================================
- Coverage 46.09% 41.82% -4.27%
==========================================
Files 12 12
Lines 640 722 +82
==========================================
+ Hits 295 302 +7
- Misses 345 420 +75 ☔ View full report in Codecov by Sentry. |
e4af8da
to
6debc1b
Compare
@@ -197,6 +197,7 @@ def save(knob_binds: List[KnobBind], button_binds: List[ButtonBind]) -> None: | |||
# TODO Get actions directly from app-model when it's supported. | |||
state_manager.actions, | |||
save, | |||
state_manager._connected_controller, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe remove the _
prefix from the _connected_controller
in ConnectedController
since it's used outside now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you elaborate on this comment? I don't quite get what should I change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in
ConnectedController
Sorry, I meant StateManager
instead of ConnectedController
in my previous message.
_connected_controller
has a leading _
, which indicates that it should only be accessed inside StateManager
. It's not the case anymore, so I suggests renaming it (simply by removing the _
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two more occurrences of _connected_controller
in the code in case you didn't notice them. They don't fail tests because they aren't tested yet. @Jokilos
Co-authored-by: Łukasz Smoliński <[email protected]>
butons_mutex : QMutex | ||
Mutex for worker threads. | ||
flashing_buttons : set[int] | ||
Set of the button ids, that are currently flashing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
slightly ungrammatical, maybe "Set with ids of buttons that are currently flashing"?
light_up_button.clicked.connect(lambda: self._light_up_button(button_id)) | ||
|
||
sizes = [2, 2, 6, 10] | ||
elems = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe do elems = [ (2, button_label), ...]
and later for elem, size in elems
…i-app-controller into light-up-buttons
Allows user to light up the elements of the controller, when setting the binds.