Lower Volt enable speed

Co-Authored-By: Eric Brown <13560103+nworb-cire@users.noreply.github.com>
This commit is contained in:
FrogAi
2024-01-12 22:39:30 -07:00
parent 8df01962fa
commit 1a2f936da5
3 changed files with 4 additions and 1 deletions

View File

@@ -261,6 +261,7 @@ std::unordered_map<std::string, uint32_t> keys = {
{"LockDoors", PERSISTENT}, {"LockDoors", PERSISTENT},
{"LongitudinalTune", PERSISTENT}, {"LongitudinalTune", PERSISTENT},
{"LongPitch", PERSISTENT}, {"LongPitch", PERSISTENT},
{"LowerVolt", PERSISTENT},
{"ModelUI", PERSISTENT}, {"ModelUI", PERSISTENT},
{"MuteDM", PERSISTENT}, {"MuteDM", PERSISTENT},
{"MuteDoor", PERSISTENT}, {"MuteDoor", PERSISTENT},

View File

@@ -160,6 +160,7 @@ class CarInterface(CarInterfaceBase):
ret.longitudinalActuatorDelayUpperBound = 0.5 # large delay to initially start braking ret.longitudinalActuatorDelayUpperBound = 0.5 # large delay to initially start braking
if candidate in (CAR.VOLT, CAR.VOLT_CC): if candidate in (CAR.VOLT, CAR.VOLT_CC):
ret.minEnableSpeed = -1 if params.get_bool("LowerVolt") else ret.minEnableSpeed
ret.mass = 1607. ret.mass = 1607.
ret.wheelbase = 2.69 ret.wheelbase = 2.69
ret.steerRatio = 17.7 # Stock 15.7, LiveParameters ret.steerRatio = 17.7 # Stock 15.7, LiveParameters

View File

@@ -101,6 +101,7 @@ FrogPilotVehiclesPanel::FrogPilotVehiclesPanel(SettingsWindow *parent) : FrogPil
std::vector<std::tuple<QString, QString, QString, QString>> vehicleToggles { std::vector<std::tuple<QString, QString, QString, QString>> vehicleToggles {
{"GasRegenCmd", "Gas Regen Cmd", "", ""}, {"GasRegenCmd", "Gas Regen Cmd", "", ""},
{"LongPitch", "Long Pitch Compensation", "Reduce speed and acceleration error for greater passenger comfort and improved vehicle efficiency.", ""}, {"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.", ""}, {"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"}; gmKeys = {"GasRegenCmd", "LongPitch"};
toyotaKeys = {}; toyotaKeys = {};
std::set<std::string> rebootKeys = {}; std::set<std::string> rebootKeys = {"LowerVolt"};
for (const std::string &key : rebootKeys) { for (const std::string &key : rebootKeys) {
QObject::connect(toggles[key], &ToggleControl::toggleFlipped, [this]() { QObject::connect(toggles[key], &ToggleControl::toggleFlipped, [this]() {
if (FrogPilotConfirmationDialog::toggle("Reboot required to take effect.", "Reboot Now", this)) { if (FrogPilotConfirmationDialog::toggle("Reboot required to take effect.", "Reboot Now", this)) {