added lap timer in traing- and racemode

This commit is contained in:
2018-12-27 20:50:30 +01:00
parent 954ed988ab
commit 7d98499fc8
5 changed files with 373 additions and 104 deletions

View File

@@ -181,6 +181,10 @@ void WindowRace::ReturnPress() {
}
void WindowRace::prepareNextRace() {
this->ui->lDeaLaps->setText("0");
this->ui->lShellLaps->setText("0");
this->firstTimeShell = true;
this->firstTimeDea = true;
@@ -475,11 +479,16 @@ void WindowRace::shellSlot(int time, int sector) {
}
}
}
// count valid laps
int validLaps = 0;
for (auto vec : VecShell) {
if (vec.size() == 3) {
validLaps += 1;
}
}
this->ui->lShellLaps->setText(QString::number(validLaps));
break;
}
if (sector == 3) {
}
ui->lWShellTime->scrollToBottom();
}
@@ -582,6 +591,14 @@ void WindowRace::deaSlot(int time, int sector) {
this->db->setData(statement.toStdString());
ui->lWDeaTime->scrollToBottom();
}
// count valid laps
int validLaps = 0;
for (auto vec : VecDea) {
if (vec.size() == 3) {
validLaps += 1;
}
}
this->ui->lDeaLaps->setText(QString::number(validLaps));
break;
}
}