diff --git a/LICENSE.md b/LICENSE.md index e7062d77cf..650b6f55b3 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,10 +1,10 @@ # Custom MIT License -Copyright 2024 Haibin Wen, SUNNYPILOT LLC +Copyright (c) 2024, Haibin Wen, SUNNYPILOT LLC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to view and modify the Software, subject to the following conditions: -1. **Permission Required**: Use of the Software, in whole or in part, for any purpose requires explicit written permission from the original author(s). +1. **Permission Required**: Permission Required for Commercial, For-Profit, or Closed Source Use: Use of the Software, in whole or in part, for any commercial purposes, for-profit projects, or in closed source projects requires explicit written permission from the original author(s). 2. **Redistribution**: Any redistribution of the Software, modified or unmodified, must retain this license notice and the following acknowledgment: "This software is licensed under a custom license requiring permission for use." @@ -12,9 +12,9 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of 3. **Visibility**: Any project that uses the Software must visibly mention the following acknowledgment: "This project uses software from Haibin Wen and SUNNYPILOT LLC and is licensed under a custom license requiring permission for use." -4. **No Warranty**: The Software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the Software or the use or other dealings in the Software. +4. **No Warranty**: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -Contact sunnypilot Support for permission requests. +Contact sunnypilot Support for permission requests. --- diff --git a/selfdrive/car/honda/interface.py b/selfdrive/car/honda/interface.py index af294a63a7..05bd2a6393 100755 --- a/selfdrive/car/honda/interface.py +++ b/selfdrive/car/honda/interface.py @@ -288,20 +288,24 @@ class CarInterface(CarInterfaceBase): else: self.CS.madsEnabled = False - if not self.CP.pcmCruise or (self.CP.pcmCruise and self.CP.minEnableSpeed > 0) or not self.CP.pcmCruiseSpeed: + min_enable_speed_pcm = self.CP.pcmCruise and self.CP.minEnableSpeed > 0 + + if not self.CP.pcmCruise or min_enable_speed_pcm or not self.CP.pcmCruiseSpeed: if any(b.type == ButtonType.cancel for b in self.CS.button_events): self.CS.madsEnabled, self.CS.accEnabled = self.get_sp_cancel_cruise_state(self.CS.madsEnabled) if self.get_sp_pedal_disengage(ret): self.CS.madsEnabled, self.CS.accEnabled = self.get_sp_cancel_cruise_state(self.CS.madsEnabled) - ret.cruiseState.enabled = ret.cruiseState.enabled if not self.enable_mads else False if self.CP.pcmCruise else self.CS.accEnabled + ret.cruiseState.enabled = ret.cruiseState.enabled if not self.enable_mads or (min_enable_speed_pcm and self.CP.pcmCruiseSpeed) \ + else False if self.CP.pcmCruise \ + else self.CS.accEnabled - if self.CP.pcmCruise and self.CP.minEnableSpeed > 0 and self.CP.pcmCruiseSpeed: + if min_enable_speed_pcm and self.CP.pcmCruiseSpeed: if ret.gasPressed and not ret.cruiseState.enabled: self.CS.accEnabled = False self.CS.accEnabled = ret.cruiseState.enabled or self.CS.accEnabled ret, self.CS = self.get_sp_common_state(ret, self.CS, - min_enable_speed_pcm=(self.CP.pcmCruise and self.CP.minEnableSpeed > 0 and self.CP.pcmCruiseSpeed), + min_enable_speed_pcm=(min_enable_speed_pcm and self.CP.pcmCruiseSpeed), gap_button=(self.CS.cruise_setting == 3)) ret.buttonEvents = [ diff --git a/selfdrive/ui/translations/main_ar.ts b/selfdrive/ui/translations/main_ar.ts index 28610a671e..7dae31a53e 100644 --- a/selfdrive/ui/translations/main_ar.ts +++ b/selfdrive/ui/translations/main_ar.ts @@ -1517,22 +1517,6 @@ This may take up to a minute. Smoother longitudinal performance for Toyota/Lexus TSS2/LSS2 cars. Big thanks to dragonpilot-community for this implementation. - - Enable Automatic Brake Hold (AHB) - - - - WARNING: Only for Toyota/Lexus vehicles with TSS2/LSS2. USE AT YOUR OWN RISK. - - - - When you stop the vehicle completely by depressing the brake pedal, sunnypilot will activate Auto Brake Hold. - - - - Changing this setting takes effect when the car is powered off. - - Enable Enhanced Blind Spot Monitor diff --git a/selfdrive/ui/translations/main_de.ts b/selfdrive/ui/translations/main_de.ts index ab80c261fd..6b8fd1efc1 100644 --- a/selfdrive/ui/translations/main_de.ts +++ b/selfdrive/ui/translations/main_de.ts @@ -1499,22 +1499,6 @@ This may take up to a minute. Smoother longitudinal performance for Toyota/Lexus TSS2/LSS2 cars. Big thanks to dragonpilot-community for this implementation. - - Enable Automatic Brake Hold (AHB) - - - - WARNING: Only for Toyota/Lexus vehicles with TSS2/LSS2. USE AT YOUR OWN RISK. - - - - When you stop the vehicle completely by depressing the brake pedal, sunnypilot will activate Auto Brake Hold. - - - - Changing this setting takes effect when the car is powered off. - - Enable Enhanced Blind Spot Monitor diff --git a/selfdrive/ui/translations/main_es.ts b/selfdrive/ui/translations/main_es.ts index 90fc8381c9..6527ddfc12 100644 --- a/selfdrive/ui/translations/main_es.ts +++ b/selfdrive/ui/translations/main_es.ts @@ -1505,22 +1505,6 @@ Esto puede tardar hasta un minuto. Smoother longitudinal performance for Toyota/Lexus TSS2/LSS2 cars. Big thanks to dragonpilot-community for this implementation. - - Enable Automatic Brake Hold (AHB) - - - - WARNING: Only for Toyota/Lexus vehicles with TSS2/LSS2. USE AT YOUR OWN RISK. - - - - When you stop the vehicle completely by depressing the brake pedal, sunnypilot will activate Auto Brake Hold. - - - - Changing this setting takes effect when the car is powered off. - - Enable Enhanced Blind Spot Monitor diff --git a/selfdrive/ui/translations/main_fr.ts b/selfdrive/ui/translations/main_fr.ts index 22b5808a62..0071a33e47 100644 --- a/selfdrive/ui/translations/main_fr.ts +++ b/selfdrive/ui/translations/main_fr.ts @@ -1501,22 +1501,6 @@ Cela peut prendre jusqu'à une minute. Smoother longitudinal performance for Toyota/Lexus TSS2/LSS2 cars. Big thanks to dragonpilot-community for this implementation. - - Enable Automatic Brake Hold (AHB) - - - - WARNING: Only for Toyota/Lexus vehicles with TSS2/LSS2. USE AT YOUR OWN RISK. - - - - When you stop the vehicle completely by depressing the brake pedal, sunnypilot will activate Auto Brake Hold. - - - - Changing this setting takes effect when the car is powered off. - - Enable Enhanced Blind Spot Monitor diff --git a/selfdrive/ui/translations/main_ja.ts b/selfdrive/ui/translations/main_ja.ts index 0ffade1416..5db645c9f4 100644 --- a/selfdrive/ui/translations/main_ja.ts +++ b/selfdrive/ui/translations/main_ja.ts @@ -1495,22 +1495,6 @@ This may take up to a minute. Smoother longitudinal performance for Toyota/Lexus TSS2/LSS2 cars. Big thanks to dragonpilot-community for this implementation. - - Enable Automatic Brake Hold (AHB) - - - - WARNING: Only for Toyota/Lexus vehicles with TSS2/LSS2. USE AT YOUR OWN RISK. - - - - When you stop the vehicle completely by depressing the brake pedal, sunnypilot will activate Auto Brake Hold. - - - - Changing this setting takes effect when the car is powered off. - - Enable Enhanced Blind Spot Monitor diff --git a/selfdrive/ui/translations/main_ko.ts b/selfdrive/ui/translations/main_ko.ts index 337f338633..1a55d59a3b 100644 --- a/selfdrive/ui/translations/main_ko.ts +++ b/selfdrive/ui/translations/main_ko.ts @@ -1497,22 +1497,6 @@ This may take up to a minute. Smoother longitudinal performance for Toyota/Lexus TSS2/LSS2 cars. Big thanks to dragonpilot-community for this implementation. - - Enable Automatic Brake Hold (AHB) - - - - WARNING: Only for Toyota/Lexus vehicles with TSS2/LSS2. USE AT YOUR OWN RISK. - - - - When you stop the vehicle completely by depressing the brake pedal, sunnypilot will activate Auto Brake Hold. - - - - Changing this setting takes effect when the car is powered off. - - Enable Enhanced Blind Spot Monitor diff --git a/selfdrive/ui/translations/main_pt-BR.ts b/selfdrive/ui/translations/main_pt-BR.ts index 63d83d7448..856ef26ca8 100644 --- a/selfdrive/ui/translations/main_pt-BR.ts +++ b/selfdrive/ui/translations/main_pt-BR.ts @@ -1501,22 +1501,6 @@ Isso pode levar até um minuto. Smoother longitudinal performance for Toyota/Lexus TSS2/LSS2 cars. Big thanks to dragonpilot-community for this implementation. - - Enable Automatic Brake Hold (AHB) - - - - WARNING: Only for Toyota/Lexus vehicles with TSS2/LSS2. USE AT YOUR OWN RISK. - - - - When you stop the vehicle completely by depressing the brake pedal, sunnypilot will activate Auto Brake Hold. - - - - Changing this setting takes effect when the car is powered off. - - Enable Enhanced Blind Spot Monitor diff --git a/selfdrive/ui/translations/main_th.ts b/selfdrive/ui/translations/main_th.ts index a0ed3caf37..220b6575c4 100644 --- a/selfdrive/ui/translations/main_th.ts +++ b/selfdrive/ui/translations/main_th.ts @@ -1497,22 +1497,6 @@ This may take up to a minute. Smoother longitudinal performance for Toyota/Lexus TSS2/LSS2 cars. Big thanks to dragonpilot-community for this implementation. - - Enable Automatic Brake Hold (AHB) - - - - WARNING: Only for Toyota/Lexus vehicles with TSS2/LSS2. USE AT YOUR OWN RISK. - - - - When you stop the vehicle completely by depressing the brake pedal, sunnypilot will activate Auto Brake Hold. - - - - Changing this setting takes effect when the car is powered off. - - Enable Enhanced Blind Spot Monitor diff --git a/selfdrive/ui/translations/main_tr.ts b/selfdrive/ui/translations/main_tr.ts index 07205a2b12..a8c3992fd2 100644 --- a/selfdrive/ui/translations/main_tr.ts +++ b/selfdrive/ui/translations/main_tr.ts @@ -1495,22 +1495,6 @@ This may take up to a minute. Smoother longitudinal performance for Toyota/Lexus TSS2/LSS2 cars. Big thanks to dragonpilot-community for this implementation. - - Enable Automatic Brake Hold (AHB) - - - - WARNING: Only for Toyota/Lexus vehicles with TSS2/LSS2. USE AT YOUR OWN RISK. - - - - When you stop the vehicle completely by depressing the brake pedal, sunnypilot will activate Auto Brake Hold. - - - - Changing this setting takes effect when the car is powered off. - - Enable Enhanced Blind Spot Monitor diff --git a/selfdrive/ui/translations/main_zh-CHS.ts b/selfdrive/ui/translations/main_zh-CHS.ts index da8e79536c..fddf413a50 100644 --- a/selfdrive/ui/translations/main_zh-CHS.ts +++ b/selfdrive/ui/translations/main_zh-CHS.ts @@ -1497,22 +1497,6 @@ This may take up to a minute. Smoother longitudinal performance for Toyota/Lexus TSS2/LSS2 cars. Big thanks to dragonpilot-community for this implementation. - - Enable Automatic Brake Hold (AHB) - - - - WARNING: Only for Toyota/Lexus vehicles with TSS2/LSS2. USE AT YOUR OWN RISK. - - - - When you stop the vehicle completely by depressing the brake pedal, sunnypilot will activate Auto Brake Hold. - - - - Changing this setting takes effect when the car is powered off. - - Enable Enhanced Blind Spot Monitor diff --git a/selfdrive/ui/translations/main_zh-CHT.ts b/selfdrive/ui/translations/main_zh-CHT.ts index 6c93b6239a..684447b113 100644 --- a/selfdrive/ui/translations/main_zh-CHT.ts +++ b/selfdrive/ui/translations/main_zh-CHT.ts @@ -1497,22 +1497,6 @@ This may take up to a minute. Smoother longitudinal performance for Toyota/Lexus TSS2/LSS2 cars. Big thanks to dragonpilot-community for this implementation. - - Enable Automatic Brake Hold (AHB) - - - - WARNING: Only for Toyota/Lexus vehicles with TSS2/LSS2. USE AT YOUR OWN RISK. - - - - When you stop the vehicle completely by depressing the brake pedal, sunnypilot will activate Auto Brake Hold. - - - - Changing this setting takes effect when the car is powered off. - - Enable Enhanced Blind Spot Monitor