mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-21 00:03:45 +08:00
disable op long
This commit is contained in:
@@ -2134,6 +2134,13 @@
|
||||
"data_type": "bool",
|
||||
"ui_type": "toggle"
|
||||
},
|
||||
{
|
||||
"key": "DisableOpenpilotLongitudinal",
|
||||
"label": "Disable openpilot Longitudinal",
|
||||
"description": "Use the vehicle's stock longitudinal control instead of openpilot longitudinal control. This can stop openpilot from sending cruise-control acceleration and braking commands on supported vehicles.",
|
||||
"data_type": "bool",
|
||||
"ui_type": "toggle"
|
||||
},
|
||||
{
|
||||
"key": "GMPedalLongitudinal",
|
||||
"label": "Use Pedal For Longitudinal",
|
||||
|
||||
@@ -3651,12 +3651,13 @@ def setup(app):
|
||||
return jsonify({"error": f"Parameter '{key}' is not editable."}), 403
|
||||
|
||||
# 1. Prevent changing the model or reboot-required toggles while the car is actively driving
|
||||
reboot_keys = {"Model", "DrivingModel", "AlwaysOnLateral", "ForceTorqueController", "NNFF", "NNFFLite"}
|
||||
reboot_keys = {"Model", "DrivingModel", "AlwaysOnLateral", "DisableOpenpilotLongitudinal", "ForceTorqueController", "NNFF", "NNFFLite"}
|
||||
if key in reboot_keys and params.get_bool("IsOnroad"):
|
||||
friendly_names = {
|
||||
"Model": "Driving Model",
|
||||
"DrivingModel": "Driving Model",
|
||||
"AlwaysOnLateral": "Always On Lateral",
|
||||
"DisableOpenpilotLongitudinal": "Disable openpilot Longitudinal",
|
||||
"ForceTorqueController": "Force Torque Controller",
|
||||
"NNFF": "NNFF",
|
||||
"NNFFLite": "NNFF-Lite"
|
||||
|
||||
Reference in New Issue
Block a user