-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[jeelink] Use serial transport #7620
Conversation
Related to openhab#7573 Signed-off-by: Wouter Born <github@maindrain.net>
SerialPortIdentifier portIdentifier = serialPortManager.getIdentifier(port); | ||
if (portIdentifier == null) { | ||
notifyAbort("Port not found: " + port); | ||
return; | ||
} |
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.
Is it possible to move this logic into JeeLinkHandler
's initialize method so you can put the thing offline with a config error? You should be able to pass around the SerialPortIdentifier
instance instead of the SerialPortManager
instance.
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.
After revisiting the code it looks like it is possible. The static method was only used by the handler so that saves another level of passing stuff around. :-)
Signed-off-by: Wouter Born <github@maindrain.net>
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.
LGTM
* [jeelink] Use serial transport Related to openhab#7573 * Pass around SerialPortIdentifier instead of SerialPortManager Signed-off-by: Wouter Born <github@maindrain.net>
* [jeelink] Use serial transport Related to openhab#7573 * Pass around SerialPortIdentifier instead of SerialPortManager Signed-off-by: Wouter Born <github@maindrain.net>
* [jeelink] Use serial transport Related to openhab#7573 * Pass around SerialPortIdentifier instead of SerialPortManager Signed-off-by: Wouter Born <github@maindrain.net> Signed-off-by: CSchlipp <christian@schlipp.de>
* [jeelink] Use serial transport Related to openhab#7573 * Pass around SerialPortIdentifier instead of SerialPortManager Signed-off-by: Wouter Born <github@maindrain.net>
* [jeelink] Use serial transport Related to openhab#7573 * Pass around SerialPortIdentifier instead of SerialPortManager Signed-off-by: Wouter Born <github@maindrain.net>
* [jeelink] Use serial transport Related to openhab#7573 * Pass around SerialPortIdentifier instead of SerialPortManager Signed-off-by: Wouter Born <github@maindrain.net>
* [jeelink] Use serial transport Related to openhab#7573 * Pass around SerialPortIdentifier instead of SerialPortManager Signed-off-by: Wouter Born <github@maindrain.net>
* [jeelink] Use serial transport Related to openhab#7573 * Pass around SerialPortIdentifier instead of SerialPortManager Signed-off-by: Wouter Born <github@maindrain.net> Signed-off-by: Daan Meijer <daan@studioseptember.nl>
* [jeelink] Use serial transport Related to openhab#7573 * Pass around SerialPortIdentifier instead of SerialPortManager Signed-off-by: Wouter Born <github@maindrain.net>
Related to #7573