Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
ce22916e92
4 changed files with 17 additions and 7 deletions
|
@ -87,7 +87,7 @@ Column {
|
||||||
width: parent.width * 0.8
|
width: parent.width * 0.8
|
||||||
height: parent.height * 0.8
|
height: parent.height * 0.8
|
||||||
|
|
||||||
color: ([ScStwTimer.WON].indexOf(control.timers[index]["state"]) >= 0 ? control.colors.success :
|
color: ([ScStwTimer.WON,ScStwTimer.WILDCARD].indexOf(control.timers[index]["state"]) >= 0 ? control.colors.success :
|
||||||
[ScStwTimer.FAILED,ScStwTimer.LOST].indexOf(control.timers[index]["state"]) >= 0 ? control.colors.error:
|
[ScStwTimer.FAILED,ScStwTimer.LOST].indexOf(control.timers[index]["state"]) >= 0 ? control.colors.error:
|
||||||
control.colors.text)
|
control.colors.text)
|
||||||
|
|
||||||
|
|
|
@ -111,6 +111,8 @@ void ScStwRemoteRace::handleClientStateChange() {
|
||||||
this->timers = this->localTimers;
|
this->timers = this->localTimers;
|
||||||
this->localTimers.clear();
|
this->localTimers.clear();
|
||||||
emit this->timersChanged();
|
emit this->timersChanged();
|
||||||
|
emit this->detailsChanged();
|
||||||
|
emit this->currentStartDelayChanged();
|
||||||
this->competitionMode = false;
|
this->competitionMode = false;
|
||||||
this->setState(IDLE);
|
this->setState(IDLE);
|
||||||
break;
|
break;
|
||||||
|
@ -139,7 +141,6 @@ bool ScStwRemoteRace::local() {
|
||||||
* @param data
|
* @param data
|
||||||
*/
|
*/
|
||||||
void ScStwRemoteRace::handleBaseStationSignal(ScStw::SignalKey key, QVariant data) {
|
void ScStwRemoteRace::handleBaseStationSignal(ScStw::SignalKey key, QVariant data) {
|
||||||
//qDebug() << "got signal: " << data;
|
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case ScStw::RaceDetailsChanged:
|
case ScStw::RaceDetailsChanged:
|
||||||
{
|
{
|
||||||
|
@ -154,6 +155,8 @@ void ScStwRemoteRace::handleBaseStationSignal(ScStw::SignalKey key, QVariant dat
|
||||||
void ScStwRemoteRace::refreshDetails(QVariantMap details) {
|
void ScStwRemoteRace::refreshDetails(QVariantMap details) {
|
||||||
// the details of the race have changed:
|
// the details of the race have changed:
|
||||||
|
|
||||||
|
qDebug() << "RACE DETAILS: " << details;
|
||||||
|
|
||||||
// state
|
// state
|
||||||
this->setState(ScStwRace::RaceState(details["state"].toInt()));
|
this->setState(ScStwRace::RaceState(details["state"].toInt()));
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@ void ScStwRemoteTimer::setStopTime(double stopTime) {
|
||||||
|
|
||||||
void ScStwRemoteTimer::setReactionTime(double reactionTime) {
|
void ScStwRemoteTimer::setReactionTime(double reactionTime) {
|
||||||
this->reactionTime = reactionTime;
|
this->reactionTime = reactionTime;
|
||||||
|
emit this->reactionTimeChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScStwRemoteTimer::setLetter(QString newLetter) {
|
void ScStwRemoteTimer::setLetter(QString newLetter) {
|
||||||
|
@ -36,6 +37,6 @@ void ScStwRemoteTimer::setState(TimerState newState){
|
||||||
if(this->state != newState) {
|
if(this->state != newState) {
|
||||||
this->state = newState;
|
this->state = newState;
|
||||||
qDebug() << "+ [INFO][REMOTETIMER] timer state changed: " << newState;
|
qDebug() << "+ [INFO][REMOTETIMER] timer state changed: " << newState;
|
||||||
emit this->stateChanged();
|
emit this->stateChanged(this->state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -237,26 +237,32 @@ QString ScStwTimer::getText() {
|
||||||
case ScStwTimer::STARTING:
|
case ScStwTimer::STARTING:
|
||||||
newTime = 0;
|
newTime = 0;
|
||||||
break;
|
break;
|
||||||
case ScStwTimer::WAITING:
|
|
||||||
newText = "please wait...";
|
|
||||||
break;
|
|
||||||
case ScStwTimer::RUNNING:
|
case ScStwTimer::RUNNING:
|
||||||
newTime = this->getCurrentTime();
|
newTime = this->getCurrentTime();
|
||||||
break;
|
break;
|
||||||
|
case ScStwTimer::WAITING:
|
||||||
|
newText = "please wait...";
|
||||||
|
break;
|
||||||
case ScStwTimer::WON:
|
case ScStwTimer::WON:
|
||||||
newTime = this->getCurrentTime();
|
newTime = this->getCurrentTime();
|
||||||
break;
|
break;
|
||||||
case ScStwTimer::LOST:
|
case ScStwTimer::LOST:
|
||||||
newTime = this->getCurrentTime();
|
newTime = this->getCurrentTime();
|
||||||
break;
|
break;
|
||||||
|
case ScStwTimer::FAILING:
|
||||||
|
newText = "please wait...";
|
||||||
|
break;
|
||||||
case ScStwTimer::FAILED:
|
case ScStwTimer::FAILED:
|
||||||
newText = "false start";
|
newText = "false start";
|
||||||
break;
|
break;
|
||||||
|
case ScStwTimer::WILDCARD:
|
||||||
|
newText = "wildcard";
|
||||||
|
break;
|
||||||
case ScStwTimer::CANCELLED:
|
case ScStwTimer::CANCELLED:
|
||||||
newText = "cancelled";
|
newText = "cancelled";
|
||||||
break;
|
break;
|
||||||
case ScStwTimer::INCIDENT:
|
case ScStwTimer::INCIDENT:
|
||||||
newText = "Technical incident!";
|
newText = "Technical\nincident!";
|
||||||
break;
|
break;
|
||||||
case ScStwTimer::DISABLED:
|
case ScStwTimer::DISABLED:
|
||||||
newText = "---";
|
newText = "---";
|
||||||
|
|
Reference in a new issue