From 7e91a89caf0408eeb18f34da9ce16f5c87844431 Mon Sep 17 00:00:00 2001 From: Dorian Zedler Date: Mon, 28 Dec 2020 16:17:38 +0100 Subject: [PATCH 1/3] - bugfixes --- ScStwLibraries/sources/scstwrace.cpp | 1 + ScStwLibraries/sources/scstwtimer.cpp | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ScStwLibraries/sources/scstwrace.cpp b/ScStwLibraries/sources/scstwrace.cpp index 1c6d548..77448b5 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 0744a66..ba4636e 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) { From 6037d29c4c74e1b5f349d2fd76e0a0c29100f87c Mon Sep 17 00:00:00 2001 From: Dorian Zedler Date: Sat, 2 Jan 2021 19:03:56 +0100 Subject: [PATCH 2/3] - add error to indicate invalid format of firmware update --- ScStwLibraries/headers/ScStw.hpp | 1 + 1 file changed, 1 insertion(+) 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) From 39850455da76100e5f8e7a396b105da2cffb5ceb Mon Sep 17 00:00:00 2001 From: Dorian Zedler Date: Tue, 5 Jan 2021 20:12:47 +0100 Subject: [PATCH 3/3] dont connect if already connecting --- ScStwLibraries/sources/client/scstwclient.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ScStwLibraries/sources/client/scstwclient.cpp b/ScStwLibraries/sources/client/scstwclient.cpp index cf12a27..163356e 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