diff options
author | lonkaars <loek@pipeframe.xyz> | 2022-10-30 11:20:43 +0100 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2022-10-30 11:21:00 +0100 |
commit | e4f41ef8b56b76214d05bce34ffd5a8896da24c9 (patch) | |
tree | efe55c9ef28e4c787e10a5b85319b242c7525e9a /client/Client.cpp | |
parent | e473fe14614401342cdc3afe3f6deee4831e6e24 (diff) | |
parent | af008eb04e3a5705eec63839abc5791454e763ce (diff) |
finish second merge
Diffstat (limited to 'client/Client.cpp')
-rw-r--r-- | client/Client.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/client/Client.cpp b/client/Client.cpp index 46952b6..10d288e 100644 --- a/client/Client.cpp +++ b/client/Client.cpp @@ -1,5 +1,5 @@ #include "Client.h" - +#include "consts.h" Client::Client(QObject *parent) : QObject(parent) @@ -17,8 +17,6 @@ Client::~Client() void Client::ClientEcho() { - QTime time1 = QTime::currentTime(); - NextMinute = time1.minute()+1; connect(timer, SIGNAL(timeout()),this,SLOT(timeFunction())); // connect timer to time every minute @@ -45,13 +43,11 @@ void Client::timeFunction() QByteArray msgToSend= (msg.toUtf8() + totalRecords + offsetRecords +'\n'); QTime time = QTime::currentTime(); - qint16 currentMinute = time.minute(); + qint16 currentSeconds = time.second(); + if((currentSeconds % WS_CLIENT_STATION_POLL_INTERVAL) == 1){ - if(currentMinute==NextMinute){ socket->connectToHost(networkAddress, tcpPortAddress); - socket->write(msgToSend); - NextMinute++; } } |