lagd calib: hide on release (#35523)

* hide on release

* pull out
pull/35341/merge
Shane Smiskol 3 days ago committed by GitHub
parent 03d2e7b2b0
commit e345f25ce4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 13
      selfdrive/ui/qt/offroad/settings.cc

@ -317,6 +317,8 @@ void DevicePanel::updateCalibDescription() {
}
}
const bool is_release = params.getBool("IsReleaseBranch");
if (!is_release) {
int lag_perc = 0;
std::string lag_bytes = params.get("LiveDelay");
if (!lag_bytes.empty()) {
@ -328,10 +330,12 @@ void DevicePanel::updateCalibDescription() {
qInfo() << "invalid LiveDelay";
}
}
desc += "\n\n";
if (lag_perc < 100) {
desc += tr("\n\nSteering lag calibration is %1% complete.").arg(lag_perc);
desc += tr("Steering lag calibration is %1% complete.").arg(lag_perc);
} else {
desc += tr("\n\nSteering lag calibration is complete.");
desc += tr("Steering lag calibration is complete.");
}
}
std::string torque_bytes = params.get("LiveTorqueParameters");
@ -343,10 +347,11 @@ void DevicePanel::updateCalibDescription() {
// don't add for non-torque cars
if (torque.getUseParams()) {
int torque_perc = torque.getCalPerc();
desc += is_release ? "\n\n" : " ";
if (torque_perc < 100) {
desc += tr(" Steering torque response calibration is %1% complete.").arg(torque_perc);
desc += tr("Steering torque response calibration is %1% complete.").arg(torque_perc);
} else {
desc += tr(" Steering torque response calibration is complete.");
desc += tr("Steering torque response calibration is complete.");
}
}
} catch (kj::Exception) {

Loading…
Cancel
Save