sensord: move to system/ (#27531)

* sensord: move to system/

* add gitignore to releaes files
old-commit-hash: 6f40f0d442
beeps
Adeeb Shihadeh 2 years ago committed by GitHub
parent a9b38c148d
commit 47d30174d3
  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. 3
      selfdrive/sensord/sensord
  10. 1
      system/sensord/.gitignore
  11. 0
      system/sensord/SConscript
  12. 0
      system/sensord/__init__.py
  13. 0
      system/sensord/pigeond.py
  14. 0
      system/sensord/rawgps/compare.py
  15. 0
      system/sensord/rawgps/modemdiag.py
  16. 4
      system/sensord/rawgps/rawgpsd.py
  17. 0
      system/sensord/rawgps/structs.py
  18. 0
      system/sensord/rawgps/test_rawgps.py
  19. 4
      system/sensord/sensord
  20. 0
      system/sensord/sensors/bmx055_accel.cc
  21. 2
      system/sensord/sensors/bmx055_accel.h
  22. 0
      system/sensord/sensors/bmx055_gyro.cc
  23. 2
      system/sensord/sensors/bmx055_gyro.h
  24. 0
      system/sensord/sensors/bmx055_magn.cc
  25. 2
      system/sensord/sensors/bmx055_magn.h
  26. 2
      system/sensord/sensors/bmx055_temp.cc
  27. 4
      system/sensord/sensors/bmx055_temp.h
  28. 0
      system/sensord/sensors/constants.h
  29. 0
      system/sensord/sensors/file_sensor.cc
  30. 2
      system/sensord/sensors/file_sensor.h
  31. 0
      system/sensord/sensors/i2c_sensor.cc
  32. 4
      system/sensord/sensors/i2c_sensor.h
  33. 2
      system/sensord/sensors/light_sensor.cc
  34. 0
      system/sensord/sensors/light_sensor.h
  35. 0
      system/sensord/sensors/lsm6ds3_accel.cc
  36. 2
      system/sensord/sensors/lsm6ds3_accel.h
  37. 0
      system/sensord/sensors/lsm6ds3_gyro.cc
  38. 2
      system/sensord/sensors/lsm6ds3_gyro.h
  39. 0
      system/sensord/sensors/lsm6ds3_temp.cc
  40. 2
      system/sensord/sensors/lsm6ds3_temp.h
  41. 0
      system/sensord/sensors/mmc5603nj_magn.cc
  42. 2
      system/sensord/sensors/mmc5603nj_magn.h
  43. 0
      system/sensord/sensors/sensor.h
  44. 22
      system/sensord/sensors_qcom2.cc
  45. 0
      system/sensord/tests/__init__.py
  46. 0
      system/sensord/tests/test_pigeond.py
  47. 0
      system/sensord/tests/test_sensord.py
  48. 0
      system/sensord/tests/ttff_test.py
  49. 2
      tools/gpstest/test_gps.py
  50. 2
      tools/gpstest/test_laikad.py

3
.gitignore vendored

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

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

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

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

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

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

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

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

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

@ -0,0 +1 @@
_sensord

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save