From 09e5ba7ddeec4469cdbc44ef82a3cb21b1604960 Mon Sep 17 00:00:00 2001 From: FrogAi <91348155+FrogAi@users.noreply.github.com> Date: Tue, 27 Feb 2024 16:34:47 -0700 Subject: [PATCH] Navigate on Chill Mode Co-Authored-By: garrettpall <76917194+garrettpall@users.noreply.github.com> --- common/params.cc | 1 + selfdrive/frogpilot/ui/control_settings.cc | 1 + selfdrive/frogpilot/ui/control_settings.h | 2 +- selfdrive/modeld/modeld.py | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/common/params.cc b/common/params.cc index 9d9739af..3f672b21 100644 --- a/common/params.cc +++ b/common/params.cc @@ -294,6 +294,7 @@ std::unordered_map keys = { {"MTSCEnabled", PERSISTENT}, {"MTSCLimit", PERSISTENT}, {"MuteOverheated", PERSISTENT}, + {"NavChill", PERSISTENT}, {"NoLogging", PERSISTENT}, {"NoUploads", PERSISTENT}, {"PathEdgeWidth", PERSISTENT}, diff --git a/selfdrive/frogpilot/ui/control_settings.cc b/selfdrive/frogpilot/ui/control_settings.cc index e44c85f6..1512c9a0 100644 --- a/selfdrive/frogpilot/ui/control_settings.cc +++ b/selfdrive/frogpilot/ui/control_settings.cc @@ -40,6 +40,7 @@ FrogPilotControlsPanel::FrogPilotControlsPanel(SettingsWindow *parent) : FrogPil {"QOLControls", "Quality of Life", "Miscellaneous quality of life changes to improve your overall openpilot experience.", "../frogpilot/assets/toggle_icons/quality_of_life.png"}, {"DisableOnroadUploads", "Disable Onroad Uploads", "Prevent large data uploads when onroad.", ""}, {"HigherBitrate", "Higher Bitrate Recording", "Increases the quality of the footage uploaded to comma connect.", ""}, + {"NavChill", "Navigate on Chill Mode", "Allows cars without longitudinal support to navigate. Allows navigation without experimental mode.", ""}, {"ReverseCruise", "Reverse Cruise Increase", "Reverses the 'long press' functionality when increasing the max set speed. Useful to increase the max speed quickly.", ""}, }; diff --git a/selfdrive/frogpilot/ui/control_settings.h b/selfdrive/frogpilot/ui/control_settings.h index fc4726a5..f4eb9f6f 100644 --- a/selfdrive/frogpilot/ui/control_settings.h +++ b/selfdrive/frogpilot/ui/control_settings.h @@ -43,7 +43,7 @@ private: std::set lateralTuneKeys = {"ForceAutoTune"}; std::set longitudinalTuneKeys = {"AccelerationProfile", "DecelerationProfile", "AggressiveAcceleration", "StoppingDistance"}; std::set mtscKeys = {"DisableMTSCSmoothing", "MTSCAggressiveness", "MTSCCurvatureCheck", "MTSCLimit"}; - std::set qolKeys = {"DisableOnroadUploads", "HigherBitrate", "ReverseCruise"}; + std::set qolKeys = {"DisableOnroadUploads", "HigherBitrate", "NavChill", "ReverseCruise"}; std::set speedLimitControllerKeys = {}; std::set speedLimitControllerControlsKeys = {}; std::set speedLimitControllerQOLKeys = {}; diff --git a/selfdrive/modeld/modeld.py b/selfdrive/modeld/modeld.py index 9d13f689..ffba1df8 100755 --- a/selfdrive/modeld/modeld.py +++ b/selfdrive/modeld/modeld.py @@ -246,7 +246,7 @@ def main(demo=False): # Enable/disable nav features timestamp_llk = sm["navModel"].locationMonoTime nav_valid = sm.valid["navModel"] # and (nanos_since_boot() - timestamp_llk < 1e9) - nav_enabled = nav_valid and params.get_bool("ExperimentalMode") + nav_enabled = nav_valid and (params.get_bool("ExperimentalMode") or params.get_bool("NavChill")) if not nav_enabled: nav_features[:] = 0