-
Notifications
You must be signed in to change notification settings - Fork 3
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
Suggestions #3
Comments
|
I've spotted a couple more suggestions:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
First off, I would like to say thanks for the hard work and effort you've put into the library.
Before moving on I would like to say that I'm not bashing your code in any way, had you not carried out the work you did I would not be able to control my Wiz lights as I would have found it hard to translate the Python and Java code, whereas you have managed to, which I consider an achievement within itself.
I'm just reviewing it and I have some suggestions:
BulbMethod
has a flag for methods that are inbound only, but has no flat to indicate outbound methods, I personally think the class should be split up so that inbound methods and outbound methods are defined intoInboundBulbMethod
andOutboundBulbMethod
or something of that nature.BulbCommand
mixes both transformation and domain concerns, the properties should be split from the transformation methods into a separate class to reduce the complexity of the code.PhysicalAddress
ScanForBulbs
method along with various other concerns, again to reduce the complexity of the code.DefaultPort
and then the code setting the value of it to a variableint port = DefaultPort;
seems pointless to me, you could have just made reference to the const.I haven't finished going through everything yet, I only started doing so as I was having serious performance issues when trying to control 10 lights every 10ms, and I was trying to track down where they might be. I will add more suggestions as I work through the code and report back here.
Once again, a huge thanks for your efforts 👍
The text was updated successfully, but these errors were encountered: