Files
panda-meb/tests/hitl/5_gps.py
Adeeb Shihadeh b3e9292922 HITL test fixups (#1117)
* automated -> hitl

* simplify

* jenkinsfile cleanup

* cleanup

* fix new linter errors

* fix ws cleanup

* some retry

* more cleaning up after ourselves

* unpin scons

* bump opendbc

* fix quotes

* enable flaky

* debug print

Co-authored-by: Bruce Wayne <batman@comma.ai>
2022-11-03 17:24:28 -07:00

19 lines
591 B
Python

import time
from panda import PandaSerial
from .helpers import test_all_gps_pandas, panda_connect_and_init
@test_all_gps_pandas
@panda_connect_and_init
def test_gps_version(p):
serial = PandaSerial(p, 1, 9600)
# Reset and check twice to make sure the enabling works
for _ in range(2):
# Reset GPS
p.set_esp_power(0)
time.sleep(2)
p.set_esp_power(1)
time.sleep(1)
# Read startup message and check if version is contained
dat = serial.read(0x1000) # Read one full panda DMA buffer. This should include the startup message
assert b'HPG 1.40ROV' in dat