From e345f25ce4e82c342af1eadb145a80a3920db79f Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Tue, 10 Jun 2025 16:16:05 -0700 Subject: [PATCH] lagd calib: hide on release (#35523) * hide on release * pull out --- selfdrive/ui/qt/offroad/settings.cc | 37 ++++++++++++++++------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/selfdrive/ui/qt/offroad/settings.cc b/selfdrive/ui/qt/offroad/settings.cc index 28df3afe3f..0326c67e1e 100644 --- a/selfdrive/ui/qt/offroad/settings.cc +++ b/selfdrive/ui/qt/offroad/settings.cc @@ -317,21 +317,25 @@ void DevicePanel::updateCalibDescription() { } } - int lag_perc = 0; - std::string lag_bytes = params.get("LiveDelay"); - if (!lag_bytes.empty()) { - try { - AlignedBuffer aligned_buf; - capnp::FlatArrayMessageReader cmsg(aligned_buf.align(lag_bytes.data(), lag_bytes.size())); - lag_perc = cmsg.getRoot().getLiveDelay().getCalPerc(); - } catch (kj::Exception) { - qInfo() << "invalid LiveDelay"; + 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()) { + try { + AlignedBuffer aligned_buf; + capnp::FlatArrayMessageReader cmsg(aligned_buf.align(lag_bytes.data(), lag_bytes.size())); + lag_perc = cmsg.getRoot().getLiveDelay().getCalPerc(); + } catch (kj::Exception) { + qInfo() << "invalid LiveDelay"; + } + } + desc += "\n\n"; + if (lag_perc < 100) { + desc += tr("Steering lag calibration is %1% complete.").arg(lag_perc); + } else { + desc += tr("Steering lag calibration is complete."); } - } - if (lag_perc < 100) { - desc += tr("\n\nSteering lag calibration is %1% complete.").arg(lag_perc); - } else { - desc += tr("\n\nSteering 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) {