sensord: move to system/ (#27531)

* sensord: move to system/

* add gitignore to releaes files
pull/27534/head
Adeeb Shihadeh 2 years ago committed by GitHub
parent ce900f34d0
commit 6f40f0d442
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      .gitignore
  2. 6
      Jenkinsfile
  3. 2
      SConstruct
  4. 2
      docs/c_docs.rst
  5. 13
      release/files_common
  6. 2
      release/files_tici
  7. 2
      selfdrive/locationd/locationd.h
  8. 6
      selfdrive/manager/process_config.py
  9. 1
      system/sensord/.gitignore
  10. 0
      system/sensord/SConscript
  11. 0
      system/sensord/__init__.py
  12. 0
      system/sensord/pigeond.py
  13. 0
      system/sensord/rawgps/compare.py
  14. 0
      system/sensord/rawgps/modemdiag.py
  15. 4
      system/sensord/rawgps/rawgpsd.py
  16. 0
      system/sensord/rawgps/structs.py
  17. 0
      system/sensord/rawgps/test_rawgps.py
  18. 0
      system/sensord/sensord
  19. 0
      system/sensord/sensors/bmx055_accel.cc
  20. 2
      system/sensord/sensors/bmx055_accel.h
  21. 0
      system/sensord/sensors/bmx055_gyro.cc
  22. 2
      system/sensord/sensors/bmx055_gyro.h
  23. 0
      system/sensord/sensors/bmx055_magn.cc
  24. 2
      system/sensord/sensors/bmx055_magn.h
  25. 2
      system/sensord/sensors/bmx055_temp.cc
  26. 4
      system/sensord/sensors/bmx055_temp.h
  27. 0
      system/sensord/sensors/constants.h
  28. 0
      system/sensord/sensors/file_sensor.cc
  29. 2
      system/sensord/sensors/file_sensor.h
  30. 0
      system/sensord/sensors/i2c_sensor.cc
  31. 4
      system/sensord/sensors/i2c_sensor.h
  32. 2
      system/sensord/sensors/light_sensor.cc
  33. 0
      system/sensord/sensors/light_sensor.h
  34. 0
      system/sensord/sensors/lsm6ds3_accel.cc
  35. 2
      system/sensord/sensors/lsm6ds3_accel.h
  36. 0
      system/sensord/sensors/lsm6ds3_gyro.cc
  37. 2
      system/sensord/sensors/lsm6ds3_gyro.h
  38. 0
      system/sensord/sensors/lsm6ds3_temp.cc
  39. 2
      system/sensord/sensors/lsm6ds3_temp.h
  40. 0
      system/sensord/sensors/mmc5603nj_magn.cc
  41. 2
      system/sensord/sensors/mmc5603nj_magn.h
  42. 0
      system/sensord/sensors/sensor.h
  43. 22
      system/sensord/sensors_qcom2.cc
  44. 0
      system/sensord/tests/__init__.py
  45. 0
      system/sensord/tests/test_pigeond.py
  46. 0
      system/sensord/tests/test_sensord.py
  47. 0
      system/sensord/tests/ttff_test.py
  48. 2
      tools/gpstest/test_gps.py
  49. 2
      tools/gpstest/test_laikad.py

3
.gitignore vendored

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

6
Jenkinsfile vendored

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

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

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

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

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

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

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

@ -0,0 +1 @@
_sensord

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save