Do not emit stateChanged when receiving discover (too verbose).

This commit is contained in:
Andrius Štikonas 2015-04-02 22:56:57 +01:00
parent be34c3d5da
commit df5cc31355
3 changed files with 3 additions and 8 deletions

View File

@ -119,7 +119,7 @@ void ConsoleReader::listSockets()
std::cout << "a - add unpaired socket (WiFi needed)\n";
std::cout << "A - add unpaired socket (no WiFi needed)\n";
std::cout << "d - update table data\n";
std::cout << "D - print internal socket date and time\n";
std::cout << "D - resend discovery packet to the current socket\n";
std::cout << "n - change socket name (max 16 characters)\n";
std::cout << "p - toggle power state\n";
std::cout << "P - change remote password (max 12 characters)\nq - quit\ns - pick another socket (default is 1)\nt - change timezone" << std::endl;

View File

@ -215,10 +215,6 @@ bool Socket::parseReply ( QByteArray reply )
socketDateTime.setDate(QDate(1900, 01, 01)); // midnight 1900-01-01
socketDateTime.setTime(QTime(0, 0, 0));
socketDateTime = socketDateTime.addSecs(time);
if ( !initializing )
{
Q_EMIT stateChanged();
}
}
case Subscribe:
case PowerOff:
@ -279,11 +275,10 @@ bool Socket::parseReply ( QByteArray reply )
++index;
countdown = reply.mid ( index, 2 );
Q_EMIT stateChanged();
initializing = false;
break;
}
case TimingData:
std::cout << reply.toHex().toStdString() << " " << datagram << std::endl; // for debugging purposes only
// std::cout << reply.toHex().toStdString() << " " << datagram << std::endl; // for debugging purposes only
break;
case WriteSocketData:
sendDatagram ( SocketData );

View File

@ -91,7 +91,7 @@ private:
QUdpSocket *udpSocket;
QTimer *subscribeTimer;
bool subscribed, initializing = true;
bool subscribed;
QQueue<Datagram> commands;
};