Files
panda-meb/tests/automated/5_gps.py
Adeeb Shihadeh 8b41ed3b81 Deprecate ESP (#592)
* remove unused wifi tests

* remove that one too

* no bootmode from ESP

* clean that up

* remove two more wifi tests

* remove boardesp and esptool

* esp_gps -> gps

* missed those

* remove esptool refs

* remove esp certs

* no more wifi

* that was old

* cleanup jenkins dockerfile

* fix linter

* remove more wifi refs

* clone panda jungle from github

* no copy

* always default esp to off
2020-08-26 15:37:50 -07:00

23 lines
694 B
Python

import time
from panda import PandaSerial
from .helpers import reset_pandas, test_all_gps_pandas, panda_connect_and_init
# Reset the pandas before running tests
def aaaa_reset_before_tests():
reset_pandas()
@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 i 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