rename rawgpsd to qcomgpsd (#30493)

* rename rawgpsd to qcomgpsd

* fix more paths

* that moved

* forgot the d
pull/30496/head
Adeeb Shihadeh 1 year ago committed by GitHub
parent 2a9986d948
commit 4cae08e636
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      Jenkinsfile
  2. 2
      release/files_tici
  3. 2
      selfdrive/manager/process_config.py
  4. 2
      selfdrive/test/test_onroad.py
  5. 0
      system/qcomgpsd/modemdiag.py
  6. 6
      system/qcomgpsd/nmeaport.py
  7. 8
      system/qcomgpsd/qcomgpsd.py
  8. 0
      system/qcomgpsd/structs.py
  9. 28
      system/qcomgpsd/tests/test_qcomgpsd.py

2
Jenkinsfile vendored

@ -216,7 +216,7 @@ node {
["test pandad", "pytest selfdrive/boardd/tests/test_pandad.py"],
["test amp", "pytest system/hardware/tici/tests/test_amplifier.py"],
["test hw", "pytest system/hardware/tici/tests/test_hardware.py"],
["test rawgpsd", "pytest system/sensord/rawgps/test_rawgps.py"],
["test qcomgpsd", "pytest system/qcomgpsd/tests/test_qcomgpsd.py"],
])
},

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

@ -68,7 +68,7 @@ procs = [
PythonProcess("controlsd", "selfdrive.controls.controlsd", only_onroad),
PythonProcess("deleter", "system.loggerd.deleter", always_run),
PythonProcess("dmonitoringd", "selfdrive.monitoring.dmonitoringd", driverview, enabled=(not PC or WEBCAM)),
PythonProcess("rawgpsd", "system.sensord.rawgps.rawgpsd", qcomgps, enabled=TICI),
PythonProcess("qcomgpsd", "system.qcomgpsd.qcomgpsd", qcomgps, enabled=TICI),
PythonProcess("navd", "selfdrive.navd.navd", only_onroad),
PythonProcess("pandad", "selfdrive.boardd.pandad", always_run),
PythonProcess("paramsd", "selfdrive.locationd.paramsd", only_onroad),

@ -69,7 +69,7 @@ PROCS.update({
},
"tizi": {
"./boardd": 19.0,
"system.sensord.rawgps.rawgpsd": 1.0,
"system.qcomgpsd.qcomgpsd": 1.0,
}
}.get(HARDWARE.get_device_type(), {}))

@ -120,11 +120,11 @@ def process_nmea_port_messages(device:str="/dev/ttyUSB1") -> NoReturn:
def main() -> NoReturn:
from openpilot.common.gpio import gpio_init, gpio_set
from openpilot.system.hardware.tici.pins import GPIO
from openpilot.system.sensord.rawgps.rawgpsd import at_cmd
from openpilot.system.qcomgpsd.qcomgpsd import at_cmd
try:
check_output(["pidof", "rawgpsd"])
print("rawgpsd is running, please kill openpilot before running this script! (aborted)")
check_output(["pidof", "qcomgpsd"])
print("qcomgpsd is running, please kill openpilot before running this script! (aborted)")
sys.exit(1)
except CalledProcessError as e:
if e.returncode != 1: # 1 == no process found (boardd not running)

