bugfix: minimum lap time not checked

This commit is contained in:
2017-12-27 11:20:20 +01:00
parent 2a1a082a30
commit 54294c63d7
3 changed files with 12 additions and 5 deletions

View File

@@ -104,7 +104,10 @@ int QVectorHelper::getMin(const QVector<QVector<int>> x) {
int min;
if (x.size() > 0) {
if (x.at(0).size() >= 3) {
if (getCurTime(x.at(0)) >= minTrackTime) {
if (getCurTime(x.at(0)) >= minTrackTime &&
x.at(0).at(0) > QVectorHelper::minSec1 &&
x.at(0).at(1) > QVectorHelper::minSec2 &&
x.at(0).at(2) > QVectorHelper::minSec3) {
min = getCurTime(x.at(0));
}
}
@@ -117,7 +120,10 @@ int QVectorHelper::getMin(const QVector<QVector<int>> x) {
}
for (int i = 1; i < x.size(); i++) {
if (getCurTime(x.at(i)) < min) {
if (getCurTime(x.at(0)) >= minTrackTime) {
if (getCurTime(x.at(i)) >= minTrackTime &&
x.at(i).at(0) > QVectorHelper::minSec1 &&
x.at(i).at(1) > QVectorHelper::minSec2 &&
x.at(i).at(2) > QVectorHelper::minSec3) {
min = getCurTime(x.at(i));
}
}