mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-07 15:33:51 +00:00
only use fast coefficient protocol for newer LibreCAL firmware
This commit is contained in:
parent
2c639d8080
commit
74858c1098
6 changed files with 46 additions and 5 deletions
|
|
@ -201,3 +201,27 @@ QColor Util::getIntensityGradeColor(double intensity)
|
|||
return Qt::black;
|
||||
}
|
||||
}
|
||||
|
||||
bool Util::firmwareEqualOrHigher(QString firmware, QString compare)
|
||||
{
|
||||
QStringList f = firmware.split(".");
|
||||
QStringList c = compare.split(".");
|
||||
if(f.size() != 3 || c.size() != 3) {
|
||||
return false;
|
||||
}
|
||||
if(f[0].toInt() < c[0].toInt()) {
|
||||
return false;
|
||||
} else if(f[0].toInt() > c[0].toInt()) {
|
||||
return true;
|
||||
}
|
||||
if(f[1].toInt() < c[1].toInt()) {
|
||||
return false;
|
||||
} else if(f[1].toInt() > c[1].toInt()) {
|
||||
return true;
|
||||
}
|
||||
if(f[2].toInt() < c[2].toInt()) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue