mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-09-27 04:33:43 +08:00
Unified Engagement Mode: more
This commit is contained in:
@@ -43,4 +43,7 @@ DeveloperPanel::DeveloperPanel(SettingsWindow *parent) : ListWidget(parent) {
|
||||
|
||||
auto madsDisengageLateralOnBrakeToggle = new ParamControl("MadsDisengageLateralOnBrake", tr("MADS: Disengage Lateral on Brake"), "", "");
|
||||
addItem(madsDisengageLateralOnBrakeToggle);
|
||||
|
||||
auto madsUnifiedEngagementModeToggle = new ParamControl("MadsUnifiedEngagementMode", tr("MADS: Unified Engagement Mode"), "", "");
|
||||
addItem(madsUnifiedEngagementModeToggle);
|
||||
}
|
||||
|
||||
@@ -135,6 +135,10 @@
|
||||
<source>Modular Assistive Driving System (MADS)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>MADS: Unified Engagement Mode</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DevicePanel</name>
|
||||
|
||||
@@ -135,6 +135,10 @@
|
||||
<source>Modular Assistive Driving System (MADS)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>MADS: Unified Engagement Mode</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DevicePanel</name>
|
||||
|
||||
@@ -135,6 +135,10 @@
|
||||
<source>Modular Assistive Driving System (MADS)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>MADS: Unified Engagement Mode</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DevicePanel</name>
|
||||
|
||||
@@ -135,6 +135,10 @@
|
||||
<source>Modular Assistive Driving System (MADS)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>MADS: Unified Engagement Mode</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DevicePanel</name>
|
||||
|
||||
@@ -135,6 +135,10 @@
|
||||
<source>Modular Assistive Driving System (MADS)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>MADS: Unified Engagement Mode</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DevicePanel</name>
|
||||
|
||||
@@ -135,6 +135,10 @@
|
||||
<source>Modular Assistive Driving System (MADS)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>MADS: Unified Engagement Mode</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DevicePanel</name>
|
||||
|
||||
@@ -135,6 +135,10 @@
|
||||
<source>Modular Assistive Driving System (MADS)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>MADS: Unified Engagement Mode</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DevicePanel</name>
|
||||
|
||||
@@ -135,6 +135,10 @@
|
||||
<source>Modular Assistive Driving System (MADS)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>MADS: Unified Engagement Mode</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DevicePanel</name>
|
||||
|
||||
@@ -135,6 +135,10 @@
|
||||
<source>Modular Assistive Driving System (MADS)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>MADS: Unified Engagement Mode</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DevicePanel</name>
|
||||
|
||||
@@ -135,6 +135,10 @@
|
||||
<source>Modular Assistive Driving System (MADS)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>MADS: Unified Engagement Mode</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DevicePanel</name>
|
||||
|
||||
@@ -135,6 +135,10 @@
|
||||
<source>Modular Assistive Driving System (MADS)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>MADS: Unified Engagement Mode</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DevicePanel</name>
|
||||
|
||||
@@ -36,7 +36,6 @@ class ModifiedAssistDrivingSystem:
|
||||
return available
|
||||
|
||||
def update_events(self, CS: car.CarState):
|
||||
# TODO-SP: Handle pcmEnable and buttonEnable conditionally below
|
||||
self.selfdrive.events.remove(EventName.pcmDisable)
|
||||
self.selfdrive.events.remove(EventName.buttonCancel)
|
||||
|
||||
@@ -61,6 +60,12 @@ class ModifiedAssistDrivingSystem:
|
||||
if self.state_machine.state == State.paused and self.active:
|
||||
self.selfdrive.events.add(EventName.silentLkasEnable)
|
||||
|
||||
if (self.unified_engagement_mode and self.active) or not self.unified_engagement_mode:
|
||||
if self.selfdrive.events.has(EventName.pcmEnable):
|
||||
self.selfdrive.events.remove(EventName.pcmEnable)
|
||||
if self.selfdrive.events.has(EventName.buttonEnable):
|
||||
self.selfdrive.events.remove(EventName.buttonEnable)
|
||||
|
||||
for be in CS.buttonEvents:
|
||||
if be.type == ButtonType.cancel:
|
||||
if self.selfdrive.enabled_prev:
|
||||
|
||||
Reference in New Issue
Block a user