Lower Volt enable speed

Co-Authored-By: Eric Brown <13560103+nworb-cire@users.noreply.github.com>
This commit is contained in:
FrogAi
2024-02-27 16:34:47 -07:00
parent 3c3120cec1
commit a864072d97
4 changed files with 5 additions and 2 deletions

View File

@@ -286,6 +286,7 @@ std::unordered_map<std::string, uint32_t> keys = {
{"LongitudinalTune", PERSISTENT}, {"LongitudinalTune", PERSISTENT},
{"LongPitch", PERSISTENT}, {"LongPitch", PERSISTENT},
{"LoudBlindspotAlert", PERSISTENT}, {"LoudBlindspotAlert", PERSISTENT},
{"LowerVolt", PERSISTENT},
{"ManualUpdateInitiated", CLEAR_ON_MANAGER_START}, {"ManualUpdateInitiated", CLEAR_ON_MANAGER_START},
{"ModelUI", PERSISTENT}, {"ModelUI", PERSISTENT},
{"MuteOverheated", PERSISTENT}, {"MuteOverheated", PERSISTENT},

View File

@@ -171,6 +171,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

@@ -112,6 +112,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", "GM Truck Gas Tune", "Increase acceleration and smoothen brake to stop. For use on Silverado/Sierra only.", ""}, {"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.", ""}, {"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.", ""},
{"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", ""}, {"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<std::string> rebootKeys = {"GasRegenCmd"}; std::set<std::string> rebootKeys = {"GasRegenCmd", "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 (started) { if (started) {

View File

@@ -28,7 +28,7 @@ private:
std::map<std::string, ParamControl*> toggles; std::map<std::string, ParamControl*> toggles;
std::set<QString> gmKeys = {"GasRegenCmd", "LongPitch"}; std::set<QString> gmKeys = {"GasRegenCmd", "LongPitch", "LowerVolt"};
std::set<QString> subaruKeys = {}; std::set<QString> subaruKeys = {};
std::set<QString> toyotaKeys = {"LockDoors", "LongitudinalTune"}; std::set<QString> toyotaKeys = {"LockDoors", "LongitudinalTune"};