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

* move hardware to system/

* fix mypy
This commit is contained in:
Adeeb Shihadeh 2022-06-11 16:38:24 -07:00 committed by GitHub
parent 5add0c6159
commit 1139fe507b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
91 changed files with 102 additions and 101 deletions

2
Jenkinsfile vendored
View File

@ -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"],

View File

@ -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__)), "../"))

View 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;

View File

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

View File

@ -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

View File

@ -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:

View File

@ -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";

View File

@ -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
}

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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");

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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()) {

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

1
selfdrive/hardware Symbolic link
View File

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

View File

@ -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']

View File

@ -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();

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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_"

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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")

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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 {

View File

@ -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() {

View File

@ -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"

View File

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

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"));

View File

@ -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"

View File

@ -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) {

View File

@ -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

View File

@ -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);

View File

@ -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)

View File

@ -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"

View File

@ -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[] = {

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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 {

View File

@ -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

View File

View File

@ -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:

View File

@ -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'

View File

@ -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():

View File

@ -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")

View File

@ -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

View File

@ -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):