这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@merdok
Copy link

@merdok merdok commented Nov 13, 2016

Added status getter.
I think a status getter is needed to tell if the TV is turned on or off.

Added status getter
@hobbyquaker
Copy link
Owner

still thinking if we really need this - I would suggest to use the connect and close events to keep track on the connection status. Example:

var lgtv = require("lgtv2")();
var tvConnected;
lgtv.on('close', function () {
    tvConnected = false;
});
lgtv.on('connect', function () {
    tvConnected = true;
});

@merdok
Copy link
Author

merdok commented Dec 2, 2016

That is true, the events could be also used for keeping track of the connection status, but i was thinking that it would be better to use the internal connection property since it is already anyway there and has the needed information to tell the current tv status.

@hobbyquaker hobbyquaker merged commit bdbc3fe into hobbyquaker:master Aug 3, 2017
@merdok merdok deleted the patch-1 branch August 6, 2017 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants