diff --git a/common/params.cc b/common/params.cc index 95fc56f..447574c 100644 --- a/common/params.cc +++ b/common/params.cc @@ -261,6 +261,7 @@ std::unordered_map keys = { {"LockDoors", PERSISTENT}, {"LongitudinalTune", PERSISTENT}, {"LongPitch", PERSISTENT}, + {"LowerVolt", PERSISTENT}, {"ModelUI", PERSISTENT}, {"MuteDM", PERSISTENT}, {"MuteDoor", PERSISTENT}, diff --git a/selfdrive/car/gm/interface.py b/selfdrive/car/gm/interface.py index 6f55d2a..9b80ebd 100644 --- a/selfdrive/car/gm/interface.py +++ b/selfdrive/car/gm/interface.py @@ -160,6 +160,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 a1b0fd3..5b08c2f 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", "Gas Regen Cmd", "", ""}, {"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.", ""}, }; @@ -120,7 +121,7 @@ FrogPilotVehiclesPanel::FrogPilotVehiclesPanel(SettingsWindow *parent) : FrogPil gmKeys = {"GasRegenCmd", "LongPitch"}; toyotaKeys = {}; - std::set rebootKeys = {}; + std::set rebootKeys = {"LowerVolt"}; for (const std::string &key : rebootKeys) { QObject::connect(toggles[key], &ToggleControl::toggleFlipped, [this]() { if (FrogPilotConfirmationDialog::toggle("Reboot required to take effect.", "Reboot Now", this)) {