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