@ -18,8 +18,8 @@ import cereal.messaging as messaging
from openpilot.common.gpio import gpio_init, gpio_set
from openpilot.system.hardware.tici.pins import GPIO
from openpilot.system.swaglog import cloudlog
from openpilot.system.sensord.rawgps.modemdiag import ModemDiag, DIAG_LOG_F, setup_logs, send_recv
from openpilot.system.sensord.rawgps.structs import (dict_unpacker, position_report, relist,
from openpilot.system.qcomgpsd.modemdiag import ModemDiag, DIAG_LOG_F, setup_logs, send_recv
from openpilot.system.qcomgpsd.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,
@ -101,7 +101,7 @@ def at_cmd(cmd: str) -> Optional[str]:
try:
return subprocess.check_output(f"mmcli -m any --timeout 30 --command='{cmd}'", shell=True, encoding='utf8')
except subprocess.CalledProcessError:
cloudlog.exception("rawgps.mmcli_command_failed")
cloudlog.exception("qcomgps.mmcli_command_failed")
time.sleep(1.0)
raise Exception(f"failed to execute mmcli command {cmd=}")
@ -163,7 +163,7 @@ def inject_assistance():
return
except subprocess.CalledProcessError as e:
cloudlog.event(
"rawgps.assistance_loading_failed",
"qcomgps.assistance_loading_failed",
error=True,
cmd=e.cmd,
output=e.output,

@ -8,7 +8,7 @@ import unittest
import subprocess
import cereal.messaging as messaging
from openpilot.system.sensord.rawgps.rawgpsd import at_cmd, wait_for_modem
from openpilot.system.qcomgpsd.qcomgpsd import at_cmd, wait_for_modem
from openpilot.selfdrive.manager.process_config import managed_processes
GOOD_SIGNAL = bool(int(os.getenv("GOOD_SIGNAL", '0')))
@ -24,7 +24,7 @@ class TestRawgpsd(unittest.TestCase):
@classmethod
def tearDownClass(cls):
managed_processes['rawgpsd'].stop()
managed_processes['qcomgpsd'].stop()
os.system("sudo systemctl restart systemd-resolved")
os.system("sudo systemctl restart ModemManager lte")
@ -33,7 +33,7 @@ class TestRawgpsd(unittest.TestCase):
self.sm = messaging.SubMaster(['qcomGnss', 'gpsLocation', 'gnssMeasurements'])
def tearDown(self):
managed_processes['rawgpsd'].stop()
managed_processes['qcomgpsd'].stop()
os.system("sudo systemctl restart systemd-resolved")
def _wait_for_output(self, t):
@ -51,7 +51,7 @@ class TestRawgpsd(unittest.TestCase):
def test_wait_for_modem(self):
os.system("sudo systemctl stop ModemManager")
managed_processes['rawgpsd'].start()
managed_processes['qcomgpsd'].start()
assert not self._wait_for_output(5)
os.system("sudo systemctl restart ModemManager")
@ -62,15 +62,15 @@ class TestRawgpsd(unittest.TestCase):
if not internet:
os.system("sudo systemctl stop systemd-resolved")
with self.subTest(internet=internet):
managed_processes['rawgpsd'].start()
managed_processes['qcomgpsd'].start()
assert self._wait_for_output(7)
managed_processes['rawgpsd'].stop()
managed_processes['qcomgpsd'].stop()
def test_turns_off_gnss(self):
for s in (0.1, 1, 5):
managed_processes['rawgpsd'].start()
managed_processes['qcomgpsd'].start()
time.sleep(s)
managed_processes['rawgpsd'].stop()
managed_processes['qcomgpsd'].stop()
ls = subprocess.check_output("mmcli -m any --location-status --output-json", shell=True, encoding='utf-8')
loc_status = json.loads(ls)
@ -94,29 +94,29 @@ class TestRawgpsd(unittest.TestCase):
assert valid_duration == '0'
def test_assistance_loading(self):
managed_processes['rawgpsd'].start()
managed_processes['qcomgpsd'].start()
assert self._wait_for_output(10)
managed_processes['rawgpsd'].stop()
managed_processes['qcomgpsd'].stop()
self.check_assistance(True)
def test_no_assistance_loading(self):
os.system("sudo systemctl stop systemd-resolved")
managed_processes['rawgpsd'].start()
managed_processes['qcomgpsd'].start()
assert self._wait_for_output(10)
managed_processes['rawgpsd'].stop()
managed_processes['qcomgpsd'].stop()
self.check_assistance(False)
def test_late_assistance_loading(self):
os.system("sudo systemctl stop systemd-resolved")
managed_processes['rawgpsd'].start()
managed_processes['qcomgpsd'].start()
self._wait_for_output(17)
assert self.sm.updated['qcomGnss']
os.system("sudo systemctl restart systemd-resolved")
time.sleep(15)
managed_processes['rawgpsd'].stop()
managed_processes['qcomgpsd'].stop()
self.check_assistance(True)
if __name__ == "__main__":
Loading…
Cancel
Save