Skip to content

Commit

Permalink
rename rawgpsd to qcomgpsd (commaai#30493)
Browse files Browse the repository at this point in the history
* rename rawgpsd to qcomgpsd

* fix more paths

* that moved

* forgot the d
  • Loading branch information
adeebshihadeh committed Nov 19, 2023
1 parent 2a9986d commit 4cae08e
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
])
},

Expand Down
2 changes: 1 addition & 1 deletion release/files_tici
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion selfdrive/manager/process_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def only_offroad(started, params, CP: car.CarParams) -> bool:
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),
Expand Down
2 changes: 1 addition & 1 deletion selfdrive/test/test_onroad.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
},
"tizi": {
"./boardd": 19.0,
"system.sensord.rawgps.rawgpsd": 1.0,
"system.qcomgpsd.qcomgpsd": 1.0,
}
}.get(HARDWARE.get_device_type(), {}))

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
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,
Expand Down Expand Up @@ -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=}")

Expand Down Expand Up @@ -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,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
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')))
Expand All @@ -24,7 +24,7 @@ def setUpClass(cls):

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

Expand All @@ -33,7 +33,7 @@ def setUp(self):
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):
Expand All @@ -51,7 +51,7 @@ def test_no_crash_double_command(self):

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")
Expand All @@ -62,15 +62,15 @@ def test_startup_time(self):
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)
Expand All @@ -94,29 +94,29 @@ def check_assistance(self, should_be_loaded):
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__":
Expand Down

0 comments on commit 4cae08e

Please sign in to comment.