diff --git a/common/params.cc b/common/params.cc index 047469641..daaf1c6ab 100644 --- a/common/params.cc +++ b/common/params.cc @@ -281,6 +281,7 @@ std::unordered_map keys = { {"LongitudinalTune", PERSISTENT}, {"LongPitch", PERSISTENT}, {"LoudBlindspotAlert", PERSISTENT}, + {"LowerVolt", PERSISTENT}, {"ManualUpdateInitiated", CLEAR_ON_MANAGER_START}, {"ModelUI", PERSISTENT}, {"MuteOverheated", PERSISTENT}, diff --git a/selfdrive/car/gm/interface.py b/selfdrive/car/gm/interface.py index ca582b085..231180a7e 100755 --- a/selfdrive/car/gm/interface.py +++ b/selfdrive/car/gm/interface.py @@ -171,6 +171,7 @@ class CarInterface(CarInterfaceBase): ret.longitudinalActuatorDelayUpperBound = 0.5 # large delay to initially start braking if candidate in (CAR.VOLT, CAR.VOLT_CC): + ret.minEnableSpeed = -1 if params.get_bool("LowerVolt") else ret.minEnableSpeed ret.mass = 1607. ret.wheelbase = 2.69 ret.steerRatio = 17.7 # Stock 15.7, LiveParameters diff --git a/selfdrive/frogpilot/ui/vehicle_settings.cc b/selfdrive/frogpilot/ui/vehicle_settings.cc index e578d33b0..3f6b50636 100644 --- a/selfdrive/frogpilot/ui/vehicle_settings.cc +++ b/selfdrive/frogpilot/ui/vehicle_settings.cc @@ -101,6 +101,7 @@ FrogPilotVehiclesPanel::FrogPilotVehiclesPanel(SettingsWindow *parent) : FrogPil std::vector> vehicleToggles { {"GasRegenCmd", "GM Truck Gas Tune", "Increase acceleration and smoothen brake to stop. For use on Silverado/Sierra only.", ""}, {"LongPitch", "Long Pitch Compensation", "Reduce speed and acceleration error for greater passenger comfort and improved vehicle efficiency.", ""}, + {"LowerVolt", "Lower Volt Enable Speed", "Lower the Volt's minimum enable speed to enable openpilot at any speed.", ""}, {"LockDoors", "Lock Doors In Drive", "Automatically lock the doors when in drive and unlock when in park.", ""}, {"LongitudinalTune", "Longitudinal Tune", "Use a custom Toyota longitudinal tune.\n\nCydia = More focused on TSS-P vehicles but works for all Toyotas\n\nDragonPilot = Focused on TSS2 vehicles\n\nFrogPilot = Takes the best of both worlds with some personal tweaks focused around my 2019 Lexus ES 350", ""}, @@ -143,7 +144,7 @@ FrogPilotVehiclesPanel::FrogPilotVehiclesPanel(SettingsWindow *parent) : FrogPil }); } - std::set rebootKeys = {"GasRegenCmd"}; + std::set rebootKeys = {"GasRegenCmd", "LowerVolt"}; for (const std::string &key : rebootKeys) { QObject::connect(toggles[key], &ToggleControl::toggleFlipped, [this]() { if (started) { diff --git a/selfdrive/frogpilot/ui/vehicle_settings.h b/selfdrive/frogpilot/ui/vehicle_settings.h index ba2b3db39..7abf10d00 100644 --- a/selfdrive/frogpilot/ui/vehicle_settings.h +++ b/selfdrive/frogpilot/ui/vehicle_settings.h @@ -28,7 +28,7 @@ private: std::map toggles; - std::set gmKeys = {"GasRegenCmd", "LongPitch"}; + std::set gmKeys = {"GasRegenCmd", "LongPitch", "LowerVolt"}; std::set subaruKeys = {}; std::set toyotaKeys = {"LockDoors", "LongitudinalTune"};