sensord: move to system/ (#27531)

* sensord: move to system/

* add gitignore to releaes files
old-commit-hash: 6f40f0d442
This commit is contained in:
Adeeb Shihadeh
2023-03-08 10:56:54 -08:00
committed by GitHub
parent a9b38c148d
commit 47d30174d3
50 changed files with 51 additions and 51 deletions

3
.gitignore vendored
View File

@@ -46,9 +46,6 @@ selfdrive/mapd/default_speeds_by_region.json
system/proclogd/proclogd
selfdrive/ui/_ui
selfdrive/test/longitudinal_maneuvers/out
selfdrive/visiond/visiond
selfdrive/sensord/_gpsd
selfdrive/sensord/_sensord
system/camerad/camerad
system/camerad/test/ae_gray_test
selfdrive/modeld/_modeld

6
Jenkinsfile vendored
View File

@@ -159,7 +159,7 @@ pipeline {
["test power draw", "python system/hardware/tici/test_power_draw.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"],
["test pigeond", "python selfdrive/sensord/tests/test_pigeond.py"],
["test pigeond", "python system/sensord/tests/test_pigeond.py"],
["test manager", "python selfdrive/manager/test/test_manager.py"],
["test pandad", "python selfdrive/boardd/tests/test_pandad.py"],
])
@@ -193,11 +193,11 @@ pipeline {
steps {
phone_steps("tici-lsmc", [
["build", "cd selfdrive/manager && ./build.py"],
["test sensord", "cd selfdrive/sensord/tests && python -m unittest test_sensord.py"],
["test sensord", "cd system/sensord/tests && python -m unittest test_sensord.py"],
])
phone_steps("tici-bmx-lsm", [
["build", "cd selfdrive/manager && ./build.py"],
["test sensord", "cd selfdrive/sensord/tests && python -m unittest test_sensord.py"],
["test sensord", "cd system/sensord/tests && python -m unittest test_sensord.py"],
])
}
}

View File

@@ -427,7 +427,7 @@ SConscript(['selfdrive/boardd/SConscript'])
SConscript(['selfdrive/loggerd/SConscript'])
SConscript(['selfdrive/locationd/SConscript'])
SConscript(['selfdrive/sensord/SConscript'])
SConscript(['system/sensord/SConscript'])
SConscript(['selfdrive/ui/SConscript'])
SConscript(['selfdrive/navd/SConscript'])

View File

@@ -83,7 +83,7 @@ common
sensorsd
^^^^^^^^
.. autodoxygenindex::
:project: selfdrive_sensord_sensors
:project: system_sensord_sensors
boardd
^^^^^^

View File

