Add DisableRadar_Allow param and settings toggle (#22329)
old-commit-hash: 8c01ae5716b558039946c07e63d42d16094037d2
This commit is contained in:
@@ -135,6 +135,7 @@ std::unordered_map<std::string, uint32_t> keys = {
|
||||
{"ControlsReady", CLEAR_ON_MANAGER_START | CLEAR_ON_PANDA_DISCONNECT | CLEAR_ON_IGNITION_ON},
|
||||
{"CurrentRoute", CLEAR_ON_MANAGER_START | CLEAR_ON_IGNITION_ON},
|
||||
{"DisablePowerDown", PERSISTENT},
|
||||
{"DisableRadar_Allow", PERSISTENT},
|
||||
{"DisableRadar", PERSISTENT}, // WARNING: THIS DISABLES AEB
|
||||
{"DisableUpdates", PERSISTENT},
|
||||
{"DongleId", PERSISTENT},
|
||||
|
||||
@@ -43,6 +43,9 @@ def manager_init():
|
||||
if params.get_bool("RecordFrontLock"):
|
||||
params.put_bool("RecordFront", True)
|
||||
|
||||
if not params.get_bool("DisableRadar_Allow"):
|
||||
params.delete("DisableRadar")
|
||||
|
||||
# set unset params
|
||||
for k, v in default_params:
|
||||
if params.get(k) is None:
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "selfdrive/ui/qt/qt_window.h"
|
||||
|
||||
TogglesPanel::TogglesPanel(QWidget *parent) : ListWidget(parent) {
|
||||
auto params = Params();
|
||||
addItem(new ParamControl("OpenpilotEnabledToggle",
|
||||
"Enable openpilot",
|
||||
"Use the openpilot system for adaptive cruise control and lane keep driver assistance. Your attention is required at all times to use this feature. Changing this setting takes effect when the car is powered off.",
|
||||
@@ -69,7 +70,6 @@ TogglesPanel::TogglesPanel(QWidget *parent) : ListWidget(parent) {
|
||||
"In this mode openpilot will ignore lanelines and just drive how it thinks a human would.",
|
||||
"../assets/offroad/icon_road.png",
|
||||
this));
|
||||
|
||||
#ifdef ENABLE_MAPS
|
||||
addItem(new ParamControl("NavSettingTime24h",
|
||||
"Show ETA in 24h format",
|
||||
@@ -77,8 +77,16 @@ TogglesPanel::TogglesPanel(QWidget *parent) : ListWidget(parent) {
|
||||
"../assets/offroad/icon_metric.png",
|
||||
this));
|
||||
#endif
|
||||
if (params.getBool("DisableRadar_Allow")) {
|
||||
addItem(new ParamControl("DisableRadar",
|
||||
"openpilot Longitudinal Control",
|
||||
"openpilot will disable the car's radar and will take over control of gas and brakes. Warnning: this disables AEB!",
|
||||
"../assets/offroad/icon_speed_limit.png",
|
||||
this));
|
||||
|
||||
bool record_lock = Params().getBool("RecordFrontLock");
|
||||
}
|
||||
|
||||
bool record_lock = params.getBool("RecordFrontLock");
|
||||
record_toggle->setEnabled(!record_lock);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user