Lower Volt enable speed
Co-Authored-By: Eric Brown <13560103+nworb-cire@users.noreply.github.com>
This commit is contained in:
@@ -261,6 +261,7 @@ std::unordered_map<std::string, uint32_t> keys = {
|
||||
{"LockDoors", PERSISTENT},
|
||||
{"LongitudinalTune", PERSISTENT},
|
||||
{"LongPitch", PERSISTENT},
|
||||
{"LowerVolt", PERSISTENT},
|
||||
{"ModelUI", PERSISTENT},
|
||||
{"MuteDM", PERSISTENT},
|
||||
{"MuteDoor", PERSISTENT},
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -101,6 +101,7 @@ FrogPilotVehiclesPanel::FrogPilotVehiclesPanel(SettingsWindow *parent) : FrogPil
|
||||
std::vector<std::tuple<QString, QString, QString, QString>> 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<std::string> rebootKeys = {};
|
||||
std::set<std::string> 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)) {
|
||||
|
||||
Reference in New Issue
Block a user