Move selfdrive/hardware/ to system/ (#24725)

* move hardware to system/

* fix mypy
pull/24829/head
Adeeb Shihadeh 3 years ago committed by GitHub
parent 5add0c6159
commit 1139fe507b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      Jenkinsfile
  2. 2
      common/basedir.py
  3. 2
      common/modeldata.h
  4. 2
      common/params.cc
  5. 2
      common/realtime.py
  6. 2
      common/swaglog.cc
  7. 2
      common/tests/test_swaglog.cc
  8. 6
      launch_chffrplus.sh
  9. 30
      release/files_common
  10. 2
      scripts/disable-powersave.py
  11. 2
      selfdrive/athena/athenad.py
  12. 2
      selfdrive/athena/registration.py
  13. 2
      selfdrive/boardd/boardd.cc
  14. 2
      selfdrive/boardd/main.cc
  15. 2
      selfdrive/boardd/pandad.py
  16. 2
      selfdrive/boardd/tests/test_boardd_loopback.py
  17. 2
      selfdrive/camerad/cameras/camera_common.cc
  18. 2
      selfdrive/camerad/cameras/camera_common.h
  19. 2
      selfdrive/camerad/main.cc
  20. 2
      selfdrive/camerad/snapshot/snapshot.py
  21. 2
      selfdrive/camerad/test/test_camerad.py
  22. 2
      selfdrive/camerad/test/test_exposure.py
  23. 2
      selfdrive/controls/controlsd.py
  24. 1
      selfdrive/hardware
  25. 2
      selfdrive/loggerd/config.py
  26. 2
      selfdrive/loggerd/logger.h
  27. 2
      selfdrive/loggerd/loggerd.h
  28. 2
      selfdrive/loggerd/tests/test_encoder.py
  29. 2
      selfdrive/loggerd/uploader.py
  30. 2
      selfdrive/manager/build.py
  31. 2
      selfdrive/manager/manager.py
  32. 2
      selfdrive/manager/process.py
  33. 2
      selfdrive/manager/process_config.py
  34. 2
      selfdrive/manager/test/test_manager.py
  35. 2
      selfdrive/modeld/modeld.cc
  36. 2
      selfdrive/modeld/models/dmonitoring.cc
  37. 2
      selfdrive/modeld/thneed/compile.cc
  38. 2
      selfdrive/sensord/test/test_sensord.py
  39. 2
      selfdrive/sentry.py
  40. 2
      selfdrive/statsd.py
  41. 2
      selfdrive/swaglog.py
  42. 2
      selfdrive/test/helpers.py
  43. 2
      selfdrive/test/process_replay/model_replay.py
  44. 2
      selfdrive/test/process_replay/test_debayer.py
  45. 2
      selfdrive/thermald/power_monitoring.py
  46. 2
      selfdrive/thermald/thermald.py
  47. 2
      selfdrive/timezoned.py
  48. 2
      selfdrive/ui/main.cc
  49. 2
      selfdrive/ui/qt/api.cc
  50. 2
      selfdrive/ui/qt/maps/map_helpers.cc
  51. 2
      selfdrive/ui/qt/offroad/settings.cc
  52. 2
      selfdrive/ui/qt/qt_window.h
  53. 2
      selfdrive/ui/qt/setup/setup.cc
  54. 2
      selfdrive/ui/qt/setup/updater.cc
  55. 2
      selfdrive/ui/qt/spinner.cc
  56. 2
      selfdrive/ui/qt/text.cc
  57. 2
      selfdrive/ui/qt/util.cc
  58. 2
      selfdrive/ui/qt/widgets/input.cc
  59. 2
      selfdrive/ui/qt/widgets/offroad_alerts.cc
  60. 2
      selfdrive/ui/qt/widgets/ssh_keys.h
  61. 2
      selfdrive/ui/qt/window.cc
  62. 2
      selfdrive/ui/replay/replay.cc
  63. 2
      selfdrive/ui/replay/route.cc
  64. 2
      selfdrive/ui/soundd/sound.h
  65. 2
      selfdrive/ui/tests/test_soundd.py
  66. 2
      selfdrive/ui/ui.cc
  67. 6
      selfdrive/updated.py
  68. 0
      system/__init__.py
  69. 0
      system/hardware/.gitignore
  70. 6
      system/hardware/__init__.py
  71. 0
      system/hardware/base.h
  72. 0
      system/hardware/base.py
  73. 4
      system/hardware/hw.h
  74. 0
      system/hardware/pc/__init__.py
  75. 2
      system/hardware/pc/hardware.py
  76. 0
      system/hardware/tici/__init__.py
  77. 0
      system/hardware/tici/agnos.json
  78. 0
      system/hardware/tici/agnos.py
  79. 0
      system/hardware/tici/amplifier.py
  80. 2
      system/hardware/tici/hardware.h
  81. 8
      system/hardware/tici/hardware.py
  82. 0
      system/hardware/tici/iwlist.py
  83. 0
      system/hardware/tici/pins.py
  84. 4
      system/hardware/tici/power_draw_test.py
  85. 0
      system/hardware/tici/power_monitor.py
  86. 2
      system/hardware/tici/precise_power_measure.py
  87. 0
      system/hardware/tici/restart_modem.sh
  88. 0
      system/hardware/tici/test_agnos_updater.py
  89. 4
      system/hardware/tici/test_power_draw.py
  90. 0
      system/hardware/tici/updater
  91. 2
      tools/lib/auth_config.py

2
Jenkinsfile vendored

@ -123,7 +123,7 @@ pipeline {
steps {
phone_steps("tici2", [
["build", "cd selfdrive/manager && ./build.py"],
["test power draw", "python selfdrive/hardware/tici/test_power_draw.py"],
["test power draw", "python system/hardware/tici/test_power_draw.py"],
["test boardd loopback", "python selfdrive/boardd/tests/test_boardd_loopback.py"],
["test loggerd", "python selfdrive/loggerd/tests/test_loggerd.py"],
["test encoder", "LD_LIBRARY_PATH=/usr/local/lib python selfdrive/loggerd/tests/test_encoder.py"],

@ -1,7 +1,7 @@
import os
from pathlib import Path
from selfdrive.hardware import PC
from system.hardware import PC
BASEDIR = os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), "../"))

@ -2,7 +2,7 @@
#include <array>
#include "common/mat.h"
#include "selfdrive/hardware/hw.h"
#include "system/hardware/hw.h"
const int TRAJECTORY_SIZE = 33;
const int LAT_MPC_N = 16;

@ -8,7 +8,7 @@
#include "common/swaglog.h"
#include "common/util.h"
#include "selfdrive/hardware/hw.h"
#include "system/hardware/hw.h"
namespace {

@ -8,7 +8,7 @@ from typing import Optional, List, Union
from setproctitle import getproctitle # pylint: disable=no-name-in-module
from common.clock import sec_since_boot # pylint: disable=no-name-in-module, import-error
from selfdrive.hardware import PC
from system.hardware import PC
# time step for each process

@ -15,7 +15,7 @@
#include "common/util.h"
#include "common/version.h"
#include "selfdrive/hardware/hw.h"
#include "system/hardware/hw.h"
class SwaglogState : public LogState {
public:

@ -7,7 +7,7 @@
#include "common/swaglog.h"
#include "common/util.h"
#include "common/version.h"
#include "selfdrive/hardware/hw.h"
#include "system/hardware/hw.h"
const char *SWAGLOG_ADDR = "ipc:///tmp/logmessage";
std::string daemon_name = "testy";

@ -22,12 +22,12 @@ function agnos_init {
# Check if AGNOS update is required
if [ $(< /VERSION) != "$AGNOS_VERSION" ]; then
AGNOS_PY="$DIR/selfdrive/hardware/tici/agnos.py"
MANIFEST="$DIR/selfdrive/hardware/tici/agnos.json"
AGNOS_PY="$DIR/system/hardware/tici/agnos.py"
MANIFEST="$DIR/system/hardware/tici/agnos.json"
if $AGNOS_PY --verify $MANIFEST; then
sudo reboot
fi
$DIR/selfdrive/hardware/tici/updater $AGNOS_PY $MANIFEST
$DIR/system/hardware/tici/updater $AGNOS_PY $MANIFEST
fi
}

@ -182,21 +182,21 @@ selfdrive/controls/lib/longitudinal_mpc_lib/.gitignore
selfdrive/controls/lib/lateral_mpc_lib/*
selfdrive/controls/lib/longitudinal_mpc_lib/*
selfdrive/hardware/__init__.py
selfdrive/hardware/base.h
selfdrive/hardware/base.py
selfdrive/hardware/hw.h
selfdrive/hardware/tici/__init__.py
selfdrive/hardware/tici/hardware.h
selfdrive/hardware/tici/hardware.py
selfdrive/hardware/tici/pins.py
selfdrive/hardware/tici/agnos.py
selfdrive/hardware/tici/agnos.json
selfdrive/hardware/tici/amplifier.py
selfdrive/hardware/tici/updater
selfdrive/hardware/tici/iwlist.py
selfdrive/hardware/pc/__init__.py
selfdrive/hardware/pc/hardware.py
system/hardware/__init__.py
system/hardware/base.h
system/hardware/base.py
system/hardware/hw.h
system/hardware/tici/__init__.py
system/hardware/tici/hardware.h
system/hardware/tici/hardware.py
system/hardware/tici/pins.py
system/hardware/tici/agnos.py
system/hardware/tici/agnos.json
system/hardware/tici/amplifier.py
system/hardware/tici/updater
system/hardware/tici/iwlist.py
system/hardware/pc/__init__.py
system/hardware/pc/hardware.py
selfdrive/locationd/__init__.py
selfdrive/locationd/.gitignore

@ -1,5 +1,5 @@
#!/usr/bin/env python3
from selfdrive.hardware import HARDWARE
from system.hardware import HARDWARE
if __name__ == "__main__":
HARDWARE.set_power_save(False)

@ -32,7 +32,7 @@ from common.basedir import PERSIST
from common.file_helpers import CallbackReader
from common.params import Params
from common.realtime import sec_since_boot, set_core_affinity
from selfdrive.hardware import HARDWARE, PC, AGNOS
from system.hardware import HARDWARE, PC, AGNOS
from selfdrive.loggerd.config import ROOT
from selfdrive.loggerd.xattr_cache import getxattr, setxattr
from selfdrive.statsd import STATS_DIR

@ -11,7 +11,7 @@ from common.params import Params
from common.spinner import Spinner
from common.basedir import PERSIST
from selfdrive.controls.lib.alertmanager import set_offroad_alert
from selfdrive.hardware import HARDWARE, PC
from system.hardware import HARDWARE, PC
from selfdrive.swaglog import cloudlog

@ -27,7 +27,7 @@
#include "common/swaglog.h"
#include "common/timing.h"
#include "common/util.h"
#include "selfdrive/hardware/hw.h"
#include "system/hardware/hw.h"
#include "selfdrive/boardd/pigeon.h"

@ -3,7 +3,7 @@
#include "selfdrive/boardd/boardd.h"
#include "common/swaglog.h"
#include "common/util.h"
#include "selfdrive/hardware/hw.h"
#include "system/hardware/hw.h"
int main(int argc, char *argv[]) {
LOGW("starting boardd");

@ -10,7 +10,7 @@ from functools import cmp_to_key
from panda import DEFAULT_FW_FN, DEFAULT_H7_FW_FN, MCU_TYPE_H7, Panda, PandaDFU
from common.basedir import BASEDIR
from common.params import Params
from selfdrive.hardware import HARDWARE
from system.hardware import HARDWARE
from selfdrive.swaglog import cloudlog

@ -12,7 +12,7 @@ from common.spinner import Spinner
from common.timeout import Timeout
from selfdrive.boardd.boardd import can_list_to_can_capnp
from selfdrive.car import make_can_msg
from selfdrive.hardware import TICI
from system.hardware import TICI
from selfdrive.test.helpers import phone_only, with_processes

@ -15,7 +15,7 @@
#include "common/modeldata.h"
#include "common/swaglog.h"
#include "common/util.h"
#include "selfdrive/hardware/hw.h"
#include "system/hardware/hw.h"
#include "msm_media_info.h"
#ifdef QCOM2

@ -13,7 +13,7 @@
#include "common/mat.h"
#include "common/queue.h"
#include "common/swaglog.h"
#include "selfdrive/hardware/hw.h"
#include "system/hardware/hw.h"
#define CAMERA_ID_IMX298 0
#define CAMERA_ID_IMX179 1

@ -4,7 +4,7 @@
#include "common/params.h"
#include "common/util.h"
#include "selfdrive/hardware/hw.h"
#include "system/hardware/hw.h"
int main(int argc, char *argv[]) {
if (!Hardware::PC()) {

@ -9,7 +9,7 @@ import cereal.messaging as messaging
from cereal.visionipc import VisionIpcClient, VisionStreamType
from common.params import Params
from common.realtime import DT_MDL
from selfdrive.hardware import PC
from system.hardware import PC
from selfdrive.controls.lib.alertmanager import set_offroad_alert
from selfdrive.manager.process_config import managed_processes

@ -4,7 +4,7 @@ import time
import unittest
import cereal.messaging as messaging
from selfdrive.hardware import TICI
from system.hardware import TICI
from selfdrive.test.helpers import with_processes
TEST_TIMESPAN = 30 # random.randint(60, 180) # seconds

@ -6,7 +6,7 @@ import numpy as np
from selfdrive.test.helpers import with_processes
from selfdrive.camerad.snapshot.snapshot import get_snapshots
from selfdrive.hardware import TICI
from system.hardware import TICI
TEST_TIME = 45
REPEAT = 5

@ -27,7 +27,7 @@ from selfdrive.controls.lib.events import Events, ET
from selfdrive.controls.lib.alertmanager import AlertManager, set_offroad_alert
from selfdrive.controls.lib.vehicle_model import VehicleModel
from selfdrive.locationd.calibrationd import Calibration
from selfdrive.hardware import HARDWARE
from system.hardware import HARDWARE
from selfdrive.manager.process_config import managed_processes
SOFT_DISABLE_TIME = 3 # seconds

@ -0,0 +1 @@
../system/hardware/

@ -1,6 +1,6 @@
import os
from pathlib import Path
from selfdrive.hardware import PC
from system.hardware import PC
if os.environ.get('LOG_ROOT', False):
ROOT = os.environ['LOG_ROOT']

@ -13,7 +13,7 @@
#include "cereal/messaging/messaging.h"
#include "common/util.h"
#include "common/swaglog.h"
#include "selfdrive/hardware/hw.h"
#include "system/hardware/hw.h"
const std::string LOG_ROOT = Path::log_root();

@ -20,7 +20,7 @@
#include "common/swaglog.h"
#include "common/timing.h"
#include "common/util.h"
#include "selfdrive/hardware/hw.h"
#include "system/hardware/hw.h"
#include "selfdrive/loggerd/encoder/encoder.h"
#include "selfdrive/loggerd/logger.h"

@ -13,7 +13,7 @@ from tqdm import trange
from common.params import Params
from common.timeout import Timeout
from selfdrive.hardware import TICI
from system.hardware import TICI
from selfdrive.loggerd.config import ROOT
from selfdrive.manager.process_config import managed_processes
from tools.lib.logreader import LogReader

@ -15,7 +15,7 @@ import cereal.messaging as messaging
from common.api import Api
from common.params import Params
from common.realtime import set_core_affinity
from selfdrive.hardware import TICI
from system.hardware import TICI
from selfdrive.loggerd.xattr_cache import getxattr, setxattr
from selfdrive.loggerd.config import ROOT
from selfdrive.swaglog import cloudlog

@ -10,7 +10,7 @@ from pathlib import Path
from common.basedir import BASEDIR
from common.spinner import Spinner
from common.text_window import TextWindow
from selfdrive.hardware import AGNOS
from system.hardware import AGNOS
from selfdrive.swaglog import cloudlog, add_file_handler
from selfdrive.version import is_dirty

@ -13,7 +13,7 @@ from common.basedir import BASEDIR
from common.params import Params, ParamKeyType
from common.text_window import TextWindow
from selfdrive.boardd.set_time import set_time
from selfdrive.hardware import HARDWARE, PC
from system.hardware import HARDWARE, PC
from selfdrive.manager.helpers import unblock_stdout
from selfdrive.manager.process import ensure_running
from selfdrive.manager.process_config import managed_processes

@ -17,7 +17,7 @@ from common.basedir import BASEDIR
from common.params import Params
from common.realtime import sec_since_boot
from selfdrive.swaglog import cloudlog
from selfdrive.hardware import HARDWARE
from system.hardware import HARDWARE
from cereal import log
WATCHDOG_FN = "/dev/shm/wd_"

@ -2,7 +2,7 @@ import os
from cereal import car
from common.params import Params
from selfdrive.hardware import PC
from system.hardware import PC
from selfdrive.manager.process import PythonProcess, NativeProcess, DaemonProcess
WEBCAM = os.getenv("USE_WEBCAM") is not None

@ -5,7 +5,7 @@ import time
import unittest
import selfdrive.manager.manager as manager
from selfdrive.hardware import AGNOS, HARDWARE
from system.hardware import AGNOS, HARDWARE
from selfdrive.manager.process import DaemonProcess
from selfdrive.manager.process_config import managed_processes

@ -11,7 +11,7 @@
#include "common/params.h"
#include "common/swaglog.h"
#include "common/util.h"
#include "selfdrive/hardware/hw.h"
#include "system/hardware/hw.h"
#include "selfdrive/modeld/models/driving.h"
ExitHandler do_exit;

@ -6,7 +6,7 @@
#include "common/modeldata.h"
#include "common/params.h"
#include "common/timing.h"
#include "selfdrive/hardware/hw.h"
#include "system/hardware/hw.h"
#include "selfdrive/modeld/models/dmonitoring.h"

@ -3,7 +3,7 @@
#include "selfdrive/modeld/runners/snpemodel.h"
#include "selfdrive/modeld/thneed/thneed.h"
#include "selfdrive/hardware/hw.h"
#include "system/hardware/hw.h"
#define TEMPORAL_SIZE 512
#define DESIRE_LEN 8

@ -4,7 +4,7 @@ import time
import unittest
import cereal.messaging as messaging
from selfdrive.hardware import TICI
from system.hardware import TICI
from selfdrive.test.helpers import with_processes
TEST_TIMESPAN = 10

@ -5,7 +5,7 @@ from sentry_sdk.integrations.threading import ThreadingIntegration
from common.params import Params
from selfdrive.athena.registration import is_registered_device
from selfdrive.hardware import HARDWARE, PC
from system.hardware import HARDWARE, PC
from selfdrive.swaglog import cloudlog
from selfdrive.version import get_branch, get_commit, get_origin, get_version, \
is_comma_remote, is_dirty, is_tested_branch

@ -10,7 +10,7 @@ from typing import NoReturn, Union, List, Dict
from common.params import Params
from cereal.messaging import SubMaster
from selfdrive.swaglog import cloudlog
from selfdrive.hardware import HARDWARE
from system.hardware import HARDWARE
from common.file_helpers import atomic_write_in_dir
from selfdrive.version import get_normalized_origin, get_short_branch, get_short_version, is_dirty
from selfdrive.loggerd.config import STATS_DIR, STATS_DIR_FILE_LIMIT, STATS_SOCKET, STATS_FLUSH_TIME_S

@ -7,7 +7,7 @@ from logging.handlers import BaseRotatingHandler
import zmq
from common.logging_extra import SwagLogger, SwagFormatter, SwagLogFileFormatter
from selfdrive.hardware import PC
from system.hardware import PC
if PC:
SWAGLOG_DIR = os.path.join(str(Path.home()), ".comma", "log")

@ -2,7 +2,7 @@ import os
import time
from functools import wraps
from selfdrive.hardware import PC
from system.hardware import PC
from selfdrive.manager.process_config import managed_processes
from selfdrive.version import training_version, terms_version

@ -11,7 +11,7 @@ from cereal.visionipc import VisionIpcServer, VisionStreamType
from common.spinner import Spinner
from common.timeout import Timeout
from common.transformations.camera import get_view_frame_from_road_frame, tici_f_frame_size, tici_d_frame_size
from selfdrive.hardware import PC
from system.hardware import PC
from selfdrive.manager.process_config import managed_processes
from selfdrive.test.openpilotci import BASE_URL, get_url
from selfdrive.test.process_replay.compare_logs import compare_logs, save_log

@ -6,7 +6,7 @@ import numpy as np
import pyopencl as cl # install with `PYOPENCL_CL_PRETEND_VERSION=2.0 pip install pyopencl`
from selfdrive.hardware import PC, TICI
from system.hardware import PC, TICI
from common.basedir import BASEDIR
from selfdrive.test.openpilotci import BASE_URL, get_url
from selfdrive.version import get_commit

@ -4,7 +4,7 @@ from typing import Optional
from cereal import log
from common.params import Params, put_nonblocking
from common.realtime import sec_since_boot
from selfdrive.hardware import HARDWARE
from system.hardware import HARDWARE
from selfdrive.swaglog import cloudlog
from selfdrive.statsd import statlog

@ -17,7 +17,7 @@ from common.filter_simple import FirstOrderFilter
from common.params import Params
from common.realtime import DT_TRML, sec_since_boot
from selfdrive.controls.lib.alertmanager import set_offroad_alert
from selfdrive.hardware import HARDWARE, TICI, AGNOS
from system.hardware import HARDWARE, TICI, AGNOS
from selfdrive.loggerd.config import get_available_percent
from selfdrive.statsd import statlog
from selfdrive.swaglog import cloudlog

@ -9,7 +9,7 @@ import requests
from timezonefinder import TimezoneFinder
from common.params import Params
from selfdrive.hardware import AGNOS
from system.hardware import AGNOS
from selfdrive.swaglog import cloudlog

@ -2,7 +2,7 @@
#include <QApplication>
#include "selfdrive/hardware/hw.h"
#include "system/hardware/hw.h"
#include "selfdrive/ui/qt/qt_window.h"
#include "selfdrive/ui/qt/util.h"
#include "selfdrive/ui/qt/window.h"

@ -14,7 +14,7 @@
#include "common/params.h"
#include "common/util.h"
#include "selfdrive/hardware/hw.h"
#include "system/hardware/hw.h"
#include "selfdrive/ui/qt/util.h"
namespace CommaApi {

@ -4,7 +4,7 @@
#include <QJsonObject>
#include "common/params.h"
#include "selfdrive/hardware/hw.h"
#include "system/hardware/hw.h"
#include "selfdrive/ui/qt/api.h"
QString get_mapbox_token() {

@ -14,7 +14,7 @@
#include "common/params.h"
#include "common/util.h"
#include "selfdrive/hardware/hw.h"
#include "system/hardware/hw.h"
#include "selfdrive/ui/qt/widgets/controls.h"
#include "selfdrive/ui/qt/widgets/input.h"
#include "selfdrive/ui/qt/widgets/scrollview.h"

@ -12,7 +12,7 @@
#include <QPlatformSurfaceEvent>
#endif
#include "selfdrive/hardware/hw.h"
#include "system/hardware/hw.h"
const QString ASSET_PATH = ":/";

@ -11,7 +11,7 @@
#include <curl/curl.h>
#include "common/util.h"
#include "selfdrive/hardware/hw.h"
#include "system/hardware/hw.h"
#include "selfdrive/ui/qt/api.h"
#include "selfdrive/ui/qt/qt_window.h"
#include "selfdrive/ui/qt/offroad/networking.h"

@ -2,7 +2,7 @@
#include <QTimer>
#include <QVBoxLayout>
#include "selfdrive/hardware/hw.h"
#include "system/hardware/hw.h"
#include "selfdrive/ui/qt/util.h"
#include "selfdrive/ui/qt/qt_window.h"
#include "selfdrive/ui/qt/setup/updater.h"

@ -10,7 +10,7 @@
#include <QString>
#include <QTransform>
#include "selfdrive/hardware/hw.h"
#include "system/hardware/hw.h"
#include "selfdrive/ui/qt/qt_window.h"
#include "selfdrive/ui/qt/util.h"

@ -5,7 +5,7 @@
#include <QVBoxLayout>
#include <QWidget>
#include "selfdrive/hardware/hw.h"
#include "system/hardware/hw.h"
#include "selfdrive/ui/qt/util.h"
#include "selfdrive/ui/qt/qt_window.h"
#include "selfdrive/ui/qt/widgets/scrollview.h"

@ -6,7 +6,7 @@
#include "common/params.h"
#include "common/swaglog.h"
#include "selfdrive/hardware/hw.h"
#include "system/hardware/hw.h"
QString getVersion() {
static QString version = QString::fromStdString(Params().get("Version"));

@ -2,7 +2,7 @@
#include <QPushButton>
#include "selfdrive/hardware/hw.h"
#include "system/hardware/hw.h"
#include "selfdrive/ui/qt/util.h"
#include "selfdrive/ui/qt/qt_window.h"
#include "selfdrive/ui/qt/widgets/scrollview.h"

@ -5,7 +5,7 @@
#include <QJsonObject>
#include "common/util.h"
#include "selfdrive/hardware/hw.h"
#include "system/hardware/hw.h"
#include "selfdrive/ui/qt/widgets/scrollview.h"
AbstractAlert::AbstractAlert(bool hasRebootBtn, QWidget *parent) : QFrame(parent) {

@ -2,7 +2,7 @@
#include <QPushButton>
#include "selfdrive/hardware/hw.h"
#include "system/hardware/hw.h"
#include "selfdrive/ui/qt/widgets/controls.h"
// SSH enable toggle

@ -2,7 +2,7 @@
#include <QFontDatabase>
#include "selfdrive/hardware/hw.h"
#include "system/hardware/hw.h"
MainWindow::MainWindow(QWidget *parent) : QWidget(parent) {
main_layout = new QStackedLayout(this);

@ -7,7 +7,7 @@
#include "cereal/services.h"
#include "common/params.h"
#include "common/timing.h"
#include "selfdrive/hardware/hw.h"
#include "system/hardware/hw.h"
#include "selfdrive/ui/replay/util.h"
Replay::Replay(QString route, QStringList allow, QStringList block, SubMaster *sm_, uint32_t flags, QString data_dir, QObject *parent)

@ -9,7 +9,7 @@
#include <array>
#include "selfdrive/hardware/hw.h"
#include "system/hardware/hw.h"
#include "selfdrive/ui/qt/api.h"
#include "selfdrive/ui/replay/replay.h"
#include "selfdrive/ui/replay/util.h"

@ -2,7 +2,7 @@
#include <QSoundEffect>
#include <QString>
#include "selfdrive/hardware/hw.h"
#include "system/hardware/hw.h"
#include "selfdrive/ui/ui.h"
const std::tuple<AudibleAlert, QString, int> sound_list[] = {

@ -8,7 +8,7 @@ import cereal.messaging as messaging
from selfdrive.test.helpers import phone_only, with_processes
# TODO: rewrite for unittest
from common.realtime import DT_CTRL
from selfdrive.hardware import HARDWARE
from system.hardware import HARDWARE
AudibleAlert = car.CarControl.HUDControl.AudibleAlert

@ -10,7 +10,7 @@
#include "common/swaglog.h"
#include "common/util.h"
#include "common/watchdog.h"
#include "selfdrive/hardware/hw.h"
#include "system/hardware/hw.h"
#define BACKLIGHT_DT 0.05
#define BACKLIGHT_TS 10.00

@ -37,7 +37,7 @@ from markdown_it import MarkdownIt
from common.basedir import BASEDIR
from common.params import Params
from selfdrive.hardware import AGNOS, HARDWARE
from system.hardware import AGNOS, HARDWARE
from selfdrive.swaglog import cloudlog
from selfdrive.controls.lib.alertmanager import set_offroad_alert
from selfdrive.version import is_tested_branch
@ -265,7 +265,7 @@ def finalize_update(wait_helper: WaitTimeHelper) -> None:
def handle_agnos_update(wait_helper: WaitTimeHelper) -> None:
from selfdrive.hardware.tici.agnos import flash_agnos_update, get_target_slot_number
from system.hardware.tici.agnos import flash_agnos_update, get_target_slot_number
cur_version = HARDWARE.get_os_version()
updated_version = run(["bash", "-c", r"unset AGNOS_VERSION && source launch_env.sh && \
@ -281,7 +281,7 @@ def handle_agnos_update(wait_helper: WaitTimeHelper) -> None:
cloudlog.info(f"Beginning background installation for AGNOS {updated_version}")
set_offroad_alert("Offroad_NeosUpdate", True)
manifest_path = os.path.join(OVERLAY_MERGED, "selfdrive/hardware/tici/agnos.json")
manifest_path = os.path.join(OVERLAY_MERGED, "system/hardware/tici/agnos.json")
target_slot_number = get_target_slot_number()
flash_agnos_update(manifest_path, target_slot_number, cloudlog)
set_offroad_alert("Offroad_NeosUpdate", False)

@ -1,9 +1,9 @@
import os
from typing import cast
from selfdrive.hardware.base import HardwareBase
from selfdrive.hardware.tici.hardware import Tici
from selfdrive.hardware.pc.hardware import Pc
from system.hardware.base import HardwareBase
from system.hardware.tici.hardware import Tici
from system.hardware.pc.hardware import Pc
TICI = os.path.isfile('/TICI')
AGNOS = TICI

@ -1,10 +1,10 @@
#pragma once
#include "selfdrive/hardware/base.h"
#include "system/hardware/base.h"
#include "common/util.h"
#if QCOM2
#include "selfdrive/hardware/tici/hardware.h"
#include "system/hardware/tici/hardware.h"
#define Hardware HardwareTici
#else
class HardwarePC : public HardwareNone {

@ -1,7 +1,7 @@
import random
from cereal import log
from selfdrive.hardware.base import HardwareBase, ThermalConfig
from system.hardware.base import HardwareBase, ThermalConfig
NetworkType = log.DeviceState.NetworkType
NetworkStrength = log.DeviceState.NetworkStrength

@ -5,7 +5,7 @@
#include "common/params.h"
#include "common/util.h"
#include "selfdrive/hardware/base.h"
#include "system/hardware/base.h"
class HardwareTici : public HardwareNone {
public:

@ -9,10 +9,10 @@ from pathlib import Path
from cereal import log
from common.gpio import gpio_set, gpio_init
from selfdrive.hardware.base import HardwareBase, ThermalConfig
from selfdrive.hardware.tici import iwlist
from selfdrive.hardware.tici.pins import GPIO
from selfdrive.hardware.tici.amplifier import Amplifier
from system.hardware.base import HardwareBase, ThermalConfig
from system.hardware.tici import iwlist
from system.hardware.tici.pins import GPIO
from system.hardware.tici.amplifier import Amplifier
NM = 'org.freedesktop.NetworkManager'
NM_CON_ACT = NM + '.Connection.Active'

@ -2,8 +2,8 @@
import os
import time
import numpy as np
from selfdrive.hardware.tici.hardware import Tici
from selfdrive.hardware.tici.pins import GPIO
from system.hardware.tici.hardware import Tici
from system.hardware.tici.pins import GPIO
from common.gpio import gpio_init, gpio_set
def read_power():

@ -1,6 +1,6 @@
#!/usr/bin/env python3
import numpy as np
from selfdrive.hardware.tici.power_monitor import sample_power
from system.hardware.tici.power_monitor import sample_power
if __name__ == '__main__':
print("measuring for 5 seconds")

@ -4,8 +4,8 @@ import time
import math
from dataclasses import dataclass
from selfdrive.hardware import HARDWARE, TICI
from selfdrive.hardware.tici.power_monitor import get_power
from system.hardware import HARDWARE, TICI
from system.hardware.tici.power_monitor import get_power
from selfdrive.manager.process_config import managed_processes
from selfdrive.manager.manager import manager_cleanup

@ -1,7 +1,7 @@
import json
import os
from common.file_helpers import mkdirs_exists_ok
from selfdrive.hardware import PC
from system.hardware import PC
class MissingAuthConfigError(Exception):

Loading…
Cancel
Save