diff --git a/opendbc_repo/opendbc/car/gm/carcontroller.py b/opendbc_repo/opendbc/car/gm/carcontroller.py index 011bc21e..81d41700 100644 --- a/opendbc_repo/opendbc/car/gm/carcontroller.py +++ b/opendbc_repo/opendbc/car/gm/carcontroller.py @@ -7,6 +7,7 @@ from opendbc.car.gm import gmcan from opendbc.car.common.conversions import Conversions as CV from opendbc.car.gm.values import ASCM_INT, CAR, CC_ONLY_CAR, CC_REGEN_PADDLE_CAR, DBC, EV_CAR, SDGM_CAR, AccState, CanBus, CarControllerParams, CruiseButtons, GMFlags from opendbc.car.interfaces import CarControllerBase +from opendbc.car.gm.cancel_logic import get_stock_cc_active_for_cancel from openpilot.common.params import Params, UnknownKeyName from openpilot.starpilot.common.testing_grounds import testing_ground @@ -534,7 +535,12 @@ class CarController(CarControllerBase): cc_long_cancel = ((self.CP.flags & GMFlags.CC_LONG.value) and self.prev_op_enabled and not CC.enabled and CS.out.cruiseState.enabled) - if pedal_cancel or cc_long_cancel: + if self.CP.carFingerprint == CAR.CHEVROLET_MALIBU_HYBRID_CC: + stock_cc_active = get_stock_cc_active_for_cancel(self.CP, CS) + pedal_cancel = bool(self.CP.flags & GMFlags.PEDAL_LONG.value) and CC.longActive + cc_long_cancel = bool(self.CP.flags & GMFlags.CC_LONG.value) and not CC.enabled + + if (pedal_cancel or cc_long_cancel) and (stock_cc_active if self.CP.carFingerprint == CAR.CHEVROLET_MALIBU_HYBRID_CC else True): if self.CP.carFingerprint == CAR.CHEVROLET_MALIBU_HYBRID_CC: malibu_cancel_requested = True elif (self.frame - self.last_button_frame) * DT_CTRL > 0.04: @@ -548,27 +554,26 @@ class CarController(CarControllerBase): self.cancel_counter = self.cancel_counter + 1 if CC.cruiseControl.cancel else 0 # Stock longitudinal, integrated at camera - if (self.frame - self.last_button_frame) * DT_CTRL > 0.04: + if self.CP.carFingerprint == CAR.CHEVROLET_MALIBU_HYBRID_CC and self.cancel_counter > CAMERA_CANCEL_DELAY_FRAMES: + malibu_cancel_requested = True + elif (self.frame - self.last_button_frame) * DT_CTRL > 0.04: if self.cancel_counter > CAMERA_CANCEL_DELAY_FRAMES: - if self.CP.carFingerprint == CAR.CHEVROLET_MALIBU_HYBRID_CC: - malibu_cancel_requested = True - else: - self.last_button_frame = self.frame - sdgm_stock_cancel_pt = ( - self.CP.carFingerprint in SDGM_CAR and - self.CP.carFingerprint not in { - CAR.CHEVROLET_VOLT, - CAR.CHEVROLET_VOLT_2019, - CAR.CHEVROLET_VOLT_ASCM, - CAR.CHEVROLET_VOLT_CAMERA, - CAR.CHEVROLET_VOLT_CC, - CAR.CHEVROLET_BLAZER, - CAR.CHEVROLET_MALIBU_SDGM, - CAR.CHEVROLET_TRAVERSE, - } - ) - cancel_bus = CanBus.POWERTRAIN if sdgm_stock_cancel_pt else CanBus.CAMERA - can_sends.append(gmcan.create_buttons(self.packer_pt, cancel_bus, CS.buttons_counter, CruiseButtons.CANCEL)) + self.last_button_frame = self.frame + sdgm_stock_cancel_pt = ( + self.CP.carFingerprint in SDGM_CAR and + self.CP.carFingerprint not in { + CAR.CHEVROLET_VOLT, + CAR.CHEVROLET_VOLT_2019, + CAR.CHEVROLET_VOLT_ASCM, + CAR.CHEVROLET_VOLT_CAMERA, + CAR.CHEVROLET_VOLT_CC, + CAR.CHEVROLET_BLAZER, + CAR.CHEVROLET_MALIBU_SDGM, + CAR.CHEVROLET_TRAVERSE, + } + ) + cancel_bus = CanBus.POWERTRAIN if sdgm_stock_cancel_pt else CanBus.CAMERA + can_sends.append(gmcan.create_buttons(self.packer_pt, cancel_bus, CS.buttons_counter, CruiseButtons.CANCEL)) if self.CP.carFingerprint == CAR.CHEVROLET_MALIBU_HYBRID_CC: if malibu_cancel_requested and malibu_oem_button_slot: diff --git a/panda/board/obj/body_h7.bin.signed b/panda/board/obj/body_h7.bin.signed index e6796f92..431e214a 100644 Binary files a/panda/board/obj/body_h7.bin.signed and b/panda/board/obj/body_h7.bin.signed differ diff --git a/panda/board/obj/body_h7/bootstub.elf b/panda/board/obj/body_h7/bootstub.elf index 7b14cb56..44f60add 100755 Binary files a/panda/board/obj/body_h7/bootstub.elf and b/panda/board/obj/body_h7/bootstub.elf differ diff --git a/panda/board/obj/body_h7/main.bin b/panda/board/obj/body_h7/main.bin index 8c7b2116..0dc715cd 100755 Binary files a/panda/board/obj/body_h7/main.bin and b/panda/board/obj/body_h7/main.bin differ diff --git a/panda/board/obj/body_h7/main.elf b/panda/board/obj/body_h7/main.elf index 04261f75..8b9daa9f 100755 Binary files a/panda/board/obj/body_h7/main.elf and b/panda/board/obj/body_h7/main.elf differ diff --git a/panda/board/obj/bootstub.body_h7.bin b/panda/board/obj/bootstub.body_h7.bin index 6c9a2ee9..eddce4a9 100755 Binary files a/panda/board/obj/bootstub.body_h7.bin and b/panda/board/obj/bootstub.body_h7.bin differ diff --git a/panda/board/obj/bootstub.panda.bin b/panda/board/obj/bootstub.panda.bin index ff3d4920..e57e0fce 100755 Binary files a/panda/board/obj/bootstub.panda.bin and b/panda/board/obj/bootstub.panda.bin differ diff --git a/panda/board/obj/bootstub.panda_h7.bin b/panda/board/obj/bootstub.panda_h7.bin index af46fd88..81dfa741 100755 Binary files a/panda/board/obj/bootstub.panda_h7.bin and b/panda/board/obj/bootstub.panda_h7.bin differ diff --git a/panda/board/obj/bootstub.panda_h7_remote.bin b/panda/board/obj/bootstub.panda_h7_remote.bin index af46fd88..81dfa741 100755 Binary files a/panda/board/obj/bootstub.panda_h7_remote.bin and b/panda/board/obj/bootstub.panda_h7_remote.bin differ diff --git a/panda/board/obj/bootstub.panda_jungle_h7.bin b/panda/board/obj/bootstub.panda_jungle_h7.bin index ab771dba..236f50dd 100755 Binary files a/panda/board/obj/bootstub.panda_jungle_h7.bin and b/panda/board/obj/bootstub.panda_jungle_h7.bin differ diff --git a/panda/board/obj/bootstub.panda_remote.bin b/panda/board/obj/bootstub.panda_remote.bin index ff3d4920..e57e0fce 100755 Binary files a/panda/board/obj/bootstub.panda_remote.bin and b/panda/board/obj/bootstub.panda_remote.bin differ diff --git a/panda/board/obj/gitversion.h b/panda/board/obj/gitversion.h index 2b4480bd..f45a39e3 100644 --- a/panda/board/obj/gitversion.h +++ b/panda/board/obj/gitversion.h @@ -1,2 +1,2 @@ extern const uint8_t gitversion[19]; -const uint8_t gitversion[19] = "DEV-3af9b873-DEBUG"; +const uint8_t gitversion[19] = "DEV-523a26be-DEBUG"; diff --git a/panda/board/obj/panda.bin.signed b/panda/board/obj/panda.bin.signed index bd26d3c0..7c13fc96 100644 Binary files a/panda/board/obj/panda.bin.signed and b/panda/board/obj/panda.bin.signed differ diff --git a/panda/board/obj/panda/bootstub.elf b/panda/board/obj/panda/bootstub.elf index a67aa066..0f842cd7 100755 Binary files a/panda/board/obj/panda/bootstub.elf and b/panda/board/obj/panda/bootstub.elf differ diff --git a/panda/board/obj/panda/main.bin b/panda/board/obj/panda/main.bin index 55184b79..36e4c3ad 100755 Binary files a/panda/board/obj/panda/main.bin and b/panda/board/obj/panda/main.bin differ diff --git a/panda/board/obj/panda/main.elf b/panda/board/obj/panda/main.elf index 900ec08d..f30d12ac 100755 Binary files a/panda/board/obj/panda/main.elf and b/panda/board/obj/panda/main.elf differ diff --git a/panda/board/obj/panda_h7.bin.signed b/panda/board/obj/panda_h7.bin.signed index 91d9619a..402cdc04 100644 Binary files a/panda/board/obj/panda_h7.bin.signed and b/panda/board/obj/panda_h7.bin.signed differ diff --git a/panda/board/obj/panda_h7/bootstub.elf b/panda/board/obj/panda_h7/bootstub.elf index 85d1fd80..23921c8c 100755 Binary files a/panda/board/obj/panda_h7/bootstub.elf and b/panda/board/obj/panda_h7/bootstub.elf differ diff --git a/panda/board/obj/panda_h7/main.bin b/panda/board/obj/panda_h7/main.bin index 5696562c..dadda28a 100755 Binary files a/panda/board/obj/panda_h7/main.bin and b/panda/board/obj/panda_h7/main.bin differ diff --git a/panda/board/obj/panda_h7/main.elf b/panda/board/obj/panda_h7/main.elf index f95f5a39..2d7fb140 100755 Binary files a/panda/board/obj/panda_h7/main.elf and b/panda/board/obj/panda_h7/main.elf differ diff --git a/panda/board/obj/panda_h7_remote.bin.signed b/panda/board/obj/panda_h7_remote.bin.signed index c8146e2b..1343ed9f 100644 Binary files a/panda/board/obj/panda_h7_remote.bin.signed and b/panda/board/obj/panda_h7_remote.bin.signed differ diff --git a/panda/board/obj/panda_h7_remote/bootstub.elf b/panda/board/obj/panda_h7_remote/bootstub.elf index 36fe3882..effea6e5 100755 Binary files a/panda/board/obj/panda_h7_remote/bootstub.elf and b/panda/board/obj/panda_h7_remote/bootstub.elf differ diff --git a/panda/board/obj/panda_h7_remote/main.bin b/panda/board/obj/panda_h7_remote/main.bin index 12ee268f..3ec2e0a7 100755 Binary files a/panda/board/obj/panda_h7_remote/main.bin and b/panda/board/obj/panda_h7_remote/main.bin differ diff --git a/panda/board/obj/panda_h7_remote/main.elf b/panda/board/obj/panda_h7_remote/main.elf index f5733d46..e3831b82 100755 Binary files a/panda/board/obj/panda_h7_remote/main.elf and b/panda/board/obj/panda_h7_remote/main.elf differ diff --git a/panda/board/obj/panda_jungle_h7.bin.signed b/panda/board/obj/panda_jungle_h7.bin.signed index 1a6a2e8f..b1351816 100644 Binary files a/panda/board/obj/panda_jungle_h7.bin.signed and b/panda/board/obj/panda_jungle_h7.bin.signed differ diff --git a/panda/board/obj/panda_jungle_h7/bootstub.elf b/panda/board/obj/panda_jungle_h7/bootstub.elf index bd38519b..f36b775a 100755 Binary files a/panda/board/obj/panda_jungle_h7/bootstub.elf and b/panda/board/obj/panda_jungle_h7/bootstub.elf differ diff --git a/panda/board/obj/panda_jungle_h7/main.bin b/panda/board/obj/panda_jungle_h7/main.bin index a75530e9..b5cf1e5b 100755 Binary files a/panda/board/obj/panda_jungle_h7/main.bin and b/panda/board/obj/panda_jungle_h7/main.bin differ diff --git a/panda/board/obj/panda_jungle_h7/main.elf b/panda/board/obj/panda_jungle_h7/main.elf index 9d471eae..dc77e30f 100755 Binary files a/panda/board/obj/panda_jungle_h7/main.elf and b/panda/board/obj/panda_jungle_h7/main.elf differ diff --git a/panda/board/obj/panda_remote.bin.signed b/panda/board/obj/panda_remote.bin.signed index e61c3594..d21534e3 100644 Binary files a/panda/board/obj/panda_remote.bin.signed and b/panda/board/obj/panda_remote.bin.signed differ diff --git a/panda/board/obj/panda_remote/bootstub.elf b/panda/board/obj/panda_remote/bootstub.elf index 60b9faee..e4a9873c 100755 Binary files a/panda/board/obj/panda_remote/bootstub.elf and b/panda/board/obj/panda_remote/bootstub.elf differ diff --git a/panda/board/obj/panda_remote/main.bin b/panda/board/obj/panda_remote/main.bin index 1e17867f..0b9abfb3 100755 Binary files a/panda/board/obj/panda_remote/main.bin and b/panda/board/obj/panda_remote/main.bin differ diff --git a/panda/board/obj/panda_remote/main.elf b/panda/board/obj/panda_remote/main.elf index 8fbfdcee..61992b67 100755 Binary files a/panda/board/obj/panda_remote/main.elf and b/panda/board/obj/panda_remote/main.elf differ diff --git a/panda/board/obj/version b/panda/board/obj/version index d45da14a..f727c6ec 100644 --- a/panda/board/obj/version +++ b/panda/board/obj/version @@ -1 +1 @@ -DEV-3af9b873-DEBUG \ No newline at end of file +DEV-523a26be-DEBUG \ No newline at end of file diff --git a/scripts/laptop_device_build.sh b/scripts/laptop_device_build.sh index 18a92eb3..f94a04f4 100755 --- a/scripts/laptop_device_build.sh +++ b/scripts/laptop_device_build.sh @@ -118,9 +118,26 @@ assert_image_arch() { } expected_capnp_version() { + if [[ -n "${COMMA_EXPECTED_CAPNP_VERSION:-}" ]]; then + echo "${COMMA_EXPECTED_CAPNP_VERSION}" + return + fi + + local dockerfile_version="" + dockerfile_version="$(sed -n 's/^ARG CAPNP_VERSION=\(.*\)$/\1/p' "${ROOT_DIR}/tools/laptop_device_build/Dockerfile" | head -n 1)" + if [[ -n "${dockerfile_version}" ]]; then + echo "${dockerfile_version}" + return + fi + + local header_path="${ROOT_DIR}/cereal/gen/cpp/custom.capnp.h" + if [[ ! -f "${header_path}" ]]; then + err "Unable to determine expected Cap'n Proto version. Set COMMA_EXPECTED_CAPNP_VERSION or restore tools/laptop_device_build/Dockerfile ARG CAPNP_VERSION." + fi + local raw_version="" - raw_version="$(sed -n 's/^#elif CAPNP_VERSION != \([0-9][0-9]*\)$/\1/p' "${ROOT_DIR}/cereal/gen/cpp/custom.capnp.h" | head -n 1)" - [[ -n "${raw_version}" ]] || err "Unable to determine expected Cap'n Proto version from cereal/gen/cpp/custom.capnp.h." + raw_version="$(sed -n 's/^#elif CAPNP_VERSION != \([0-9][0-9]*\)$/\1/p' "${header_path}" | head -n 1)" + [[ -n "${raw_version}" ]] || err "Unable to determine expected Cap'n Proto version from ${header_path}." local major=$(( raw_version / 1000000 )) local minor=$(( (raw_version / 1000) % 1000 )) diff --git a/selfdrive/ui/ui b/selfdrive/ui/ui index a6cd0804..a50fe22e 100755 Binary files a/selfdrive/ui/ui and b/selfdrive/ui/ui differ diff --git a/starpilot/ui/qt/offroad/model_settings.cc b/starpilot/ui/qt/offroad/model_settings.cc index 9ded75e0..d70cd2ac 100644 --- a/starpilot/ui/qt/offroad/model_settings.cc +++ b/starpilot/ui/qt/offroad/model_settings.cc @@ -11,6 +11,98 @@ #include "system/hardware/hw.h" +namespace { + +QString paramDefaultValue(const Params ¶ms, const char *key) { + return QString::fromStdString(const_cast(params).getKeyDefaultValue(key).value_or("")).trimmed(); +} + +QString builtinDefaultModelKey(const Params ¶ms) { + QString key = paramDefaultValue(params, "Model"); + if (key.isEmpty()) { + key = paramDefaultValue(params, "DrivingModel"); + } + return key.isEmpty() ? QStringLiteral("sc2") : key; +} + +QString builtinDefaultModelName(const Params ¶ms) { + QString name = paramDefaultValue(params, "DrivingModelName"); + return name.isEmpty() ? QStringLiteral("South Carolina") : name; +} + +QStringList builtinDefaultModelAliases(const QString &defaultKey) { + QString canonical = defaultKey.trimmed(); + if (canonical.isEmpty()) { + canonical = QStringLiteral("sc2"); + } + + QStringList aliases{canonical}; + + if (canonical.endsWith("2")) { + aliases.append(canonical.left(canonical.size() - 1)); + } else { + aliases.append(canonical + "2"); + } + + if (canonical.endsWith("_default")) { + aliases.append(canonical.left(canonical.size() - QStringLiteral("_default").size())); + } + + aliases.removeAll(""); + aliases.removeDuplicates(); + return aliases; +} + +bool isBuiltinDefaultModel(const Params ¶ms, const QString &key) { + return builtinDefaultModelAliases(builtinDefaultModelKey(params)).contains(key.trimmed()); +} + +QString canonicalModelKey(const Params ¶ms, const QString &key) { + const QString trimmedKey = key.trimmed(); + return isBuiltinDefaultModel(params, trimmedKey) ? builtinDefaultModelKey(params) : trimmedKey; +} + +void ensureDefaultModelVisible(const Params ¶ms, const QString &fallbackSeries, + QMap &modelFileToNameMap, + QMap &modelFileToNameMapProcessed, + QMap &modelSeriesMap, + QMap &modelReleasedDates) { + const QString defaultKey = builtinDefaultModelKey(params); + QString displayName = builtinDefaultModelName(params); + QString series = fallbackSeries; + QString releasedDate; + + for (const QString &alias : builtinDefaultModelAliases(defaultKey)) { + if (!modelFileToNameMap.contains(alias)) { + continue; + } + + displayName = modelFileToNameMap.value(alias, displayName); + if (series == fallbackSeries && modelSeriesMap.contains(alias)) { + series = modelSeriesMap.value(alias); + } + if (releasedDate.isEmpty() && modelReleasedDates.contains(alias)) { + releasedDate = modelReleasedDates.value(alias); + } + + if (alias != defaultKey) { + modelFileToNameMap.remove(alias); + modelFileToNameMapProcessed.remove(alias); + modelSeriesMap.remove(alias); + modelReleasedDates.remove(alias); + } + } + + modelFileToNameMap.insert(defaultKey, displayName); + modelFileToNameMapProcessed.insert(defaultKey, cleanModelName(displayName)); + modelSeriesMap.insert(defaultKey, series); + if (!releasedDate.isEmpty()) { + modelReleasedDates.insert(defaultKey, releasedDate); + } +} + +} // namespace + StarPilotModelPanel::StarPilotModelPanel(StarPilotSettingsWindow *parent) : StarPilotListWidget(parent), allModelsDownloaded(false), allModelsDownloading(false), @@ -366,10 +458,6 @@ StarPilotModelPanel::StarPilotModelPanel(StarPilotSettingsWindow *parent) : Star } QString modelName = modelFileToNameMap.value(modelKey); - if (modelName.contains("(Default)")) { - continue; - } - installedModelFileToNameMap.insert(modelKey, modelName); if (modelReleasedDates.contains(modelKey)) { installedReleasedDates.insert(modelKey, modelReleasedDates.value(modelKey)); @@ -385,15 +473,12 @@ StarPilotModelPanel::StarPilotModelPanel(StarPilotSettingsWindow *parent) : Star } // Add default model to the beginning of its series - QString defaultModelKey = QString::fromStdString(params.getKeyDefaultValue("Model").value()); - if (defaultModelKey.isEmpty()) { - defaultModelKey = QString::fromStdString(params.getKeyDefaultValue("DrivingModel").value()); - } - QString defaultModelName = modelFileToNameMap.value(defaultModelKey); - QString defaultSeries = modelSeriesMap.value(defaultModelKey, "Custom Series"); - if (seriesToModels.contains(defaultSeries) && seriesToModels[defaultSeries].contains(defaultModelName)) { - seriesToModels[defaultSeries].removeAll(defaultModelName); - seriesToModels[defaultSeries].prepend(defaultModelName); + const QString defaultKey = builtinDefaultModelKey(params); + const QString defaultName = modelFileToNameMap.value(defaultKey, builtinDefaultModelName(params)); + const QString defaultSeries = modelSeriesMap.value(defaultKey, tr("Custom Series")); + if (seriesToModels.contains(defaultSeries) && seriesToModels[defaultSeries].contains(defaultName)) { + seriesToModels[defaultSeries].removeAll(defaultName); + seriesToModels[defaultSeries].prepend(defaultName); } // Prepare favorites and dates for the enhanced dialog @@ -525,6 +610,10 @@ bool StarPilotModelPanel::isModelInstalled(const QString &key) const { return false; } + if (isBuiltinDefaultModel(params, key)) { + return true; + } + bool has_thneed = false; bool has_policy_meta = false; bool has_policy_tg = false; @@ -579,12 +668,9 @@ bool StarPilotModelPanel::isModelInstalled(const QString &key) const { QMap StarPilotModelPanel::getDeletableModelDisplayNames() { QMap deletable; - QString defaultModelKey = QString::fromStdString(params.getKeyDefaultValue("Model").value()); - if (defaultModelKey.isEmpty()) { - defaultModelKey = QString::fromStdString(params.getKeyDefaultValue("DrivingModel").value()); - } - QString defaultModelName = modelFileToNameMap.value(defaultModelKey); - QString processedDefault = cleanModelName(defaultModelName); + const QString defaultKey = builtinDefaultModelKey(params); + const QString defaultName = modelFileToNameMap.value(defaultKey, builtinDefaultModelName(params)); + const QString processedDefault = cleanModelName(defaultName); QString processedCurrent = cleanModelName(currentModel); for (auto it = modelFileToNameMap.constBegin(); it != modelFileToNameMap.constEnd(); ++it) { @@ -636,7 +722,10 @@ void StarPilotModelPanel::showEvent(QShowEvent *event) { QJsonObject versionObj; int verCount = qMin(availableModels.size(), versionList.size()); for (int i = 0; i < verCount; ++i) { - versionObj.insert(availableModels[i], versionList[i]); + const QString modelKey = canonicalModelKey(params, availableModels[i]); + if (!modelKey.isEmpty()) { + versionObj.insert(modelKey, versionList[i]); + } } QFile out(modelDir.filePath(".model_versions.json")); if (out.open(QIODevice::WriteOnly)) { @@ -651,7 +740,7 @@ void StarPilotModelPanel::showEvent(QShowEvent *event) { modelReleasedDates.clear(); int size = qMin(availableModels.size(), availableModelNames.size()); for (int i = 0; i < size; ++i) { - const QString modelKey = availableModels[i].trimmed(); + const QString modelKey = canonicalModelKey(params, availableModels[i]); const QString modelName = availableModelNames[i].trimmed(); if (modelKey.isEmpty() || modelName.isEmpty()) { continue; @@ -676,6 +765,9 @@ void StarPilotModelPanel::showEvent(QShowEvent *event) { } } } + + ensureDefaultModelVisible(params, tr("Custom Series"), modelFileToNameMap, modelFileToNameMapProcessed, modelSeriesMap, modelReleasedDates); + allModelsDownloaded = true; for (auto it = modelFileToNameMap.constBegin(); it != modelFileToNameMap.constEnd(); ++it) { if (it.value().isEmpty()) { @@ -687,17 +779,14 @@ void StarPilotModelPanel::showEvent(QShowEvent *event) { } } - QString modelKey = QString::fromStdString(params.get("Model")); + QString modelKey = canonicalModelKey(params, QString::fromStdString(params.get("Model"))); if (modelKey.isEmpty()) { - modelKey = QString::fromStdString(params.get("DrivingModel")); + modelKey = canonicalModelKey(params, QString::fromStdString(params.get("DrivingModel"))); } if (!isModelInstalled(modelKey)) { - modelKey = QString::fromStdString(params.getKeyDefaultValue("Model").value()); - if (modelKey.isEmpty()) { - modelKey = QString::fromStdString(params.getKeyDefaultValue("DrivingModel").value()); - } + modelKey = builtinDefaultModelKey(params); } - currentModel = modelFileToNameMap.value(modelKey); + currentModel = modelFileToNameMap.value(modelKey, builtinDefaultModelName(params)); selectModelButton->setValue(currentModel); noModelsDownloaded = getDeletableModelDisplayNames().isEmpty();