-
Notifications
You must be signed in to change notification settings - Fork 426
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
Refactor receiver module #2350
Comments
This is a good idea, but the code is fragile and access to some of the hardware is not possible. A testing methodology will be needed before this is done, with test paths derived from the current code. For example, the current code will have to be examined to see what assumptions it makes about 27MHz receivers and a test devised to ensure that the expected responses produce the same result in the changed code. |
Provide default implementation and Bolt overrides it. This removes the need for if else of receiver_kind. Related pwr-Solaar#2350
Provide default implementation and Bolt overrides it. This removes the need for if else of receiver_kind. Related pwr-Solaar#2350
Introduce Protocol and pass instance of Hidpp10 at instantiation of a Receiver. This simplifies testing and helps to decouple device from hidpp10. Related pwr-Solaar#2350
Introduce Protocol and pass instance of Hidpp10 at instantiation of a Receiver. This simplifies testing and helps to decouple device from hidpp10. Related pwr-Solaar#2350
Provide default implementation and Bolt overrides it. This removes the need for if else of receiver_kind. Related pwr-Solaar#2350
Introduce Protocol and pass instance of Hidpp10 at instantiation of a Receiver. This simplifies testing and helps to decouple device from hidpp10. Related pwr-Solaar#2350
Information
Describe the solution you'd like
The Receiver class contains many branches based on the receiver_kind. There's the opportunity to split that with subclasses, which implement specific devices like BoltReceiver, UnifyingReceiver etc. and use the factory pattern to instantiate a proper device.
The text was updated successfully, but these errors were encountered: