Skip to content

Commit

Permalink
FIREHOSE mode v0.1 (commaai#34496)
Browse files Browse the repository at this point in the history
* add toggle

* athena

* fix mypy
  • Loading branch information
adeebshihadeh authored Jan 29, 2025
1 parent bf4e917 commit 79e52ea
Show file tree
Hide file tree
Showing 14 changed files with 106 additions and 0 deletions.
1 change: 1 addition & 0 deletions common/params.cc
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ std::unordered_map<std::string, uint32_t> keys = {
{"ExperimentalLongitudinalEnabled", PERSISTENT | DEVELOPMENT_ONLY},
{"ExperimentalMode", PERSISTENT},
{"ExperimentalModeConfirmed", PERSISTENT},
{"FirehoseMode", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION},
{"FirmwareQueryDone", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION},
{"ForcePowerDown", PERSISTENT},
{"GitBranch", PERSISTENT},
Expand Down
14 changes: 14 additions & 0 deletions selfdrive/ui/qt/offroad/settings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,20 @@ TogglesPanel::TogglesPanel(SettingsWindow *parent) : ListWidget(parent) {
tr("When enabled, pressing the accelerator pedal will disengage openpilot."),
"../assets/offroad/icon_disengage_on_accelerator.svg",
},
{
"FirehoseMode",
tr("FIREHOSE Mode"),
tr("Enable <b>FIREHOSE Mode</b> to get your driving data in the training set.<br><br>"
"Follow these steps to get your device ready:<br>"
" 1. Bring your device inside and connect to a good USB-C adapter<br>"
" 2. Connect to Wi-Fi<br>"
" 3. Enable this toggle<br>"
" 4. Leave it connected for at least 30 minutes<br>"
"<br>"
"This toggle turns off once you restart your device. Repeat once a week for maximum effectiveness."
""),
"../assets/offroad/icon_warning.png",
},
{
"IsLdwEnabled",
tr("Enable Lane Departure Warnings"),
Expand Down
8 changes: 8 additions & 0 deletions selfdrive/ui/translations/main_ar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1093,6 +1093,14 @@ This may take up to a minute.</source>
<source>Enable driver monitoring even when openpilot is not engaged.</source>
<translation>تمكين مراقبة السائق حتى عندما لا يكون نظام OpenPilot مُفعّلاً.</translation>
</message>
<message>
<source>FIREHOSE Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enable &lt;b&gt;FIREHOSE Mode&lt;/b&gt; to get your driving data in the training set.&lt;br&gt;&lt;br&gt;Follow these steps to get your device ready:&lt;br&gt; 1. Bring your device inside and connect to a good USB-C adapter&lt;br&gt; 2. Connect to Wi-Fi&lt;br&gt; 3. Enable this toggle&lt;br&gt; 4. Leave it connected for at least 30 minutes&lt;br&gt;&lt;br&gt;This toggle turns off once you restart your device. Repeat once a week for maximum effectiveness.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Updater</name>
Expand Down
8 changes: 8 additions & 0 deletions selfdrive/ui/translations/main_de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1077,6 +1077,14 @@ This may take up to a minute.</source>
<source>Enable driver monitoring even when openpilot is not engaged.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>FIREHOSE Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enable &lt;b&gt;FIREHOSE Mode&lt;/b&gt; to get your driving data in the training set.&lt;br&gt;&lt;br&gt;Follow these steps to get your device ready:&lt;br&gt; 1. Bring your device inside and connect to a good USB-C adapter&lt;br&gt; 2. Connect to Wi-Fi&lt;br&gt; 3. Enable this toggle&lt;br&gt; 4. Leave it connected for at least 30 minutes&lt;br&gt;&lt;br&gt;This toggle turns off once you restart your device. Repeat once a week for maximum effectiveness.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Updater</name>
Expand Down
8 changes: 8 additions & 0 deletions selfdrive/ui/translations/main_es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1077,6 +1077,14 @@ Esto puede tardar un minuto.</translation>
<source>Enable the openpilot longitudinal control (alpha) toggle to allow Experimental mode.</source>
<translation>Activar el control longitudinal (fase experimental) para permitir el modo Experimental.</translation>
</message>
<message>
<source>FIREHOSE Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enable &lt;b&gt;FIREHOSE Mode&lt;/b&gt; to get your driving data in the training set.&lt;br&gt;&lt;br&gt;Follow these steps to get your device ready:&lt;br&gt; 1. Bring your device inside and connect to a good USB-C adapter&lt;br&gt; 2. Connect to Wi-Fi&lt;br&gt; 3. Enable this toggle&lt;br&gt; 4. Leave it connected for at least 30 minutes&lt;br&gt;&lt;br&gt;This toggle turns off once you restart your device. Repeat once a week for maximum effectiveness.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Updater</name>
Expand Down
8 changes: 8 additions & 0 deletions selfdrive/ui/translations/main_fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1077,6 +1077,14 @@ Cela peut prendre jusqu&apos;à une minute.</translation>
<source>Enable driver monitoring even when openpilot is not engaged.</source>
<translation>Activer la surveillance conducteur lorsque openpilot n&apos;est pas actif.</translation>
</message>
<message>
<source>FIREHOSE Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enable &lt;b&gt;FIREHOSE Mode&lt;/b&gt; to get your driving data in the training set.&lt;br&gt;&lt;br&gt;Follow these steps to get your device ready:&lt;br&gt; 1. Bring your device inside and connect to a good USB-C adapter&lt;br&gt; 2. Connect to Wi-Fi&lt;br&gt; 3. Enable this toggle&lt;br&gt; 4. Leave it connected for at least 30 minutes&lt;br&gt;&lt;br&gt;This toggle turns off once you restart your device. Repeat once a week for maximum effectiveness.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Updater</name>
Expand Down
8 changes: 8 additions & 0 deletions selfdrive/ui/translations/main_ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1073,6 +1073,14 @@ This may take up to a minute.</source>
<source>Enable driver monitoring even when openpilot is not engaged.</source>
<translation>openpilotが作動していない場合でも運転者モニタリングを有効にする。</translation>
</message>
<message>
<source>FIREHOSE Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enable &lt;b&gt;FIREHOSE Mode&lt;/b&gt; to get your driving data in the training set.&lt;br&gt;&lt;br&gt;Follow these steps to get your device ready:&lt;br&gt; 1. Bring your device inside and connect to a good USB-C adapter&lt;br&gt; 2. Connect to Wi-Fi&lt;br&gt; 3. Enable this toggle&lt;br&gt; 4. Leave it connected for at least 30 minutes&lt;br&gt;&lt;br&gt;This toggle turns off once you restart your device. Repeat once a week for maximum effectiveness.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Updater</name>
Expand Down
8 changes: 8 additions & 0 deletions selfdrive/ui/translations/main_ko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1073,6 +1073,14 @@ This may take up to a minute.</source>
<source>Enable driver monitoring even when openpilot is not engaged.</source>
<translation>Openpilot이 활성화되지 않은 경우에도 드라이버 모니터링을 활성화합니다.</translation>
</message>
<message>
<source>FIREHOSE Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enable &lt;b&gt;FIREHOSE Mode&lt;/b&gt; to get your driving data in the training set.&lt;br&gt;&lt;br&gt;Follow these steps to get your device ready:&lt;br&gt; 1. Bring your device inside and connect to a good USB-C adapter&lt;br&gt; 2. Connect to Wi-Fi&lt;br&gt; 3. Enable this toggle&lt;br&gt; 4. Leave it connected for at least 30 minutes&lt;br&gt;&lt;br&gt;This toggle turns off once you restart your device. Repeat once a week for maximum effectiveness.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Updater</name>
Expand Down
8 changes: 8 additions & 0 deletions selfdrive/ui/translations/main_pt-BR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1077,6 +1077,14 @@ Isso pode levar até um minuto.</translation>
<source>Enable driver monitoring even when openpilot is not engaged.</source>
<translation>Habilite o monitoramento do motorista mesmo quando o openpilot não estiver acionado.</translation>
</message>
<message>
<source>FIREHOSE Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enable &lt;b&gt;FIREHOSE Mode&lt;/b&gt; to get your driving data in the training set.&lt;br&gt;&lt;br&gt;Follow these steps to get your device ready:&lt;br&gt; 1. Bring your device inside and connect to a good USB-C adapter&lt;br&gt; 2. Connect to Wi-Fi&lt;br&gt; 3. Enable this toggle&lt;br&gt; 4. Leave it connected for at least 30 minutes&lt;br&gt;&lt;br&gt;This toggle turns off once you restart your device. Repeat once a week for maximum effectiveness.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Updater</name>
Expand Down
8 changes: 8 additions & 0 deletions selfdrive/ui/translations/main_th.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1073,6 +1073,14 @@ This may take up to a minute.</source>
<source>Enable driver monitoring even when openpilot is not engaged.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>FIREHOSE Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enable &lt;b&gt;FIREHOSE Mode&lt;/b&gt; to get your driving data in the training set.&lt;br&gt;&lt;br&gt;Follow these steps to get your device ready:&lt;br&gt; 1. Bring your device inside and connect to a good USB-C adapter&lt;br&gt; 2. Connect to Wi-Fi&lt;br&gt; 3. Enable this toggle&lt;br&gt; 4. Leave it connected for at least 30 minutes&lt;br&gt;&lt;br&gt;This toggle turns off once you restart your device. Repeat once a week for maximum effectiveness.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Updater</name>
Expand Down
8 changes: 8 additions & 0 deletions selfdrive/ui/translations/main_tr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1071,6 +1071,14 @@ This may take up to a minute.</source>
<source>Enable driver monitoring even when openpilot is not engaged.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>FIREHOSE Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enable &lt;b&gt;FIREHOSE Mode&lt;/b&gt; to get your driving data in the training set.&lt;br&gt;&lt;br&gt;Follow these steps to get your device ready:&lt;br&gt; 1. Bring your device inside and connect to a good USB-C adapter&lt;br&gt; 2. Connect to Wi-Fi&lt;br&gt; 3. Enable this toggle&lt;br&gt; 4. Leave it connected for at least 30 minutes&lt;br&gt;&lt;br&gt;This toggle turns off once you restart your device. Repeat once a week for maximum effectiveness.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Updater</name>
Expand Down
8 changes: 8 additions & 0 deletions selfdrive/ui/translations/main_zh-CHS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1073,6 +1073,14 @@ This may take up to a minute.</source>
<source>Enable driver monitoring even when openpilot is not engaged.</source>
<translation>即使在openpilot未激活时也启用驾驶员监控。</translation>
</message>
<message>
<source>FIREHOSE Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enable &lt;b&gt;FIREHOSE Mode&lt;/b&gt; to get your driving data in the training set.&lt;br&gt;&lt;br&gt;Follow these steps to get your device ready:&lt;br&gt; 1. Bring your device inside and connect to a good USB-C adapter&lt;br&gt; 2. Connect to Wi-Fi&lt;br&gt; 3. Enable this toggle&lt;br&gt; 4. Leave it connected for at least 30 minutes&lt;br&gt;&lt;br&gt;This toggle turns off once you restart your device. Repeat once a week for maximum effectiveness.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Updater</name>
Expand Down
8 changes: 8 additions & 0 deletions selfdrive/ui/translations/main_zh-CHT.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1073,6 +1073,14 @@ This may take up to a minute.</source>
<source>Enable driver monitoring even when openpilot is not engaged.</source>
<translation>即使在openpilot未激活時也啟用駕駛監控。</translation>
</message>
<message>
<source>FIREHOSE Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enable &lt;b&gt;FIREHOSE Mode&lt;/b&gt; to get your driving data in the training set.&lt;br&gt;&lt;br&gt;Follow these steps to get your device ready:&lt;br&gt; 1. Bring your device inside and connect to a good USB-C adapter&lt;br&gt; 2. Connect to Wi-Fi&lt;br&gt; 3. Enable this toggle&lt;br&gt; 4. Leave it connected for at least 30 minutes&lt;br&gt;&lt;br&gt;This toggle turns off once you restart your device. Repeat once a week for maximum effectiveness.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Updater</name>
Expand Down
3 changes: 3 additions & 0 deletions system/athena/athenad.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,9 @@ def getSshAuthorizedKeys() -> str:
def getGithubUsername() -> str:
return Params().get("GithubUsername", encoding='utf8') or ''

@dispatcher.add_method
def getFirehoseMode() -> bool:
return Params().get_bool("FirehoseMode") or False

@dispatcher.add_method
def getSimInfo():
Expand Down

0 comments on commit 79e52ea

Please sign in to comment.