From 08def4a4c8b8950b68f2de2a634ff335c1652322 Mon Sep 17 00:00:00 2001 From: BogGyver Date: Tue, 8 Nov 2022 15:38:09 -0500 Subject: [PATCH 1/4] Pedal tune down --- selfdrive/car/tesla/tunes.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/selfdrive/car/tesla/tunes.py b/selfdrive/car/tesla/tunes.py index a765dc22c..98d85c7e1 100644 --- a/selfdrive/car/tesla/tunes.py +++ b/selfdrive/car/tesla/tunes.py @@ -56,13 +56,13 @@ def set_long_tune(tune, name): tune.kpBP = [0.0, 5.0, 22.0, 35.0] tune.kiBP = [0.0, 5.0, 22.0, 35.0] tune.kpV = [0.75, 0.75, 0.75, 0.75] - tune.kiV = [0.07, 0.07, 0.07, 0.07] + tune.kiV = [0.07, 0.05, 0.03, 0.01] # Default longitudinal tune elif name == LongTunes.IBST: tune.kpBP = [0.0, 5.0, 22.0, 35.0] tune.kiBP = [0.0, 5.0, 22.0, 35.0] - tune.kpV = [0.60, 0.60, 0.60, 0.60] - tune.kiV = [0.07, 0.07, 0.07, 0.07] + tune.kpV = [0.50, 0.50, 0.45, 0.40] + tune.kiV = [0.05, 0.04, 0.03, 0.01] elif name == LongTunes.ACC: tune.kpBP = [0] tune.kiBP = [0] From 824fa0143babb298b501e2e4b142bdaa2a2bf044 Mon Sep 17 00:00:00 2001 From: BogGyver Date: Tue, 8 Nov 2022 17:48:16 -0500 Subject: [PATCH 2/4] tuning pedal some more --- selfdrive/car/tesla/pedal_calibrator/calibratePedal.py | 9 +++++++++ selfdrive/car/tesla/tunes.py | 8 ++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/selfdrive/car/tesla/pedal_calibrator/calibratePedal.py b/selfdrive/car/tesla/pedal_calibrator/calibratePedal.py index 61873ed4f..a6e193aa4 100755 --- a/selfdrive/car/tesla/pedal_calibrator/calibratePedal.py +++ b/selfdrive/car/tesla/pedal_calibrator/calibratePedal.py @@ -296,6 +296,9 @@ def run(self,rate=100): #self.brakePressed = bool(self.cp.vl["BrakeMessage"]["driverBrakeStatus"] != 1) if not self.brakePressed: self.show_error(4) + if self.pedal_enabled == 1: + self.create_pedal_command_msg(0, 0, self.pedal_can) + self.pedal_enabled = 0 continue #Gear @@ -303,12 +306,18 @@ def run(self,rate=100): #self.gear_neutral = self.gearShifter == car.CarState.GearShifter.neutral if not self.gear_neutral: self.show_error(2) + if self.pedal_enabled == 1: + self.create_pedal_command_msg(0, 0, self.pedal_can) + self.pedal_enabled = 0 continue #DI Pedal Level #self.di_gas = self.cp.vl["DI_torque1"]["DI_pedalPos"] if self.di_gas > 0 and self.status < 3: self.show_error(3) + if self.pedal_enabled == 1: + self.create_pedal_command_msg(0, 0, self.pedal_can) + self.pedal_enabled = 0 continue #Pedal Msg diff --git a/selfdrive/car/tesla/tunes.py b/selfdrive/car/tesla/tunes.py index 98d85c7e1..1b6620678 100644 --- a/selfdrive/car/tesla/tunes.py +++ b/selfdrive/car/tesla/tunes.py @@ -41,8 +41,8 @@ def transform_di_to_pedal(val): ] #MPH 0 3 16 33 55 90 ACCEL_LOOKUP_BP = [ 0.0, 1.3, 7.5, 15.0, 25.0, 40.0] -ACCEL_MAX_LOOKUP_V = [[0.3, 0.5, 0.9, 0.7, 0.6, 0.5], #1-Chill - [0.3, 0.6, 1.2, 1.0, 0.8, 0.6], #2-Standard +ACCEL_MAX_LOOKUP_V = [[0.3, 0.7, 0.9, 0.7, 0.6, 0.5], #1-Chill + [0.3, 0.9, 1.2, 1.0, 0.8, 0.6], #2-Standard [0.3, 1.6, 1.9, 1.5, 1.2, 1.0], #3-MadMax ] ACCEL_MIN_LOOKUP_V = [TESLA_MIN_ACCEL, TESLA_MIN_ACCEL, TESLA_MIN_ACCEL, TESLA_MIN_ACCEL, TESLA_MIN_ACCEL, TESLA_MIN_ACCEL] @@ -56,13 +56,13 @@ def set_long_tune(tune, name): tune.kpBP = [0.0, 5.0, 22.0, 35.0] tune.kiBP = [0.0, 5.0, 22.0, 35.0] tune.kpV = [0.75, 0.75, 0.75, 0.75] - tune.kiV = [0.07, 0.05, 0.03, 0.01] + tune.kiV = [0.07, 0.07, 0.07, 0.07] # Default longitudinal tune elif name == LongTunes.IBST: tune.kpBP = [0.0, 5.0, 22.0, 35.0] tune.kiBP = [0.0, 5.0, 22.0, 35.0] tune.kpV = [0.50, 0.50, 0.45, 0.40] - tune.kiV = [0.05, 0.04, 0.03, 0.01] + tune.kiV = [0.05, 0.05, 0.05, 0.05] elif name == LongTunes.ACC: tune.kpBP = [0] tune.kiBP = [0] From e3d8467f886488f548e848cae5e080cbd88bf89c Mon Sep 17 00:00:00 2001 From: BogGyver Date: Tue, 8 Nov 2022 17:58:44 -0500 Subject: [PATCH 3/4] change braking map --- selfdrive/car/tesla/PCC_module.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/car/tesla/PCC_module.py b/selfdrive/car/tesla/PCC_module.py index 7b4423041..57fb1d573 100644 --- a/selfdrive/car/tesla/PCC_module.py +++ b/selfdrive/car/tesla/PCC_module.py @@ -318,7 +318,7 @@ def update_pdl( PEDAL_MAX_DOWN = MAX_PEDAL_VALUE * _DT / 0.4 PEDAL_MAX_UP = (MAX_PEDAL_VALUE - self.prev_tesla_pedal) * _DT - BRAKE_LOOKUP_BP = [-3.5, 0.] + BRAKE_LOOKUP_BP = [-4.5, 0.] BRAKE_LOOKUP_V = [ 1.0, 0.] enable_pedal = 1.0 if self.enable_pedal_cruise else 0.0 From c29942613518ff7d807f9db453b1e266124096da Mon Sep 17 00:00:00 2001 From: msentesy <103088873+msentesy@users.noreply.github.com> Date: Tue, 8 Nov 2022 22:08:02 -0500 Subject: [PATCH 4/4] Skip Date Check Allows a rebooted EON to run even if the date is incorrect. Prevents need to connect to network upon restarting. --- selfdrive/thermald/thermald.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/thermald/thermald.py b/selfdrive/thermald/thermald.py index bb3739bff..86c4765f2 100755 --- a/selfdrive/thermald/thermald.py +++ b/selfdrive/thermald/thermald.py @@ -331,7 +331,7 @@ def thermald_thread(end_event, hw_queue): # Ensure date/time are valid now = datetime.datetime.utcnow() - startup_conditions["time_valid"] = (now.year > 2020) or (now.year == 2020 and now.month >= 10) + startup_conditions["time_valid"] = (now.year > 1020) or (now.year == 1020 and now.month >= 10) set_offroad_alert_if_changed("Offroad_InvalidTime", (not startup_conditions["time_valid"])) startup_conditions["up_to_date"] = params.get("Offroad_ConnectivityNeeded") is None or params.get_bool("DisableUpdates") or params.get_bool("SnoozeUpdate")