Revert "SP-35: Driving Model Selector: Reset all related params if branches/remote have changed"

This commit is contained in:
Jason Wen 2024-05-27 03:45:11 +00:00
parent 04925ab879
commit 0fb264377d
4 changed files with 8 additions and 17 deletions

View File

@ -227,7 +227,7 @@ std::unordered_map<std::string, uint32_t> keys = {
{"CarModelText", PERSISTENT | BACKUP},
{"ChevronInfo", PERSISTENT | BACKUP},
{"CustomBootScreen", PERSISTENT | BACKUP},
{"CustomDrivingModel", PERSISTENT | CLEAR_ON_BRANCH_SWITCH},
{"CustomDrivingModel", PERSISTENT},
{"CustomMapboxTokenPk", PERSISTENT | BACKUP},
{"CustomMapboxTokenSk", PERSISTENT | BACKUP},
{"CustomOffsets", PERSISTENT | BACKUP},
@ -236,10 +236,11 @@ std::unordered_map<std::string, uint32_t> keys = {
{"DevUIInfo", PERSISTENT | BACKUP},
{"DisableOnroadUploads", PERSISTENT | BACKUP},
{"DisengageLateralOnBrake", PERSISTENT | BACKUP},
{"DrivingModelGeneration", PERSISTENT | CLEAR_ON_BRANCH_SWITCH},
{"DrivingModelMetadataText", PERSISTENT | CLEAR_ON_BRANCH_SWITCH},
{"DrivingModelName", PERSISTENT | CLEAR_ON_BRANCH_SWITCH},
{"DrivingModelText", PERSISTENT | CLEAR_ON_BRANCH_SWITCH},
{"DrivingModelGeneration", PERSISTENT},
{"DrivingModelMetadataText", PERSISTENT},
{"DrivingModelName", PERSISTENT},
{"DrivingModelText", PERSISTENT},
{"DrivingModelUrl", PERSISTENT},
{"DynamicExperimentalControl", PERSISTENT | BACKUP},
{"DynamicLaneProfile", PERSISTENT | BACKUP},
{"EnableAmap", PERSISTENT | BACKUP},
@ -262,8 +263,6 @@ std::unordered_map<std::string, uint32_t> keys = {
{"HotspotOnBoot", PERSISTENT},
{"HotspotOnBootConfirmed", PERSISTENT},
{"LastCarModel", PERSISTENT | BACKUP},
{"LastGitBranch", PERSISTENT},
{"LastGitRemote", PERSISTENT},
{"LastSpeedLimitSignTap", PERSISTENT},
{"LastSunnylinkPingTime", CLEAR_ON_MANAGER_START},
{"LiveTorque", PERSISTENT | BACKUP},
@ -275,7 +274,8 @@ std::unordered_map<std::string, uint32_t> keys = {
{"MapTargetVelocities", PERSISTENT},
{"Map3DBuildings", PERSISTENT | BACKUP},
{"MaxTimeOffroad", PERSISTENT | BACKUP},
{"NavModelText", PERSISTENT | CLEAR_ON_BRANCH_SWITCH},
{"NavModelText", PERSISTENT | BACKUP},
{"NavModelUrl", PERSISTENT | BACKUP},
{"NNFF", PERSISTENT | BACKUP},
{"NNFFCarModel", PERSISTENT | BACKUP},
{"OnroadScreenOff", PERSISTENT | BACKUP},
@ -323,7 +323,6 @@ std::unordered_map<std::string, uint32_t> keys = {
{"VisionCurveLaneless", PERSISTENT | BACKUP},
{"VwAccType", PERSISTENT | BACKUP},
{"VwCCOnly", PERSISTENT | BACKUP},
{"Offroad_BranchSwitchResetParams", CLEAR_ON_MANAGER_START}, // TODO: SP: use this for alert on main menu
{"Offroad_ForceStatus", CLEAR_ON_MANAGER_START},
{"Offroad_SupersededUpdate", PERSISTENT},

View File

@ -17,7 +17,6 @@ enum ParamKeyType {
DONT_LOG = 0x20,
DEVELOPMENT_ONLY = 0x40,
BACKUP = 0x80,
CLEAR_ON_BRANCH_SWITCH = 0x100,
ALL = 0xFFFFFFFF
};

View File

@ -13,7 +13,6 @@ cdef extern from "common/params.h":
CLEAR_ON_OFFROAD_TRANSITION
DEVELOPMENT_ONLY
BACKUP
CLEAR_ON_BRANCH_SWITCH
ALL
cdef cppclass c_Params "Params":

View File

@ -32,9 +32,6 @@ def manager_init() -> None:
if build_metadata.release_channel:
params.clear_all(ParamKeyType.DEVELOPMENT_ONLY)
if params.get("LastGitBranch") != build_metadata.channel or params.get("LastGitRemote") != build_metadata.openpilot.git_origin:
params.clear_all(ParamKeyType.CLEAR_ON_BRANCH_SWITCH)
default_params: list[tuple[str, str | bytes]] = [
("CompletedTrainingVersion", "0"),
("DisengageOnAccelerator", "0"),
@ -59,7 +56,6 @@ def manager_init() -> None:
("ChevronInfo", "1"),
("MadsCruiseMain", "1"),
("CustomBootScreen", "0"),
("CustomDrivingModel", "0"),
("CustomOffsets", "0"),
("DevUIInfo", "0"),
("DisableOnroadUploads", "0"),
@ -141,8 +137,6 @@ def manager_init() -> None:
params.put("GitCommitDate", build_metadata.openpilot.git_commit_date)
params.put("GitBranch", build_metadata.channel)
params.put("GitRemote", build_metadata.openpilot.git_origin)
params.put("LastGitBranch", build_metadata.channel)
params.put("LastGitRemote", build_metadata.openpilot.git_origin)
params.put_bool("IsTestedBranch", build_metadata.tested_channel)
params.put_bool("IsReleaseBranch", build_metadata.release_channel)
params.put_bool("IsReleaseSPBranch", build_metadata.release_sp_channel)