Merge remote-tracking branch 'origin/master'

This commit is contained in:
Dorian Zedler 2020-10-05 22:21:54 +02:00
commit 1ee5a059ac
Signed by: dorian
GPG key ID: D3B255CB8BC7CD37
4 changed files with 10 additions and 5 deletions

View file

@ -105,6 +105,7 @@ public:
ExtensionBatteryNotFine, /*!< The battery level of one or more extension is critical or unknown */
ClimberIsNotReady /*!< The startpad of the timer is not triggered */
};
Q_ENUM(ReadyState)
protected:
/*!

View file

@ -157,9 +157,6 @@ void ScStwRemoteRace::refreshDetails(QVariantMap details) {
qDebug() << "RACE DETAILS: " << details;
// state
this->setState(ScStwRace::RaceState(details["state"].toInt()));
// competition mode
if(this->competitionMode != details["competitionMode"].toBool()) {
this->competitionMode = details["competitionMode"].toBool();
@ -182,6 +179,9 @@ void ScStwRemoteRace::refreshDetails(QVariantMap details) {
// timers
this->refreshRemoteTimers(details["timers"].toList());
// state
this->setState(ScStwRace::RaceState(details["state"].toInt()));
// isReady
if(this->state == WAITING) {
this->isReadyForNextState = details["isReadyForNextState"].toBool();
@ -212,6 +212,8 @@ void ScStwRemoteRace::rebuildRemoteTimers(QVariantList remoteTimers) {
bool ScStwRemoteRace::refreshRemoteTimers(QVariantList remoteTimers) {
qDebug() << "REFRESHING TIMERS";
if(remoteTimers.length() != this->remoteTimers.length()){
// local timers are out of sync
this->rebuildRemoteTimers(remoteTimers);
@ -242,6 +244,8 @@ bool ScStwRemoteRace::refreshRemoteTimers(QVariantList remoteTimers) {
this->remoteTimers[currId]->setState(newState);
}
emit this->timersChanged();
return true;
}

View file

@ -262,7 +262,7 @@ QString ScStwTimer::getText() {
newText = "cancelled";
break;
case ScStwTimer::INCIDENT:
newText = "Technical\nincident!";
newText = "Technical incident!";
break;
case ScStwTimer::DISABLED:
newText = "---";