diff --git a/common/params.cc b/common/params.cc index 9cddc28..c004f92 100644 --- a/common/params.cc +++ b/common/params.cc @@ -286,6 +286,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 483b849..0f12244 100644 --- 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 0ee8a0e..525e80e 100644 --- a/selfdrive/frogpilot/ui/vehicle_settings.cc +++ b/selfdrive/frogpilot/ui/vehicle_settings.cc @@ -112,6 +112,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", ""}, @@ -154,7 +155,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 ba2b3db..7abf10d 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"};