Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
eb1328642d
13 changed files with 5 additions and 35 deletions
1
Qt-Secret/src/.gitignore
vendored
Normal file
1
Qt-Secret/src/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/build/
|
1
Qt-Secret/src/build/debug/.gitignore
vendored
1
Qt-Secret/src/build/debug/.gitignore
vendored
|
@ -1 +0,0 @@
|
|||
/libQt-Secret.so.1.2.0
|
|
@ -1 +0,0 @@
|
|||
libQt-Secret.so.1.2.0
|
|
@ -1 +0,0 @@
|
|||
libQt-Secret.so.1.2.0
|
|
@ -1 +0,0 @@
|
|||
libQt-Secret.so.1.2.0
|
|
@ -1 +0,0 @@
|
|||
libQt-Secret.so.1.2.0
|
|
@ -1 +0,0 @@
|
|||
libQt-Secret.so.1.2.0
|
|
@ -1 +0,0 @@
|
|||
libQt-Secret.so.1.2.0
|
Binary file not shown.
|
@ -131,15 +131,7 @@ public slots:
|
|||
*/
|
||||
QVariantMap sendCommand(int header, QJsonValue data = "", int timeout = 3000);
|
||||
|
||||
/*! updater functions */
|
||||
|
||||
/*!
|
||||
* \brief Function to check wether the firmware of the base station is up-to-date
|
||||
* \see getFirmwareVersion()
|
||||
* \see updateFirmware()
|
||||
* \return true or false
|
||||
*/
|
||||
bool isFirmwareUpToDate();
|
||||
/*! helper functions */
|
||||
|
||||
/*!
|
||||
* \brief Function to write a setting on the base station
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>ScStwBasestation.sb64</file>
|
||||
<file>sound/AtYourMarksSound.wav</file>
|
||||
<file>sound/IFSC frequenzy and duration conform false start sound.wav</file>
|
||||
<file>sound/ReadySound.wav</file>
|
||||
|
|
|
@ -106,7 +106,7 @@ bool ScStwClient::init() {
|
|||
this->firmwareVersion = initResponse["data"].toMap()["firmwareVersion"].toString();
|
||||
this->timeOffset = initResponse["data"].toMap()["time"].toDouble() - this->date->currentMSecsSinceEpoch();
|
||||
|
||||
qDebug() << "[INFO][BaseStation] Init done! firmware: version: " << this->firmwareVersion << " up-to-date: " << this->isFirmwareUpToDate() << " time offset: " << this->timeOffset;
|
||||
qDebug() << "[INFO][BaseStation] Init done! firmware: " << this->firmwareVersion << " time offset: " << this->timeOffset;
|
||||
|
||||
this->setState(CONNECTED);
|
||||
return true;
|
||||
|
@ -188,6 +188,8 @@ QVariantMap ScStwClient::sendCommand(int header, QJsonValue data, int timeout, b
|
|||
//wait for an answer to finish (programm gets stuck in here)
|
||||
loop->exec();
|
||||
|
||||
|
||||
|
||||
bool replyFound = false;
|
||||
|
||||
// find reply and delete the request from waiting list
|
||||
|
@ -386,22 +388,6 @@ void ScStwClient::handleSignal(QVariantMap data) {
|
|||
emit this->gotSignal(signalKey, data["data"]);
|
||||
}
|
||||
|
||||
// -------------------------
|
||||
// --- updater functions ---
|
||||
// -------------------------
|
||||
|
||||
bool ScStwClient::isFirmwareUpToDate() {
|
||||
QString file = ":/ScStwBasestation.sb64";
|
||||
QFile f(file);
|
||||
if (!f.open(QFile::ReadOnly)) return false;
|
||||
QString fileContents = f.readAll();
|
||||
|
||||
QString newFirmwareVersion = fileContents.split("<VER>")[1].split("</VER>")[0];
|
||||
QString currentFirmwareVersion = this->firmwareVersion;
|
||||
|
||||
return ScStw::firmwareCompare(newFirmwareVersion, currentFirmwareVersion) <= 0;
|
||||
}
|
||||
|
||||
// ------------------------
|
||||
// --- helper functions ---
|
||||
// ------------------------
|
||||
|
|
Reference in a new issue