ubloxd: move to system/ (#27536)

* ubloxd: move to system/

* more fixes

* add missing sconscript

* fix valgrind tests

* uncomment
old-commit-hash: c97911dbad
beeps
Adeeb Shihadeh 2 years ago committed by GitHub
parent bc53c9199c
commit de9a100719
  1. 3
      .github/workflows/selfdrive_tests.yaml
  2. 1
      SConstruct
  3. 13
      release/files_common
  4. 3
      selfdrive/locationd/.gitignore
  5. 21
      selfdrive/locationd/SConscript
  6. 2
      selfdrive/manager/process_config.py
  7. 2
      selfdrive/test/test_valgrind_replay.py
  8. 2
      system/ubloxd/.gitignore
  9. 20
      system/ubloxd/SConscript
  10. 0
      system/ubloxd/generated/glonass.cpp
  11. 0
      system/ubloxd/generated/glonass.h
  12. 0
      system/ubloxd/generated/gps.cpp
  13. 0
      system/ubloxd/generated/gps.h
  14. 0
      system/ubloxd/generated/ubx.cpp
  15. 0
      system/ubloxd/generated/ubx.h
  16. 0
      system/ubloxd/glonass.ksy
  17. 6
      system/ubloxd/glonass_fix.patch
  18. 0
      system/ubloxd/gps.ksy
  19. 0
      system/ubloxd/tests/print_gps_stats.py
  20. 2
      system/ubloxd/tests/test_glonass_kaitai.cc
  21. 0
      system/ubloxd/tests/test_glonass_runner.cc
  22. 0
      system/ubloxd/tests/test_ublox_processing.py
  23. 0
      system/ubloxd/tests/ublox.py
  24. 0
      system/ubloxd/tests/ubloxd.py
  25. 0
      system/ubloxd/ublox_msg.cc
  26. 6
      system/ubloxd/ublox_msg.h
  27. 2
      system/ubloxd/ubloxd.cc
  28. 0
      system/ubloxd/ubx.ksy

@ -207,8 +207,9 @@ jobs:
$UNIT_TEST system/loggerd && \
$UNIT_TEST selfdrive/car && \
$UNIT_TEST selfdrive/locationd && \
$UNIT_TEST system/ubloxd && \
selfdrive/locationd/test/_test_locationd_lib.py && \
./selfdrive/locationd/test/test_glonass_runner && \
./system/ubloxd/tests/test_glonass_runner && \
$UNIT_TEST selfdrive/athena && \
$UNIT_TEST selfdrive/thermald && \
$UNIT_TEST system/hardware/tici && \

@ -398,6 +398,7 @@ SConscript([
'system/camerad/SConscript',
'system/clocksd/SConscript',
'system/proclogd/SConscript',
'system/ubloxd/SConscript',
])
if arch != "Darwin":
SConscript(['system/logcatd/SConscript'])

@ -219,14 +219,15 @@ system/hardware/pc/__init__.py
system/hardware/pc/hardware.h
system/hardware/pc/hardware.py
system/ubloxd/.gitignore
system/ubloxd/SConscript
system/ubloxd/generated/*
system/ubloxd/*.h
system/ubloxd/*.cc
selfdrive/locationd/__init__.py
selfdrive/locationd/.gitignore
selfdrive/locationd/SConscript
selfdrive/locationd/ubloxd.cc
selfdrive/locationd/ublox_msg.cc
selfdrive/locationd/ublox_msg.h
selfdrive/locationd/generated/*
selfdrive/locationd/.gitignore
selfdrive/locationd/laikad.py
selfdrive/locationd/locationd.h
selfdrive/locationd/locationd.cc

@ -1,6 +1,3 @@
ubloxd
ubloxd_test
params_learner
paramsd
locationd
test/test_glonass_runner

@ -1,20 +1,6 @@
Import('env', 'common', 'cereal', 'messaging', 'libkf', 'transformations')
loc_libs = [cereal, messaging, 'zmq', common, 'capnp', 'kj', 'kaitai', 'pthread']
if GetOption('kaitai'):
generated = Dir('generated').srcnode().abspath
cmd = f"kaitai-struct-compiler --target cpp_stl --outdir {generated} $SOURCES"
env.Command(['generated/ubx.cpp', 'generated/ubx.h'], 'ubx.ksy', cmd)
env.Command(['generated/gps.cpp', 'generated/gps.h'], 'gps.ksy', cmd)
glonass = env.Command(['generated/glonass.cpp', 'generated/glonass.h'], 'glonass.ksy', cmd)
# kaitai issue: https://github.com/kaitai-io/kaitai_struct/issues/910
patch = env.Command(None, 'glonass_fix.patch', 'git apply $SOURCES')
env.Depends(patch, glonass)
glonass_obj = env.Object('generated/glonass.cpp')
env.Program("ubloxd", ["ubloxd.cc", "ublox_msg.cc", "generated/ubx.cpp", "generated/gps.cpp", glonass_obj], LIBS=loc_libs)
loc_libs = [cereal, messaging, 'zmq', common, 'capnp', 'kj', 'pthread']
ekf_sym_cc = env.SharedObject("#rednose/helpers/ekf_sym.cc")
locationd_sources = ["locationd.cc", "models/live_kf.cc", ekf_sym_cc]
@ -25,7 +11,4 @@ lenv.Depends(locationd, libkf)
if File("liblocationd.cc").exists():
liblocationd = lenv.SharedLibrary("liblocationd", ["liblocationd.cc"] + locationd_sources, LIBS=loc_libs + transformations)
lenv.Depends(liblocationd, libkf)
if GetOption('test'):
env.Program("test/test_glonass_runner", ['test/test_glonass_runner.cc', 'test/test_glonass_kaitai.cc', glonass_obj], LIBS=[loc_libs])
lenv.Depends(liblocationd, libkf)

@ -54,7 +54,7 @@ procs = [
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),
NativeProcess("ubloxd", "system/ubloxd", ["./ubloxd"], 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"),

@ -28,7 +28,7 @@ CONFIGS = [
},
ignore=[],
command="./ubloxd",
path="selfdrive/locationd/",
path="system/ubloxd",
segment="0375fdf7b1ce594d|2019-06-13--08-32-25--3",
wait_for_response=True
),

@ -0,0 +1,2 @@
ubloxd
tests/test_glonass_runner

@ -0,0 +1,20 @@
Import('env', 'common', 'cereal', 'messaging')
loc_libs = [cereal, messaging, 'zmq', common, 'capnp', 'kj', 'kaitai', 'pthread']
if GetOption('kaitai'):
generated = Dir('generated').srcnode().abspath
cmd = f"kaitai-struct-compiler --target cpp_stl --outdir {generated} $SOURCES"
env.Command(['generated/ubx.cpp', 'generated/ubx.h'], 'ubx.ksy', cmd)
env.Command(['generated/gps.cpp', 'generated/gps.h'], 'gps.ksy', cmd)
glonass = env.Command(['generated/glonass.cpp', 'generated/glonass.h'], 'glonass.ksy', cmd)
# kaitai issue: https://github.com/kaitai-io/kaitai_struct/issues/910
patch = env.Command(None, 'glonass_fix.patch', 'git apply $SOURCES')
env.Depends(patch, glonass)
glonass_obj = env.Object('generated/glonass.cpp')
env.Program("ubloxd", ["ubloxd.cc", "ublox_msg.cc", "generated/ubx.cpp", "generated/gps.cpp", glonass_obj], LIBS=loc_libs)
if GetOption('test'):
env.Program("tests/test_glonass_runner", ['tests/test_glonass_runner.cc', 'tests/test_glonass_kaitai.cc', glonass_obj], LIBS=[loc_libs])

@ -1,7 +1,7 @@
diff --git a/selfdrive/locationd/generated/glonass.cpp b/selfdrive/locationd/generated/glonass.cpp
diff --git a/system/ubloxd/generated/glonass.cpp b/system/ubloxd/generated/glonass.cpp
index 5b17bc327..b5c6aa610 100644
--- a/selfdrive/locationd/generated/glonass.cpp
+++ b/selfdrive/locationd/generated/glonass.cpp
--- a/system/ubloxd/generated/glonass.cpp
+++ b/system/ubloxd/generated/glonass.cpp
@@ -17,7 +17,7 @@ glonass_t::glonass_t(kaitai::kstream* p__io, kaitai::kstruct* p__parent, glonass
void glonass_t::_read() {
m_idle_chip = m__io->read_bits_int_be(1);

@ -6,7 +6,7 @@
#include <ctime>
#include "catch2/catch.hpp"
#include "selfdrive/locationd/generated/glonass.h"
#include "system/ubloxd/generated/glonass.h"
typedef std::vector<std::pair<int, int64_t>> string_data;

@ -9,9 +9,9 @@
#include "cereal/messaging/messaging.h"
#include "common/util.h"
#include "selfdrive/locationd/generated/gps.h"
#include "selfdrive/locationd/generated/glonass.h"
#include "selfdrive/locationd/generated/ubx.h"
#include "system/ubloxd/generated/gps.h"
#include "system/ubloxd/generated/glonass.h"
#include "system/ubloxd/generated/ubx.h"
using namespace std::string_literals;

@ -5,7 +5,7 @@
#include "cereal/messaging/messaging.h"
#include "common/swaglog.h"
#include "common/util.h"
#include "selfdrive/locationd/ublox_msg.h"
#include "system/ubloxd/ublox_msg.h"
ExitHandler do_exit;
using namespace ublox;
Loading…
Cancel
Save