@@ -276,12 +276,13 @@ selfdrive/loggerd/uploader.py
selfdrive/loggerd/deleter.py
selfdrive/loggerd/xattr_cache.py
selfdrive/sensord/SConscript
selfdrive/sensord/sensors_qcom2.cc
selfdrive/sensord/sensors/*.cc
selfdrive/sensord/sensors/*.h
selfdrive/sensord/sensord
selfdrive/sensord/pigeond.py
system/sensord/.gitignore
system/sensord/SConscript
system/sensord/sensors_qcom2.cc
system/sensord/sensors/*.cc
system/sensord/sensors/*.h
system/sensord/sensord
system/sensord/pigeond.py
selfdrive/thermald/thermald.py
selfdrive/thermald/power_monitoring.py

View File

@@ -13,7 +13,7 @@ system/camerad/cameras/camera_util.cc
system/camerad/cameras/camera_util.h
system/camerad/cameras/real_debayer.cl
selfdrive/sensord/rawgps/*
system/sensord/rawgps/*
selfdrive/ui/qt/spinner_larch64
selfdrive/ui/qt/text_larch64

View File

@@ -14,7 +14,7 @@
#include "common/timing.h"
#include "common/util.h"
#include "selfdrive/sensord/sensors/constants.h"
#include "system/sensord/sensors/constants.h"
#define VISION_DECIMATION 2
#define SENSOR_DECIMATION 10
#include "selfdrive/locationd/models/live_kf.h"

View File

@@ -39,7 +39,7 @@ procs = [
NativeProcess("modeld", "selfdrive/modeld", ["./modeld"]),
NativeProcess("mapsd", "selfdrive/navd", ["./map_renderer"], enabled=False),
NativeProcess("navmodeld", "selfdrive/modeld", ["./navmodeld"], enabled=False),
NativeProcess("sensord", "selfdrive/sensord", ["./sensord"], enabled=not PC),
NativeProcess("sensord", "system/sensord", ["./sensord"], enabled=not PC),
NativeProcess("ui", "selfdrive/ui", ["./ui"], offroad=True, watchdog_max_dt=(5 if not PC else None)),
NativeProcess("soundd", "selfdrive/ui/soundd", ["./soundd"], offroad=True),
NativeProcess("locationd", "selfdrive/locationd", ["./locationd"]),
@@ -50,12 +50,12 @@ procs = [
PythonProcess("deleter", "selfdrive.loggerd.deleter", offroad=True),
PythonProcess("dmonitoringd", "selfdrive.monitoring.dmonitoringd", enabled=(not PC or WEBCAM), callback=driverview),
PythonProcess("laikad", "selfdrive.locationd.laikad"),
PythonProcess("rawgpsd", "selfdrive.sensord.rawgps.rawgpsd", enabled=TICI),
PythonProcess("rawgpsd", "system.sensord.rawgps.rawgpsd", enabled=TICI),
PythonProcess("navd", "selfdrive.navd.navd"),
PythonProcess("pandad", "selfdrive.boardd.pandad", offroad=True),
PythonProcess("paramsd", "selfdrive.locationd.paramsd"),
NativeProcess("ubloxd", "selfdrive/locationd", ["./ubloxd"], enabled=TICI, onroad=False, callback=ublox),
PythonProcess("pigeond", "selfdrive.sensord.pigeond", enabled=TICI, onroad=False, callback=ublox),
PythonProcess("pigeond", "system.sensord.pigeond", enabled=TICI, onroad=False, callback=ublox),
PythonProcess("plannerd", "selfdrive.controls.plannerd"),
PythonProcess("radard", "selfdrive.controls.radard"),
PythonProcess("thermald", "selfdrive.thermald.thermald", offroad=True),

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:35a7b4ad9a5abb16a835a8c652c66bb541c6694d65bf0523e7b7f091206bf8af
size 103

1
system/sensord/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
_sensord

View File

@@ -15,8 +15,8 @@ from common.gpio import gpio_init, gpio_set
from laika.gps_time import GPSTime
from system.hardware.tici.pins import GPIO
from system.swaglog import cloudlog
from selfdrive.sensord.rawgps.modemdiag import ModemDiag, DIAG_LOG_F, setup_logs, send_recv
from selfdrive.sensord.rawgps.structs import (dict_unpacker, position_report, relist,
from system.sensord.rawgps.modemdiag import ModemDiag, DIAG_LOG_F, setup_logs, send_recv
from system.sensord.rawgps.structs import (dict_unpacker, position_report, relist,
gps_measurement_report, gps_measurement_report_sv,
glonass_measurement_report, glonass_measurement_report_sv,
oemdre_measurement_report, oemdre_measurement_report_sv, oemdre_svpoly_report,

4
system/sensord/sensord Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/sh
cd "$(dirname "$0")"
export LD_LIBRARY_PATH="/system/lib64:$LD_LIBRARY_PATH"
exec ./_sensord

View File

@@ -1,6 +1,6 @@
#pragma once
#include "selfdrive/sensord/sensors/i2c_sensor.h"
#include "system/sensord/sensors/i2c_sensor.h"
// Address of the chip on the bus
#define BMX055_ACCEL_I2C_ADDR 0x18

View File

@@ -1,6 +1,6 @@
#pragma once
#include "selfdrive/sensord/sensors/i2c_sensor.h"
#include "system/sensord/sensors/i2c_sensor.h"
// Address of the chip on the bus
#define BMX055_GYRO_I2C_ADDR 0x68

View File

@@ -1,7 +1,7 @@
#pragma once
#include <tuple>
#include "selfdrive/sensord/sensors/i2c_sensor.h"
#include "system/sensord/sensors/i2c_sensor.h"
// Address of the chip on the bus
#define BMX055_MAGN_I2C_ADDR 0x10

View File

@@ -2,7 +2,7 @@
#include <cassert>
#include "selfdrive/sensord/sensors/bmx055_accel.h"
#include "system/sensord/sensors/bmx055_accel.h"
#include "common/swaglog.h"
#include "common/timing.h"

View File

@@ -1,7 +1,7 @@
#pragma once
#include "selfdrive/sensord/sensors/bmx055_accel.h"
#include "selfdrive/sensord/sensors/i2c_sensor.h"
#include "system/sensord/sensors/bmx055_accel.h"
#include "system/sensord/sensors/i2c_sensor.h"
class BMX055_Temp : public I2CSensor {
uint8_t get_device_address() {return BMX055_ACCEL_I2C_ADDR;}

View File

@@ -4,7 +4,7 @@
#include <string>
#include "cereal/gen/cpp/log.capnp.h"
#include "selfdrive/sensord/sensors/sensor.h"
#include "system/sensord/sensors/sensor.h"
class FileSensor : public Sensor {
protected:

View File

@@ -8,8 +8,8 @@
#include "common/gpio.h"
#include "common/swaglog.h"
#include "selfdrive/sensord/sensors/constants.h"
#include "selfdrive/sensord/sensors/sensor.h"
#include "system/sensord/sensors/constants.h"
#include "system/sensord/sensors/sensor.h"
int16_t read_12_bit(uint8_t lsb, uint8_t msb);
int16_t read_16_bit(uint8_t lsb, uint8_t msb);

View File

@@ -3,7 +3,7 @@
#include <string>
#include "common/timing.h"
#include "selfdrive/sensord/sensors/constants.h"
#include "system/sensord/sensors/constants.h"
LightSensor::LightSensor(std::string filename) : FileSensor(filename) {}

View File

@@ -1,6 +1,6 @@
#pragma once
#include "selfdrive/sensord/sensors/i2c_sensor.h"
#include "system/sensord/sensors/i2c_sensor.h"
// Address of the chip on the bus
#define LSM6DS3_ACCEL_I2C_ADDR 0x6A

View File

@@ -1,6 +1,6 @@
#pragma once
#include "selfdrive/sensord/sensors/i2c_sensor.h"
#include "system/sensord/sensors/i2c_sensor.h"
// Address of the chip on the bus
#define LSM6DS3_GYRO_I2C_ADDR 0x6A

View File

@@ -1,6 +1,6 @@
#pragma once
#include "selfdrive/sensord/sensors/i2c_sensor.h"
#include "system/sensord/sensors/i2c_sensor.h"
// Address of the chip on the bus
#define LSM6DS3_TEMP_I2C_ADDR 0x6A

View File

@@ -1,6 +1,6 @@
#pragma once
#include "selfdrive/sensord/sensors/i2c_sensor.h"
#include "system/sensord/sensors/i2c_sensor.h"
// Address of the chip on the bus
#define MMC5603NJ_I2C_ADDR 0x30

View File

@@ -12,17 +12,17 @@
#include "common/swaglog.h"
#include "common/timing.h"
#include "common/util.h"
#include "selfdrive/sensord/sensors/bmx055_accel.h"
#include "selfdrive/sensord/sensors/bmx055_gyro.h"
#include "selfdrive/sensord/sensors/bmx055_magn.h"
#include "selfdrive/sensord/sensors/bmx055_temp.h"
#include "selfdrive/sensord/sensors/constants.h"
#include "selfdrive/sensord/sensors/light_sensor.h"
#include "selfdrive/sensord/sensors/lsm6ds3_accel.h"
#include "selfdrive/sensord/sensors/lsm6ds3_gyro.h"
#include "selfdrive/sensord/sensors/lsm6ds3_temp.h"
#include "selfdrive/sensord/sensors/mmc5603nj_magn.h"
#include "selfdrive/sensord/sensors/sensor.h"
#include "system/sensord/sensors/bmx055_accel.h"
#include "system/sensord/sensors/bmx055_gyro.h"
#include "system/sensord/sensors/bmx055_magn.h"
#include "system/sensord/sensors/bmx055_temp.h"
#include "system/sensord/sensors/constants.h"
#include "system/sensord/sensors/light_sensor.h"
#include "system/sensord/sensors/lsm6ds3_accel.h"
#include "system/sensord/sensors/lsm6ds3_gyro.h"
#include "system/sensord/sensors/lsm6ds3_temp.h"
#include "system/sensord/sensors/mmc5603nj_magn.h"
#include "system/sensord/sensors/sensor.h"
#define I2C_BUS_IMU 1

View File

@@ -5,7 +5,7 @@ import struct
from common.params import Params
import cereal.messaging as messaging
import selfdrive.sensord.pigeond as pd
import system.sensord.pigeond as pd
from system.hardware import TICI
from selfdrive.test.helpers import with_processes

View File

@@ -4,7 +4,7 @@ import time
import unittest
import cereal.messaging as messaging
import selfdrive.sensord.pigeond as pd
import system.sensord.pigeond as pd
from common.params import Params
from system.hardware import TICI