diff --git a/ScStwLibraries/headers/ScStw.hpp b/ScStwLibraries/headers/ScStw.hpp index 92a9bbf..a48fe03 100644 --- a/ScStwLibraries/headers/ScStw.hpp +++ b/ScStwLibraries/headers/ScStw.hpp @@ -133,6 +133,7 @@ public: InternalErrorTimerOperationFailed = 951, ApiVersionNotSupportedError = 952, CompetitionModeProhibitsThisError = 953, + FirmwareUpdateFormatInvalidError = 954, TimersNotReadyError = 501 /*!< One or more timer is not ready */ }; Q_ENUM(ScStw::StatusCode) diff --git a/ScStwLibraries/sources/client/scstwclient.cpp b/ScStwLibraries/sources/client/scstwclient.cpp index 6fb5d94..c705b46 100644 --- a/ScStwLibraries/sources/client/scstwclient.cpp +++ b/ScStwLibraries/sources/client/scstwclient.cpp @@ -50,6 +50,9 @@ ScStwClient::ScStwClient(QObject * parent, QList signalSubscri void ScStwClient::connectToHost() { + if(this->state != DISCONNECTED) + return; + setState(CONNECTING); //connect diff --git a/ScStwLibraries/sources/scstwrace.cpp b/ScStwLibraries/sources/scstwrace.cpp index 3e7e8e7..29aa769 100644 --- a/ScStwLibraries/sources/scstwrace.cpp +++ b/ScStwLibraries/sources/scstwrace.cpp @@ -269,6 +269,7 @@ bool ScStwRace::playSoundsAndStartTimers() { } else { this->startDelayTimer->stop(); + this->startDelayTimer->setInterval(minimumReadyDelay); this->startDelayTimer->start(); timerTriggered = true; } diff --git a/ScStwLibraries/sources/scstwtimer.cpp b/ScStwLibraries/sources/scstwtimer.cpp index f103875..b504007 100644 --- a/ScStwLibraries/sources/scstwtimer.cpp +++ b/ScStwLibraries/sources/scstwtimer.cpp @@ -280,11 +280,16 @@ QString ScStwTimer::getText() { } void ScStwTimer::setDisabled(bool disabled) { + if(this->isDisabled() == disabled) + return; + if(disabled) this->setState(DISABLED); - else { + else this->setState(IDLE); - } + + emit this->readyStateChanged(this->getReadyState()); + } void ScStwTimer::setWantsToBeDisabled(bool wantsToBeDisabled) {