add adb toggle to developerPanel (#34459)

* add adb toggle to developerPanel

* translations + toggleOrder

* initial docs

* move adb.sh into toggle

* finish up docs

* QProcess

* adbToggle h

* translations

* vanish translations

* description

* tr

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
pull/34482/head
Mauricio Alvarez Leon 3 months ago committed by GitHub
parent 754882c985
commit c57f535238
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 16
      docs/how-to/connect-to-comma.md
  2. 11
      selfdrive/debug/adb.sh
  3. 5
      selfdrive/ui/qt/offroad/developer_panel.cc
  4. 1
      selfdrive/ui/qt/offroad/developer_panel.h
  5. 8
      selfdrive/ui/translations/main_ar.ts
  6. 8
      selfdrive/ui/translations/main_de.ts
  7. 8
      selfdrive/ui/translations/main_es.ts
  8. 8
      selfdrive/ui/translations/main_fr.ts
  9. 8
      selfdrive/ui/translations/main_ja.ts
  10. 8
      selfdrive/ui/translations/main_ko.ts
  11. 8
      selfdrive/ui/translations/main_pt-BR.ts
  12. 8
      selfdrive/ui/translations/main_th.ts
  13. 8
      selfdrive/ui/translations/main_tr.ts
  14. 8
      selfdrive/ui/translations/main_zh-CHS.ts
  15. 8
      selfdrive/ui/translations/main_zh-CHT.ts

@ -29,6 +29,22 @@ Here's an example command for connecting to your device using its tethered conne
For doing development work on device, it's recommended to use [SSH agent forwarding](https://docs.github.com/en/developers/overview/using-ssh-agent-forwarding). For doing development work on device, it's recommended to use [SSH agent forwarding](https://docs.github.com/en/developers/overview/using-ssh-agent-forwarding).
## ADB
In order to use ADB on your device, you'll need to enable it in the device's settings.
* Enable ADB in your device's settings
* Connect to your device
* `adb shell` over USB
* `adb connect` over WiFi
* Here's an example command for connecting to your device using its tethered connection: `adb connect 192.168.43.1:5555`
> [!NOTE]
> The default port for ADB is 5555 on the comma 3/3X.
For more info on ADB, see the [Android Debug Bridge (ADB) documentation](https://developer.android.com/tools/adb).
### Notes ### Notes
The public keys are only fetched from your GitHub account once. In order to update your device's authorized keys, you'll need to re-enter your GitHub username. The public keys are only fetched from your GitHub account once. In order to update your device's authorized keys, you'll need to re-enter your GitHub username.

@ -1,11 +0,0 @@
#!/usr/bin/env bash
set -e
PORT=5555
setprop service.adb.tcp.port $PORT
sudo systemctl start adbd
IP=$(echo $SSH_CONNECTION | awk '{ print $3}')
echo "then, connect on your computer:"
echo "adb connect $IP:$PORT"

@ -1,4 +1,5 @@
#include <QDebug> #include <QDebug>
#include <QProcess>
#include "selfdrive/ui/qt/offroad/developer_panel.h" #include "selfdrive/ui/qt/offroad/developer_panel.h"
#include "selfdrive/ui/qt/widgets/ssh_keys.h" #include "selfdrive/ui/qt/widgets/ssh_keys.h"
@ -6,6 +7,10 @@
#include "common/util.h" #include "common/util.h"
DeveloperPanel::DeveloperPanel(SettingsWindow *parent) : ListWidget(parent) { DeveloperPanel::DeveloperPanel(SettingsWindow *parent) : ListWidget(parent) {
adbToggle = new ParamControl("AdbEnabled", tr("Enable ADB"),
tr("ADB (Android Debug Bridge) allows connecting to your device over USB or over the network. See https://docs.comma.ai/how-to/connect-to-comma for more info."), "");
addItem(adbToggle);
// SSH keys // SSH keys
addItem(new SshToggle()); addItem(new SshToggle());
addItem(new SshControl()); addItem(new SshControl());

@ -10,6 +10,7 @@ public:
private: private:
Params params; Params params;
ParamControl* adbToggle;
ParamControl* joystickToggle; ParamControl* joystickToggle;
ParamControl* longManeuverToggle; ParamControl* longManeuverToggle;
ParamControl* experimentalLongitudinalToggle; ParamControl* experimentalLongitudinalToggle;

@ -135,6 +135,14 @@
<source>On this car, openpilot defaults to the car&apos;s built-in ACC instead of openpilot&apos;s longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.</source> <source>On this car, openpilot defaults to the car&apos;s built-in ACC instead of openpilot&apos;s longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.</source>
<translation>في هذه السيارة يعمل openpilot افتراضياً بالشكل المدمج في التحكم التكيفي في السرعة بدلاً من التحكم الطولي. قم بتمكين هذا الخيار من أجل الانتقال إلى التحكم الطولي. يوصى بتمكين الوضع التجريبي عند استخدام وضع التحكم الطولي ألفا من openpilot.</translation> <translation>في هذه السيارة يعمل openpilot افتراضياً بالشكل المدمج في التحكم التكيفي في السرعة بدلاً من التحكم الطولي. قم بتمكين هذا الخيار من أجل الانتقال إلى التحكم الطولي. يوصى بتمكين الوضع التجريبي عند استخدام وضع التحكم الطولي ألفا من openpilot.</translation>
</message> </message>
<message>
<source>Enable ADB</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>ADB (Android Debug Bridge) allows connecting to your device over USB or over the network. See https://docs.comma.ai/how-to/connect-to-comma for more info.</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>DevicePanel</name> <name>DevicePanel</name>

@ -135,6 +135,14 @@
<source>On this car, openpilot defaults to the car&apos;s built-in ACC instead of openpilot&apos;s longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.</source> <source>On this car, openpilot defaults to the car&apos;s built-in ACC instead of openpilot&apos;s longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Enable ADB</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>ADB (Android Debug Bridge) allows connecting to your device over USB or over the network. See https://docs.comma.ai/how-to/connect-to-comma for more info.</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>DevicePanel</name> <name>DevicePanel</name>

@ -135,6 +135,14 @@
<source>On this car, openpilot defaults to the car&apos;s built-in ACC instead of openpilot&apos;s longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.</source> <source>On this car, openpilot defaults to the car&apos;s built-in ACC instead of openpilot&apos;s longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.</source>
<translation>En este automóvil, openpilot se configura de manera predeterminada con el Autocrucero Adaptativo (ACC) incorporado en el automóvil en lugar del control longitudinal de openpilot. Habilita esta opción para cambiar al control longitudinal de openpilot. Se recomienda activar el modo experimental al habilitar el control longitudinal de openpilot (aún en fase experimental).</translation> <translation>En este automóvil, openpilot se configura de manera predeterminada con el Autocrucero Adaptativo (ACC) incorporado en el automóvil en lugar del control longitudinal de openpilot. Habilita esta opción para cambiar al control longitudinal de openpilot. Se recomienda activar el modo experimental al habilitar el control longitudinal de openpilot (aún en fase experimental).</translation>
</message> </message>
<message>
<source>Enable ADB</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>ADB (Android Debug Bridge) allows connecting to your device over USB or over the network. See https://docs.comma.ai/how-to/connect-to-comma for more info.</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>DevicePanel</name> <name>DevicePanel</name>

@ -135,6 +135,14 @@
<source>On this car, openpilot defaults to the car&apos;s built-in ACC instead of openpilot&apos;s longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.</source> <source>On this car, openpilot defaults to the car&apos;s built-in ACC instead of openpilot&apos;s longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.</source>
<translation>Sur cette voiture, openpilot utilise par défaut le régulateur de vitesse adaptatif intégré à la voiture plutôt que le contrôle longitudinal d&apos;openpilot. Activez ceci pour passer au contrôle longitudinal openpilot. Il est recommandé d&apos;activer le mode expérimental lors de l&apos;activation du contrôle longitudinal openpilot alpha.</translation> <translation>Sur cette voiture, openpilot utilise par défaut le régulateur de vitesse adaptatif intégré à la voiture plutôt que le contrôle longitudinal d&apos;openpilot. Activez ceci pour passer au contrôle longitudinal openpilot. Il est recommandé d&apos;activer le mode expérimental lors de l&apos;activation du contrôle longitudinal openpilot alpha.</translation>
</message> </message>
<message>
<source>Enable ADB</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>ADB (Android Debug Bridge) allows connecting to your device over USB or over the network. See https://docs.comma.ai/how-to/connect-to-comma for more info.</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>DevicePanel</name> <name>DevicePanel</name>

@ -135,6 +135,14 @@
<source>On this car, openpilot defaults to the car&apos;s built-in ACC instead of openpilot&apos;s longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.</source> <source>On this car, openpilot defaults to the car&apos;s built-in ACC instead of openpilot&apos;s longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.</source>
<translation>openpilotは車両内蔵のACC()使openpilotのアクセル制御は無効化されていますopenpilotに切り替えるにはこの設定を有効にしてくださいExperimentalモードを推奨します</translation> <translation>openpilotは車両内蔵のACC()使openpilotのアクセル制御は無効化されていますopenpilotに切り替えるにはこの設定を有効にしてくださいExperimentalモードを推奨します</translation>
</message> </message>
<message>
<source>Enable ADB</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>ADB (Android Debug Bridge) allows connecting to your device over USB or over the network. See https://docs.comma.ai/how-to/connect-to-comma for more info.</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>DevicePanel</name> <name>DevicePanel</name>

@ -135,6 +135,14 @@
<source>On this car, openpilot defaults to the car&apos;s built-in ACC instead of openpilot&apos;s longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.</source> <source>On this car, openpilot defaults to the car&apos;s built-in ACC instead of openpilot&apos;s longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.</source>
<translation type="unfinished"> openpilot ACC로 . openpilot의 . openpilot .</translation> <translation type="unfinished"> openpilot ACC로 . openpilot의 . openpilot .</translation>
</message> </message>
<message>
<source>Enable ADB</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>ADB (Android Debug Bridge) allows connecting to your device over USB or over the network. See https://docs.comma.ai/how-to/connect-to-comma for more info.</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>DevicePanel</name> <name>DevicePanel</name>

@ -135,6 +135,14 @@
<source>On this car, openpilot defaults to the car&apos;s built-in ACC instead of openpilot&apos;s longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.</source> <source>On this car, openpilot defaults to the car&apos;s built-in ACC instead of openpilot&apos;s longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.</source>
<translation>Neste carro, o openpilot tem como padrão o ACC embutido do carro em vez do controle longitudinal do openpilot. Habilite isso para alternar para o controle longitudinal openpilot. Recomenda-se ativar o modo Experimental ao ativar o embrionário controle longitudinal openpilot.</translation> <translation>Neste carro, o openpilot tem como padrão o ACC embutido do carro em vez do controle longitudinal do openpilot. Habilite isso para alternar para o controle longitudinal openpilot. Recomenda-se ativar o modo Experimental ao ativar o embrionário controle longitudinal openpilot.</translation>
</message> </message>
<message>
<source>Enable ADB</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>ADB (Android Debug Bridge) allows connecting to your device over USB or over the network. See https://docs.comma.ai/how-to/connect-to-comma for more info.</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>DevicePanel</name> <name>DevicePanel</name>

@ -135,6 +135,14 @@
<source>On this car, openpilot defaults to the car&apos;s built-in ACC instead of openpilot&apos;s longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.</source> <source>On this car, openpilot defaults to the car&apos;s built-in ACC instead of openpilot&apos;s longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.</source>
<translation type="unfinished"> openpilot / ACC openpilot openpilot / openpilot / alpha</translation> <translation type="unfinished"> openpilot / ACC openpilot openpilot / openpilot / alpha</translation>
</message> </message>
<message>
<source>Enable ADB</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>ADB (Android Debug Bridge) allows connecting to your device over USB or over the network. See https://docs.comma.ai/how-to/connect-to-comma for more info.</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>DevicePanel</name> <name>DevicePanel</name>

@ -135,6 +135,14 @@
<source>On this car, openpilot defaults to the car&apos;s built-in ACC instead of openpilot&apos;s longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.</source> <source>On this car, openpilot defaults to the car&apos;s built-in ACC instead of openpilot&apos;s longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Enable ADB</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>ADB (Android Debug Bridge) allows connecting to your device over USB or over the network. See https://docs.comma.ai/how-to/connect-to-comma for more info.</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>DevicePanel</name> <name>DevicePanel</name>

@ -135,6 +135,14 @@
<source>On this car, openpilot defaults to the car&apos;s built-in ACC instead of openpilot&apos;s longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.</source> <source>On this car, openpilot defaults to the car&apos;s built-in ACC instead of openpilot&apos;s longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.</source>
<translation type="unfinished">openpilot 使ACC openpilot openpilot openpilot Alpha Experimental mode</translation> <translation type="unfinished">openpilot 使ACC openpilot openpilot openpilot Alpha Experimental mode</translation>
</message> </message>
<message>
<source>Enable ADB</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>ADB (Android Debug Bridge) allows connecting to your device over USB or over the network. See https://docs.comma.ai/how-to/connect-to-comma for more info.</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>DevicePanel</name> <name>DevicePanel</name>

@ -135,6 +135,14 @@
<source>On this car, openpilot defaults to the car&apos;s built-in ACC instead of openpilot&apos;s longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.</source> <source>On this car, openpilot defaults to the car&apos;s built-in ACC instead of openpilot&apos;s longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.</source>
<translation type="unfinished">openpilot 使ACC openpilot openpilot openpilot Alpha Experimental mode</translation> <translation type="unfinished">openpilot 使ACC openpilot openpilot openpilot Alpha Experimental mode</translation>
</message> </message>
<message>
<source>Enable ADB</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>ADB (Android Debug Bridge) allows connecting to your device over USB or over the network. See https://docs.comma.ai/how-to/connect-to-comma for more info.</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>DevicePanel</name> <name>DevicePanel</name>

Loading…
Cancel
Save