fix not termintated thread in windowrace + added preparation for highlighting absolute best times

This commit is contained in:
2017-09-12 13:48:10 +02:00
parent 032e354152
commit 5255b40e78
6 changed files with 62 additions and 23 deletions

View File

@@ -80,17 +80,8 @@ void Training::ResetDea(){
this->firstTimeDea = true;
}
void Training::Reset(){
this->VecShell.clear();
this->VecDea.clear();
// this->ui->lWDeaTime->clear();
// this->ui->lWShellTime->clear();
this->ui->lBestZeitDea->setText("");
this->ui->lBestZeitShell->setText("");
this->ui->lCurRoundTimeShell->setText("");
this->ui->lCurRoundDea->setText("");
this->firstTimeShell = true;
this->firstTimeDea = true;
this->ResetDea();
this->ResetShell();
}
void Training::prepareNextRace(){
this->firstTimeShell = true;
@@ -110,11 +101,12 @@ void Training::prepareNextRace(){
}
void Training::shellSlot(int time, int sector){
// cout << "Shell slot" << endl;
// slot is called when a sector is finished
// time is given in ms
// counting of sector beginns at 1
cout << "received Shelltime: " << time << sector << endl;
if(started && !paused && !this->finished){
if(firstTimeShell){
firstTimeShell = false;
@@ -177,6 +169,10 @@ void Training::deaSlot(int time, int sector){
// slot is called when a sector is finished
// time is given in ms
// counting of sector beginns at 1
cout << "received Deatime: " << time << sector << endl;
if(started && !paused && !this->finished){
if(firstTimeDea){
firstTimeDea = false;