10 more lines for "all complete"

pull/35519/head
Shane Smiskol 4 days ago
parent d7f03ab189
commit de1ad0b738
  1. 31
      selfdrive/ui/qt/offroad/settings.cc

@ -329,12 +329,8 @@ void DevicePanel::updateCalibDescription() {
qInfo() << "invalid LiveDelay";
}
}
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.");
}
int torque_perc = -1;
std::string torque_bytes = params.get("LiveTorqueParameters");
if (!torque_bytes.empty()) {
try {
@ -343,18 +339,31 @@ void DevicePanel::updateCalibDescription() {
auto torque = cmsg.getRoot<cereal::Event>().getLiveTorqueParameters();
// don't add for non-torque cars
if (torque.getUseParams()) {
int torque_perc = torque.getCalPerc();
if (torque_perc < 100) {
desc += tr(" Steering torque response calibration is %1% complete.").arg(torque_perc);
} else {
desc += tr(" Steering torque response calibration is complete.");
}
torque_perc = torque.getCalPerc();
}
} catch (kj::Exception) {
qInfo() << "invalid LiveTorqueParameters";
}
}
if (lag_perc == 100 && torque_perc == 100) {
desc += tr("\n\nAll steering calibration is complete.");
} else {
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.");
}
if (torque_perc != -1) {
if (torque_perc < 100) {
desc += tr(" Steering torque response calibration is %1% complete.").arg(torque_perc);
} else {
desc += tr(" Steering torque response calibration is complete.");
}
}
}
desc += tr("\n\nopenpilot is continuously calibrating, resetting is rarely required. "
"Resetting calibration will restart openpilot if the car is powered on.");
resetCalibBtn->setDescription(desc);

Loading…
Cancel
Save