Compare commits

...

1 Commits

Author SHA1 Message Date
whoisdomi 68429f5451 Engine Sound Pack 2026-11-24 10:01:02 -06:00
394 changed files with 6417 additions and 126 deletions
+5 -1
View File
@@ -140,6 +140,7 @@ class CarState(CarStateBase):
self.dashboard_limit = LimitTracker()
self.dashboard_stop_sign = None
self.drive_mode = None
self.accelerator_pedal = None
self.ioniq6_bsm_sources = (Ioniq6BlindspotSources()
if CP.carFingerprint == CAR.HYUNDAI_IONIQ_6 and CP.openpilotLongitudinalControl else None)
self.ioniq6_bsm_now_ns = 0
@@ -435,7 +436,10 @@ class CarState(CarStateBase):
speed_factor = CV.KPH_TO_MS if self.is_metric else CV.MPH_TO_MS
if self.CP.flags & (HyundaiFlags.EV.value | HyundaiFlags.HYBRID.value):
ret.gasPressed = cp.vl[self.accelerator_msg_canfd]["ACCELERATOR_PEDAL"] > 1e-5
pedal = cp.vl[self.accelerator_msg_canfd]["ACCELERATOR_PEDAL"]
ret.gasPressed = pedal > 1e-5
stamp = cp.ts_nanos[self.accelerator_msg_canfd]["ACCELERATOR_PEDAL"]
self.accelerator_pedal = (float(pedal), stamp) if stamp > 0 else None
else:
ret.gasPressed = bool(cp.vl[self.accelerator_msg_canfd]["ACCELERATOR_PEDAL_PRESSED"])
+1
View File
@@ -223,6 +223,7 @@ struct StarPilotCarState @0xf35cc4560bbf6ec2 {
steeringLimitInfo @39 :StarPilotCarControl.SteeringLimitInfo;
toyotaCruise @38 :ToyotaCruise;
gmRegenGear @40 :Bool;
acceleratorPedal @41 :Float32; # driver pedal travel, 0..1; 0 when the platform doesn't publish it
struct ToyotaCruise {
version @0 :UInt16;
+3
View File
@@ -163,6 +163,9 @@ inline static std::unordered_map<std::string, ParamKeyAttributes> keys = {
{"BlindSpotMetrics", {PERSISTENT, BOOL, "1"}},
{"GreenLightAlert", {PERSISTENT, BOOL, "0"}},
{"LeadDepartingAlert", {PERSISTENT, BOOL, "0"}},
{"EngineSound", {PERSISTENT, BOOL, "0"}},
{"EngineSoundProfile", {PERSISTENT, STRING, "lfa"}},
{"EngineSoundVolume", {PERSISTENT, INT, "60"}},
{"LoudBlindspotAlert", {PERSISTENT, BOOL, "0"}},
{"LoudBlindspotAlertWhenDisengaged", {PERSISTENT, BOOL, "0"}},
{"LoudBlindspotAlertMuteAtStandstill", {PERSISTENT, BOOL, "0"}},
@@ -23505,4 +23505,82 @@ msgstr ""
#: openpilot/starpilot/galaxy/web/js/spotify.js
msgid "Storage & Account"
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Plays a simulated engine on the car speakers that follows the accelerator pedal."
msgstr ""
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Engine Type"
msgstr ""
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Chooses which engine is simulated."
msgstr ""
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Engine Sound Volume"
msgstr ""
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Sets how loud the engine is before the car's own volume control."
msgstr ""
#: openpilot/starpilot/galaxy/setting_descriptions.py
msgid "Plays a simulated engine on the car speakers that follows the accelerator pedal, including revving in Park or Neutral. Uses the audio output chosen under Spotify and Phone Audio, and goes quiet while an alert sounds."
msgstr ""
#: openpilot/starpilot/engine_sound/profiles.py
msgid "BMW M3"
msgstr ""
#: openpilot/starpilot/engine_sound/profiles.py
msgid "BMW M3 Deep"
msgstr ""
#: openpilot/starpilot/engine_sound/profiles.py
msgid "F1 Car"
msgstr ""
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Ferrari F136"
msgstr ""
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Hellcat"
msgstr ""
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Ioniq 5N Ignition"
msgstr ""
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Jaguar F-Type"
msgstr ""
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Nissan Super GT1"
msgstr ""
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Nissan Super GT2"
msgstr ""
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Supra Turbo"
msgstr ""
#: openpilot/starpilot/engine_sound/profiles.py
msgid "LFA"
msgstr ""
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Engine Sounds"
msgstr ""
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Plays on the car speakers through the Spotify and Phone Audio output."
msgstr ""
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Choose an engine; it revs once so you can hear it."
msgstr ""
@@ -23517,3 +23517,82 @@ msgstr "Lenkung und Tasten"
msgid "Storage & Account"
msgstr "Speicher und Konto"
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Plays a simulated engine on the car speakers that follows the accelerator pedal."
msgstr "Spielt über die Fahrzeuglautsprecher einen simulierten Motor ab, der dem Gaspedal folgt."
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Engine Type"
msgstr "Motortyp"
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Chooses which engine is simulated."
msgstr "Wählt den simulierten Motor."
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Engine Sound Volume"
msgstr "Lautstärke des Motorsounds"
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Sets how loud the engine is before the car's own volume control."
msgstr "Legt die Lautstärke des Motors vor der Lautstärkeregelung des Fahrzeugs fest."
#: openpilot/starpilot/galaxy/setting_descriptions.py
msgid "Plays a simulated engine on the car speakers that follows the accelerator pedal, including revving in Park or Neutral. Uses the audio output chosen under Spotify and Phone Audio, and goes quiet while an alert sounds."
msgstr "Spielt über die Fahrzeuglautsprecher einen simulierten Motor ab, der dem Gaspedal folgt, auch beim Hochdrehen in Parkstellung oder Neutral. Nutzt die unter Spotify und Telefon-Audio gewählte Audioausgabe und verstummt, solange ein Warnton ertönt."
#: openpilot/starpilot/engine_sound/profiles.py
msgid "BMW M3"
msgstr "BMW M3"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "BMW M3 Deep"
msgstr "BMW M3 Deep"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "F1 Car"
msgstr "F1 Car"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Ferrari F136"
msgstr "Ferrari F136"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Hellcat"
msgstr "Hellcat"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Ioniq 5N Ignition"
msgstr "Ioniq 5N Ignition"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Jaguar F-Type"
msgstr "Jaguar F-Type"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Nissan Super GT1"
msgstr "Nissan Super GT1"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Nissan Super GT2"
msgstr "Nissan Super GT2"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Supra Turbo"
msgstr "Supra Turbo"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "LFA"
msgstr "LFA"
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Engine Sounds"
msgstr "Motorsounds"
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Plays on the car speakers through the Spotify and Phone Audio output."
msgstr "Spielt über die Fahrzeuglautsprecher mit der unter Spotify und Telefon-Audio gewählten Ausgabe."
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Choose an engine; it revs once so you can hear it."
msgstr "Wähle einen Motor; er dreht einmal hoch, damit du ihn hörst."
@@ -23517,3 +23517,82 @@ msgstr "Dirección y botones"
msgid "Storage & Account"
msgstr "Almacenamiento y cuenta"
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Plays a simulated engine on the car speakers that follows the accelerator pedal."
msgstr "Reproduce un motor simulado en los altavoces del coche que sigue el pedal del acelerador."
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Engine Type"
msgstr "Tipo de motor"
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Chooses which engine is simulated."
msgstr "Elige qué motor se simula."
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Engine Sound Volume"
msgstr "Volumen del sonido del motor"
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Sets how loud the engine is before the car's own volume control."
msgstr "Ajusta el volumen del motor antes del control de volumen del propio coche."
#: openpilot/starpilot/galaxy/setting_descriptions.py
msgid "Plays a simulated engine on the car speakers that follows the accelerator pedal, including revving in Park or Neutral. Uses the audio output chosen under Spotify and Phone Audio, and goes quiet while an alert sounds."
msgstr "Reproduce un motor simulado en los altavoces del coche que sigue el pedal del acelerador, incluso al acelerar en Estacionamiento o Punto muerto. Usa la salida de audio elegida en Spotify y audio del teléfono, y se silencia mientras suena una alerta."
#: openpilot/starpilot/engine_sound/profiles.py
msgid "BMW M3"
msgstr "BMW M3"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "BMW M3 Deep"
msgstr "BMW M3 Deep"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "F1 Car"
msgstr "F1 Car"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Ferrari F136"
msgstr "Ferrari F136"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Hellcat"
msgstr "Hellcat"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Ioniq 5N Ignition"
msgstr "Ioniq 5N Ignition"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Jaguar F-Type"
msgstr "Jaguar F-Type"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Nissan Super GT1"
msgstr "Nissan Super GT1"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Nissan Super GT2"
msgstr "Nissan Super GT2"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Supra Turbo"
msgstr "Supra Turbo"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "LFA"
msgstr "LFA"
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Engine Sounds"
msgstr "Sonidos del motor"
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Plays on the car speakers through the Spotify and Phone Audio output."
msgstr "Suena en los altavoces del coche a través de la salida de Spotify y audio del teléfono."
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Choose an engine; it revs once so you can hear it."
msgstr "Elige un motor; acelera una vez para que puedas oírlo."
@@ -23517,3 +23517,82 @@ msgstr "Direction et boutons"
msgid "Storage & Account"
msgstr "Stockage et compte"
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Plays a simulated engine on the car speakers that follows the accelerator pedal."
msgstr "Diffuse un moteur simulé sur les haut-parleurs de la voiture qui suit la pédale d'accélérateur."
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Engine Type"
msgstr "Type de moteur"
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Chooses which engine is simulated."
msgstr "Choisit le moteur simulé."
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Engine Sound Volume"
msgstr "Volume du son du moteur"
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Sets how loud the engine is before the car's own volume control."
msgstr "Règle le volume du moteur avant le réglage de volume de la voiture."
#: openpilot/starpilot/galaxy/setting_descriptions.py
msgid "Plays a simulated engine on the car speakers that follows the accelerator pedal, including revving in Park or Neutral. Uses the audio output chosen under Spotify and Phone Audio, and goes quiet while an alert sounds."
msgstr "Diffuse un moteur simulé sur les haut-parleurs de la voiture qui suit la pédale d'accélérateur, y compris les montées en régime en Parking ou au Point mort. Utilise la sortie audio choisie dans Spotify et audio du téléphone, et se tait pendant une alerte."
#: openpilot/starpilot/engine_sound/profiles.py
msgid "BMW M3"
msgstr "BMW M3"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "BMW M3 Deep"
msgstr "BMW M3 Deep"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "F1 Car"
msgstr "F1 Car"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Ferrari F136"
msgstr "Ferrari F136"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Hellcat"
msgstr "Hellcat"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Ioniq 5N Ignition"
msgstr "Ioniq 5N Ignition"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Jaguar F-Type"
msgstr "Jaguar F-Type"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Nissan Super GT1"
msgstr "Nissan Super GT1"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Nissan Super GT2"
msgstr "Nissan Super GT2"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Supra Turbo"
msgstr "Supra Turbo"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "LFA"
msgstr "LFA"
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Engine Sounds"
msgstr "Sons du moteur"
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Plays on the car speakers through the Spotify and Phone Audio output."
msgstr "Diffusé sur les haut-parleurs de la voiture via la sortie Spotify et audio du téléphone."
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Choose an engine; it revs once so you can hear it."
msgstr "Choisissez un moteur ; il monte une fois en régime pour que vous l'entendiez."
@@ -23513,3 +23513,82 @@ msgstr "ステアリングとボタン"
msgid "Storage & Account"
msgstr "ストレージとアカウント"
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Plays a simulated engine on the car speakers that follows the accelerator pedal."
msgstr "アクセルペダルに合わせて、車のスピーカーで疑似エンジン音を再生します。"
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Engine Type"
msgstr "エンジンの種類"
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Chooses which engine is simulated."
msgstr "再現するエンジンを選びます。"
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Engine Sound Volume"
msgstr "エンジンサウンドの音量"
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Sets how loud the engine is before the car's own volume control."
msgstr "車側の音量調整の前に、エンジン音の大きさを設定します。"
#: openpilot/starpilot/galaxy/setting_descriptions.py
msgid "Plays a simulated engine on the car speakers that follows the accelerator pedal, including revving in Park or Neutral. Uses the audio output chosen under Spotify and Phone Audio, and goes quiet while an alert sounds."
msgstr "アクセルペダルに合わせて、車のスピーカーで疑似エンジン音を再生します。パーキングやニュートラルでの空ぶかしにも対応します。「Spotifyとスマホ音声」で選んだ音声出力を使い、警告音が鳴っている間は消音します。"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "BMW M3"
msgstr "BMW M3"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "BMW M3 Deep"
msgstr "BMW M3 Deep"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "F1 Car"
msgstr "F1 Car"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Ferrari F136"
msgstr "Ferrari F136"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Hellcat"
msgstr "Hellcat"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Ioniq 5N Ignition"
msgstr "Ioniq 5N Ignition"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Jaguar F-Type"
msgstr "Jaguar F-Type"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Nissan Super GT1"
msgstr "Nissan Super GT1"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Nissan Super GT2"
msgstr "Nissan Super GT2"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Supra Turbo"
msgstr "Supra Turbo"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "LFA"
msgstr "LFA"
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Engine Sounds"
msgstr "エンジンサウンド"
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Plays on the car speakers through the Spotify and Phone Audio output."
msgstr "「Spotifyとスマホ音声」の出力から車のスピーカーで再生します。"
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Choose an engine; it revs once so you can hear it."
msgstr "エンジンを選ぶと、一度空ぶかしして音を確認できます。"
@@ -23513,3 +23513,82 @@ msgstr "조향 및 버튼"
msgid "Storage & Account"
msgstr "저장 공간 및 계정"
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Plays a simulated engine on the car speakers that follows the accelerator pedal."
msgstr "가속 페달에 맞춰 차량 스피커로 가상 엔진 소리를 재생합니다."
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Engine Type"
msgstr "엔진 종류"
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Chooses which engine is simulated."
msgstr "재현할 엔진을 선택합니다."
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Engine Sound Volume"
msgstr "엔진 사운드 음량"
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Sets how loud the engine is before the car's own volume control."
msgstr "차량 자체 음량 조절 전에 엔진 소리 크기를 설정합니다."
#: openpilot/starpilot/galaxy/setting_descriptions.py
msgid "Plays a simulated engine on the car speakers that follows the accelerator pedal, including revving in Park or Neutral. Uses the audio output chosen under Spotify and Phone Audio, and goes quiet while an alert sounds."
msgstr "가속 페달에 맞춰 차량 스피커로 가상 엔진 소리를 재생하며, P 또는 N에서 공회전 레브도 지원합니다. Spotify 및 휴대폰 오디오에서 선택한 오디오 출력을 사용하며, 경고음이 울리는 동안에는 소리가 꺼집니다."
#: openpilot/starpilot/engine_sound/profiles.py
msgid "BMW M3"
msgstr "BMW M3"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "BMW M3 Deep"
msgstr "BMW M3 Deep"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "F1 Car"
msgstr "F1 Car"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Ferrari F136"
msgstr "Ferrari F136"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Hellcat"
msgstr "Hellcat"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Ioniq 5N Ignition"
msgstr "Ioniq 5N Ignition"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Jaguar F-Type"
msgstr "Jaguar F-Type"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Nissan Super GT1"
msgstr "Nissan Super GT1"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Nissan Super GT2"
msgstr "Nissan Super GT2"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Supra Turbo"
msgstr "Supra Turbo"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "LFA"
msgstr "LFA"
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Engine Sounds"
msgstr "엔진 사운드"
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Plays on the car speakers through the Spotify and Phone Audio output."
msgstr "Spotify 및 휴대폰 오디오 출력을 통해 차량 스피커로 재생합니다."
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Choose an engine; it revs once so you can hear it."
msgstr "엔진을 선택하면 한 번 레브되어 소리를 들을 수 있습니다."
@@ -23513,3 +23513,82 @@ msgstr "Đánh lái và nút bấm"
msgid "Storage & Account"
msgstr "Bộ nhớ và tài khoản"
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Plays a simulated engine on the car speakers that follows the accelerator pedal."
msgstr "Phát âm thanh động cơ mô phỏng trên loa xe, theo bàn đạp ga."
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Engine Type"
msgstr "Loại động cơ"
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Chooses which engine is simulated."
msgstr "Chọn động cơ được mô phỏng."
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Engine Sound Volume"
msgstr "Âm lượng âm thanh động cơ"
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Sets how loud the engine is before the car's own volume control."
msgstr "Đặt độ lớn của âm thanh động cơ trước núm âm lượng của xe."
#: openpilot/starpilot/galaxy/setting_descriptions.py
msgid "Plays a simulated engine on the car speakers that follows the accelerator pedal, including revving in Park or Neutral. Uses the audio output chosen under Spotify and Phone Audio, and goes quiet while an alert sounds."
msgstr "Phát âm thanh động cơ mô phỏng trên loa xe theo bàn đạp ga, kể cả khi rồ ga ở số P hoặc N. Dùng đầu ra âm thanh đã chọn trong Spotify và âm thanh điện thoại, và tắt tiếng khi có cảnh báo."
#: openpilot/starpilot/engine_sound/profiles.py
msgid "BMW M3"
msgstr "BMW M3"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "BMW M3 Deep"
msgstr "BMW M3 Deep"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "F1 Car"
msgstr "F1 Car"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Ferrari F136"
msgstr "Ferrari F136"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Hellcat"
msgstr "Hellcat"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Ioniq 5N Ignition"
msgstr "Ioniq 5N Ignition"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Jaguar F-Type"
msgstr "Jaguar F-Type"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Nissan Super GT1"
msgstr "Nissan Super GT1"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Nissan Super GT2"
msgstr "Nissan Super GT2"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "Supra Turbo"
msgstr "Supra Turbo"
#: openpilot/starpilot/engine_sound/profiles.py
msgid "LFA"
msgstr "LFA"
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Engine Sounds"
msgstr "Âm thanh động cơ"
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Plays on the car speakers through the Spotify and Phone Audio output."
msgstr "Phát trên loa xe qua đầu ra Spotify và âm thanh điện thoại."
#: openpilot/starpilot/ui/sounds_owner.py
msgid "Choose an engine; it revs once so you can hear it."
msgstr "Chọn một động cơ; động cơ sẽ rồ ga một lần để bạn nghe thử."
+20 -7
View File
@@ -7,6 +7,7 @@ from openpilot.starpilot.car.mazda.dashboard import write_stop_sign
DRIVE_MODE_MAX_AGE_NS = 2_000_000_000
DRIVE_MODE_ECO = 4
DRIVE_MODE_SPORT = 5
ACCELERATOR_PEDAL_FULL = 254.0 # highest raw value seen at full travel on the Ioniq 6
def capable(cp):
@@ -17,16 +18,28 @@ def compose(cp, parsed, state, message, *, car_state_stamp):
if not capable(cp):
return message
message = write_stop_sign(parsed, state, message, car_state_stamp=car_state_stamp)
return write_drive_mode(parsed, state, message)
message = write_drive_mode(parsed, state, message)
return write_accelerator_pedal(parsed, state, message)
def _fresh(observation, state):
if type(observation) is not tuple or len(observation) != 2 or not state.canValid or state.canTimeout:
return None
value, stamp = observation
age = time.clock_gettime_ns(getattr(time, 'CLOCK_BOOTTIME', time.CLOCK_MONOTONIC)) - stamp
return value if 0 <= age <= DRIVE_MODE_MAX_AGE_NS else None
def write_accelerator_pedal(parsed, state, message):
pedal = _fresh(getattr(parsed, 'accelerator_pedal', None), state)
if pedal is not None:
message.starpilotCarState.acceleratorPedal = min(max(pedal / ACCELERATOR_PEDAL_FULL, 0.0), 1.0)
return message
def write_drive_mode(parsed, state, message):
observation = getattr(parsed, 'drive_mode', None)
if type(observation) is not tuple or len(observation) != 2 or not state.canValid or state.canTimeout:
return message
mode, stamp = observation
age = time.clock_gettime_ns(getattr(time, 'CLOCK_BOOTTIME', time.CLOCK_MONOTONIC)) - stamp
if 0 <= age <= DRIVE_MODE_MAX_AGE_NS:
mode = _fresh(getattr(parsed, 'drive_mode', None), state)
if mode is not None:
message.starpilotCarState.ecoGear = mode == DRIVE_MODE_ECO
message.starpilotCarState.sportGear = mode == DRIVE_MODE_SPORT
return message
@@ -4,7 +4,7 @@ from dataclasses import dataclass
from opendbc.car.gm.profiles import profiles_supported as gm_profiles_supported
import hashlib
from openpilot.starpilot.conditional_mode.manual import EXPERIMENTAL_MODE_ACTION, TRAFFIC_MODE_ACTION, ioniq6_media_eligible
from openpilot.starpilot.conditional_mode.manual import ACTION_COUNT, EXPERIMENTAL_MODE_ACTION, TRAFFIC_MODE_ACTION, ioniq6_media_eligible
from openpilot.starpilot.conditional_mode.preferences import MAX_DOCUMENT_BYTES, PreferenceError, decode_preferences
from openpilot.starpilot.saved_document import WriteResult, commit_exact
from openpilot.starpilot.saved_source import read_saved
@@ -22,7 +22,7 @@ SAFE_KEY = "SafeMode"
MAX_SCALAR_BYTES = 8
CHOICES = {"Off": b"0", "Cycle conditional mode": str(EXPERIMENTAL_MODE_ACTION).encode(),
"Toggle traffic mode": str(TRAFFIC_MODE_ACTION).encode(), "Switchback Mode": b"7"}
_CANONICAL_ACTIONS = frozenset(str(value).encode() for value in range(16))
_CANONICAL_ACTIONS = frozenset(str(value).encode() for value in range(ACTION_COUNT))
@dataclass(frozen=True)
@@ -23,6 +23,7 @@ from openpilot.starpilot.saved_source import read_saved
EXPERIMENTAL_MODE_ACTION = 5
TRAFFIC_MODE_ACTION = 6
ACTION_COUNT = 18
VERY_LONG_PRESS = 5 * CRUISE_LONG_PRESS
MEDIA_LONG_NS = CRUISE_LONG_PRESS * 10_000_000 # Convert 100 Hz ticks to source-packet nanoseconds.
MEDIA_VERY_LONG_NS = VERY_LONG_PRESS * 10_000_000
@@ -108,7 +109,7 @@ def _action(params, key: str) -> int | None:
if raw is None:
return 0
# Registered INT defaults and Params::put values are canonical decimal.
if raw not in tuple(str(value).encode() for value in range(16)):
if raw not in tuple(str(value).encode() for value in range(ACTION_COUNT)):
return None
return int(raw)
@@ -9,7 +9,8 @@ from openpilot.selfdrive.car.card import Car
from openpilot.selfdrive.car.tests.publication_fixture import initialize_publication_sources
from openpilot.selfdrive.car.cruise import CRUISE_LONG_PRESS, VCruiseHelper
from openpilot.selfdrive.car.tests.test_hyundai_aol import candidate
from openpilot.starpilot.controllers.wheel_actions import ACTIONS, KEYS, SCREEN_OFF_ACTION, WheelConsumer, WheelPublisher, capture
from openpilot.starpilot.controllers.wheel_actions import (ACTIONS, ENGINE_SOUND_ACTIONS, KEYS, SCREEN_OFF_ACTION, WheelConsumer,
WheelPublisher, capture)
TYPE = car.CarState.ButtonEvent.Type
@@ -53,7 +54,7 @@ def context(tmp_path):
def test_exact_catalog_and_missing_vs_saved_off(context):
params, _ = context
assert sorted(ACTIONS.values()) == list(range(16))
assert sorted(ACTIONS.values()) == list(range(18))
assert ACTIONS["Toggle Screen Off"] == SCREEN_OFF_ACTION
assert len(KEYS) == 15
assert capture(params)['DistanceButtonControl'] == 1
@@ -79,7 +80,8 @@ def test_screen_off_is_directly_assignable_without_longitudinal_control(context)
assert capture(params)[key] == SCREEN_OFF_ACTION
@pytest.mark.parametrize('key,code', [('DistanceButtonControl', code) for code in (1, 2, 5, 6, 7, 8, 11, 12, 13, 14, SCREEN_OFF_ACTION)])
@pytest.mark.parametrize('key,code', [('DistanceButtonControl', code) for code in (1, 2, 5, 6, 7, 8, 11, 12, 13, 14, SCREEN_OFF_ACTION,
*ENGINE_SOUND_ACTIONS)])
def test_real_distance_short_delivers_once_and_claims_serialized_release(context, key, code):
params, cp = context
params.put(key, code, block=True)
@@ -15,9 +15,11 @@ ACTIONS = {
"Off": 0, "Cycle personality": 1, "Force coast": 2, "Pause steering": 3, "Pause longitudinal": 4,
"Experimental override": 5, "Traffic mode": 6, "Switchback Mode": 7, "Bookmark": 8,
"Toggle AOL": 9, "Adopt speed limit": 10, "Quick Select 1": 11, "Quick Select 2": 12,
"Quick Select 3": 13, "Pulse and glide": 14, "Toggle Screen Off": SCREEN_OFF_ACTION,
"Quick Select 3": 13, "Pulse and glide": 14, "Toggle Screen Off": SCREEN_OFF_ACTION, "Toggle Engine Sounds": 16,
"Next Engine Sound": 17,
}
ACTION_VALUES = frozenset(str(value).encode() for value in ACTIONS.values())
ENGINE_SOUND_ACTIONS = (16, 17)
KEYS = ("LKASButtonControl", "MainCruiseButtonControl", "DistanceButtonControl", "LongDistanceButtonControl",
"VeryLongDistanceButtonControl", "CancelButtonControl", "LongCancelButtonControl", "VeryLongCancelButtonControl",
"ModeButtonControl", "LongModeButtonControl", "VeryLongModeButtonControl", "StarButtonControl",
@@ -25,7 +27,7 @@ KEYS = ("LKASButtonControl", "MainCruiseButtonControl", "DistanceButtonControl",
PADDLE_KEY = "LeftPaddleButtonControl"
LIFETIME_NS = 250_000_000
SESSION = re.compile(r"[0-9a-f]{32}\Z")
DELIVERED_ACTIONS = frozenset((1, 2, 5, 6, 7, 8, 10, 11, 12, 13, 14, SCREEN_OFF_ACTION))
DELIVERED_ACTIONS = frozenset((1, 2, 5, 6, 7, 8, 10, 11, 12, 13, 14, SCREEN_OFF_ACTION, *ENGINE_SOUND_ACTIONS))
DEFAULTS = {"DistanceButtonControl": 1, "LongDistanceButtonControl": 5, "VeryLongDistanceButtonControl": 6}
BUTTON_KEYS = {
Button.LKAS: (KEYS[0],), Button.DISTANCE: KEYS[2:5], Button.MODE: KEYS[8:11], Button.CUSTOM: KEYS[11:14],
@@ -0,0 +1,62 @@
The loops in these banks were rendered with tools/make_bank.py, then lowered with tools/lower_bank.py
at its default settings.
From the engine scripts of engine-sim (https://github.com/ange-yaghi/engine-sim,
commit 85f7c3b959a908ed5232ede4f1a4ac7eafe6b630), recorded with tools/esrec:
f1_car assets/engines/atg-video-2/12_ferrari_412_t2.mr
ferrari_f136 assets/engines/atg-video-2/08_ferrari_f136_v8.mr
lfa assets/engines/atg-video-2/10_lfa_v10.mr
supra_turbo assets/engines/atg-video-2/03_2jz.mr, its off_3450 loop then lowered 6.1 dB to the level of its neighbours
bmw_m3 assets/engines/bmw/M52B28.mr, lowered again with tools/lower_bank.py --pitch 1.15 --bass 3 --treble -3
--off-mix 0 --off-mid 0
bmw_m3_deep assets/engines/bmw/M52B28.mr, lowered again with tools/lower_bank.py --pitch 1.5 --bass 8 --treble -9
--off-mix 0 --off-mid 0
From recordings of real cars supplied for this project, built with tools/bank_from_recording.py:
hellcat hellcat.wav: --cylinders 8 --anchor 14 700 --idle 10.5-17.5 --on 25-94 --off 94-119,
then equalised with tools/lower_bank.py --pitch 1.0 --off-mix 0 --off-mid 0
ioniq_5n Ioniq5.mp3 (the Ioniq 5 N's Ignition sound), its closing video fade from 52 s divided back out first:
--cylinders 6 (the comb's strongest line is the 6th) --half-orders --anchor 6 6180 --anchor 20.5 7140
--on 4.6-6.8 10.2-11.7 16-17.3 17.6-21.3 31.5-33.4 34-35.2 35.6-37.9 41.5-43.3 43.5-44.6 46-48.2
--off 12-14.3 22.6-25.1 48.5-49.9 50.3-57.9 --idle 57.9-59.7 --denoise 15, leaving out the stretches with
tyre squeal
jaguar_ftype Jaguar2.wav: --cylinders 8 --half-orders --anchor 17 721 --anchor 40 5122 --anchor 66 4402
--idle 14.5-19.5 --on 20.5-45.8 52-77 --denoise 10, not equalised (the in-car recording is already
bass-heavy); the 750 rpm loop (a second idle) and the 3500 rpm loop (dominated by crank-rate boom) removed
nissan_super_gt NissanSuperGT.wav: --cylinders 8 --half-orders, rpm labelled as 120 x the spacing of its harmonic
comb (whether that is rpm/120 or rpm/60 cannot be told from the recording; the profile uses the same
units, so the pitch is right either way), pinned with --anchor at every 0.25 s point whose comb
measured clearly, --idle 18.6-19.6 --on 9-17 19.7-65 79.4-88.2 --off 9-17 65-71 74.2-76 79.4-88.2,
then the recording's wind hiss lowered 18 dB between the engine orders (fading in from 500 Hz, full
from 1 kHz up) and equalised with tools/lower_bank.py --pitch 1.0 --bass 4 --treble -8 --off-mix 0
--off-mid 0
nissan_super_gt2 the same loops, hiss lowered the same way, equalised with tools/lower_bank.py --pitch 1.3 --bass 6
--treble -10 --off-mix 0 --off-mid 0
turbo/blowoff.wav is the blow-off flutter from 11.89-14.45 s of flutter.wav, a recording supplied for this project,
with the recording's own engine taken out from under it (high-passed at 180 Hz and its steady spectrum subtracted).
pops/burble_grains.wav is the 62 pops of the two overrun bursts at 6.35-7.5 s and 9.85-11.3 s of burbles.wav, a
recording supplied for this project: 52 ms from 2 ms before each pop, band-passed 100 Hz-20 kHz, each normalised.
engine-sim is distributed under the following license:
MIT License
Copyright 2022 AngeTheGreat (Ange Yaghi)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
Software.
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.
@@ -0,0 +1,114 @@
{
"version": 1,
"source": "engine-sim engines/bmw/M52B28.mr",
"layers": {
"on": [
{
"rpm": 1208,
"file": "on_1208.wav"
},
{
"rpm": 2070,
"file": "on_2070.wav"
},
{
"rpm": 2932,
"file": "on_2932.wav"
},
{
"rpm": 3795,
"file": "on_3795.wav"
},
{
"rpm": 4658,
"file": "on_4658.wav"
},
{
"rpm": 5520,
"file": "on_5520.wav"
},
{
"rpm": 6382,
"file": "on_6382.wav"
},
{
"rpm": 7245,
"file": "on_7245.wav"
},
{
"rpm": 8107,
"file": "on_8107.wav"
},
{
"rpm": 8970,
"file": "on_8970.wav"
},
{
"rpm": 9832,
"file": "on_9832.wav"
},
{
"rpm": 10695,
"file": "on_10695.wav"
},
{
"rpm": 11558,
"file": "on_11558.wav"
}
],
"off": [
{
"rpm": 1208,
"file": "off_1208.wav"
},
{
"rpm": 2070,
"file": "off_2070.wav"
},
{
"rpm": 2932,
"file": "off_2932.wav"
},
{
"rpm": 3795,
"file": "off_3795.wav"
},
{
"rpm": 4658,
"file": "off_4658.wav"
},
{
"rpm": 5520,
"file": "off_5520.wav"
},
{
"rpm": 6382,
"file": "off_6382.wav"
},
{
"rpm": 7245,
"file": "off_7245.wav"
},
{
"rpm": 8107,
"file": "off_8107.wav"
},
{
"rpm": 8970,
"file": "off_8970.wav"
},
{
"rpm": 9832,
"file": "off_9832.wav"
},
{
"rpm": 10695,
"file": "off_10695.wav"
},
{
"rpm": 11558,
"file": "off_11558.wav"
}
]
}
}
@@ -0,0 +1,114 @@
{
"version": 1,
"source": "engine-sim engines/bmw/M52B28.mr",
"layers": {
"on": [
{
"rpm": 1575,
"file": "on_1575.wav"
},
{
"rpm": 2700,
"file": "on_2700.wav"
},
{
"rpm": 3825,
"file": "on_3825.wav"
},
{
"rpm": 4950,
"file": "on_4950.wav"
},
{
"rpm": 6075,
"file": "on_6075.wav"
},
{
"rpm": 7200,
"file": "on_7200.wav"
},
{
"rpm": 8325,
"file": "on_8325.wav"
},
{
"rpm": 9450,
"file": "on_9450.wav"
},
{
"rpm": 10575,
"file": "on_10575.wav"
},
{
"rpm": 11700,
"file": "on_11700.wav"
},
{
"rpm": 12825,
"file": "on_12825.wav"
},
{
"rpm": 13950,
"file": "on_13950.wav"
},
{
"rpm": 15075,
"file": "on_15075.wav"
}
],
"off": [
{
"rpm": 1575,
"file": "off_1575.wav"
},
{
"rpm": 2700,
"file": "off_2700.wav"
},
{
"rpm": 3825,
"file": "off_3825.wav"
},
{
"rpm": 4950,
"file": "off_4950.wav"
},
{
"rpm": 6075,
"file": "off_6075.wav"
},
{
"rpm": 7200,
"file": "off_7200.wav"
},
{
"rpm": 8325,
"file": "off_8325.wav"
},
{
"rpm": 9450,
"file": "off_9450.wav"
},
{
"rpm": 10575,
"file": "off_10575.wav"
},
{
"rpm": 11700,
"file": "off_11700.wav"
},
{
"rpm": 12825,
"file": "off_12825.wav"
},
{
"rpm": 13950,
"file": "off_13950.wav"
},
{
"rpm": 15075,
"file": "off_15075.wav"
}
]
}
}
@@ -0,0 +1,138 @@
{
"version": 1,
"source": "engine-sim engines/atg-video-2/12_ferrari_412_t2.mr",
"layers": {
"on": [
{
"rpm": 3000,
"file": "on_3000.wav"
},
{
"rpm": 4500,
"file": "on_4500.wav"
},
{
"rpm": 6000,
"file": "on_6000.wav"
},
{
"rpm": 7500,
"file": "on_7500.wav"
},
{
"rpm": 9000,
"file": "on_9000.wav"
},
{
"rpm": 10500,
"file": "on_10500.wav"
},
{
"rpm": 12000,
"file": "on_12000.wav"
},
{
"rpm": 13500,
"file": "on_13500.wav"
},
{
"rpm": 15000,
"file": "on_15000.wav"
},
{
"rpm": 16500,
"file": "on_16500.wav"
},
{
"rpm": 18000,
"file": "on_18000.wav"
},
{
"rpm": 19500,
"file": "on_19500.wav"
},
{
"rpm": 21000,
"file": "on_21000.wav"
},
{
"rpm": 22500,
"file": "on_22500.wav"
},
{
"rpm": 24000,
"file": "on_24000.wav"
},
{
"rpm": 25500,
"file": "on_25500.wav"
}
],
"off": [
{
"rpm": 3000,
"file": "off_3000.wav"
},
{
"rpm": 4500,
"file": "off_4500.wav"
},
{
"rpm": 6000,
"file": "off_6000.wav"
},
{
"rpm": 7500,
"file": "off_7500.wav"
},
{
"rpm": 9000,
"file": "off_9000.wav"
},
{
"rpm": 10500,
"file": "off_10500.wav"
},
{
"rpm": 12000,
"file": "off_12000.wav"
},
{
"rpm": 13500,
"file": "off_13500.wav"
},
{
"rpm": 15000,
"file": "off_15000.wav"
},
{
"rpm": 16500,
"file": "off_16500.wav"
},
{
"rpm": 18000,
"file": "off_18000.wav"
},
{
"rpm": 19500,
"file": "off_19500.wav"
},
{
"rpm": 21000,
"file": "off_21000.wav"
},
{
"rpm": 22500,
"file": "off_22500.wav"
},
{
"rpm": 24000,
"file": "off_24000.wav"
},
{
"rpm": 25500,
"file": "off_25500.wav"
}
]
}
}

Some files were not shown because too many files have changed in this diff Show More