From 0dbe64ed739a86c873240302a6b1610133e99465 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Thu, 24 Feb 2022 00:51:33 -0800 Subject: [PATCH] same order same order --- selfdrive/controls/controlsd.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/selfdrive/controls/controlsd.py b/selfdrive/controls/controlsd.py index e087f99c43..dc0d716db0 100755 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -193,13 +193,13 @@ class Controls: self.events.add(EventName.controlsInitializing) return + # Disable on rising edge of gas or brake. Also disable on brake when speed > 0 + if (CS.gasPressed and self.active) or (CS.brakePressed and not CS.standstill): + self.events.add(EventName.pedalPressed) + self.events.add_from_msg(CS.events) self.events.add_from_msg(self.sm['driverMonitoringState'].events) - # Disable on rising edge of gas or brake. Also disable on brake when speed > 0. - if CS.gasPressed or (CS.brakePressed and not CS.standstill): - self.events.add(EventName.pedalPressed) - # Create events for battery, temperature, disk space, and memory if EON and (self.sm['peripheralState'].pandaType != PandaType.uno) and \ self.sm['deviceState'].batteryPercent < 1 and self.sm['deviceState'].chargingError: