Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
1ee5a059ac
4 changed files with 10 additions and 5 deletions
|
@ -105,6 +105,7 @@ public:
|
||||||
ExtensionBatteryNotFine, /*!< The battery level of one or more extension is critical or unknown */
|
ExtensionBatteryNotFine, /*!< The battery level of one or more extension is critical or unknown */
|
||||||
ClimberIsNotReady /*!< The startpad of the timer is not triggered */
|
ClimberIsNotReady /*!< The startpad of the timer is not triggered */
|
||||||
};
|
};
|
||||||
|
Q_ENUM(ReadyState)
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/*!
|
/*!
|
||||||
|
|
|
@ -157,9 +157,6 @@ void ScStwRemoteRace::refreshDetails(QVariantMap details) {
|
||||||
|
|
||||||
qDebug() << "RACE DETAILS: " << details;
|
qDebug() << "RACE DETAILS: " << details;
|
||||||
|
|
||||||
// state
|
|
||||||
this->setState(ScStwRace::RaceState(details["state"].toInt()));
|
|
||||||
|
|
||||||
// competition mode
|
// competition mode
|
||||||
if(this->competitionMode != details["competitionMode"].toBool()) {
|
if(this->competitionMode != details["competitionMode"].toBool()) {
|
||||||
this->competitionMode = details["competitionMode"].toBool();
|
this->competitionMode = details["competitionMode"].toBool();
|
||||||
|
@ -182,6 +179,9 @@ void ScStwRemoteRace::refreshDetails(QVariantMap details) {
|
||||||
// timers
|
// timers
|
||||||
this->refreshRemoteTimers(details["timers"].toList());
|
this->refreshRemoteTimers(details["timers"].toList());
|
||||||
|
|
||||||
|
// state
|
||||||
|
this->setState(ScStwRace::RaceState(details["state"].toInt()));
|
||||||
|
|
||||||
// isReady
|
// isReady
|
||||||
if(this->state == WAITING) {
|
if(this->state == WAITING) {
|
||||||
this->isReadyForNextState = details["isReadyForNextState"].toBool();
|
this->isReadyForNextState = details["isReadyForNextState"].toBool();
|
||||||
|
@ -212,6 +212,8 @@ void ScStwRemoteRace::rebuildRemoteTimers(QVariantList remoteTimers) {
|
||||||
|
|
||||||
bool ScStwRemoteRace::refreshRemoteTimers(QVariantList remoteTimers) {
|
bool ScStwRemoteRace::refreshRemoteTimers(QVariantList remoteTimers) {
|
||||||
|
|
||||||
|
qDebug() << "REFRESHING TIMERS";
|
||||||
|
|
||||||
if(remoteTimers.length() != this->remoteTimers.length()){
|
if(remoteTimers.length() != this->remoteTimers.length()){
|
||||||
// local timers are out of sync
|
// local timers are out of sync
|
||||||
this->rebuildRemoteTimers(remoteTimers);
|
this->rebuildRemoteTimers(remoteTimers);
|
||||||
|
@ -242,6 +244,8 @@ bool ScStwRemoteRace::refreshRemoteTimers(QVariantList remoteTimers) {
|
||||||
this->remoteTimers[currId]->setState(newState);
|
this->remoteTimers[currId]->setState(newState);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
emit this->timersChanged();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -262,7 +262,7 @@ QString ScStwTimer::getText() {
|
||||||
newText = "cancelled";
|
newText = "cancelled";
|
||||||
break;
|
break;
|
||||||
case ScStwTimer::INCIDENT:
|
case ScStwTimer::INCIDENT:
|
||||||
newText = "Technical\nincident!";
|
newText = "Technical incident!";
|
||||||
break;
|
break;
|
||||||
case ScStwTimer::DISABLED:
|
case ScStwTimer::DISABLED:
|
||||||
newText = "---";
|
newText = "---";
|
||||||
|
|
Reference in a new issue