Fix LED's not turning off when program ends
This commit is contained in:
parent
acafd14ec2
commit
02fc46794f
@ -7,13 +7,16 @@ hgx11net::hgx11net(QString host, ushort port)
|
||||
_sock_p = new QTcpSocket(this);
|
||||
_host_m = host;
|
||||
_port_m = port;
|
||||
this->_connectHost();
|
||||
_connectHost();
|
||||
}
|
||||
|
||||
hgx11net::~hgx11net()
|
||||
{
|
||||
clearLeds();
|
||||
if (_sock_p->state() == QAbstractSocket::ConnectedState) {
|
||||
while(_sock_p->waitForBytesWritten()) {}
|
||||
_sock_p->disconnectFromHost();
|
||||
}
|
||||
}
|
||||
|
||||
void hgx11net::clearLeds()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user