Files
panda-meb/scripts/relay_test.py

18 lines
332 B
Python
Raw Normal View History

2020-08-17 10:15:17 +00:00
#!/usr/bin/env python
import time
from opendbc.car.structs import CarParams
2020-08-17 10:15:17 +00:00
from panda import Panda
p = Panda()
while True:
p.set_safety_mode(CarParams.SafetyModel.toyota)
2020-08-17 10:15:17 +00:00
p.send_heartbeat()
print("ON")
time.sleep(1)
p.set_safety_mode(CarParams.SafetyModel.noOutput)
2020-08-17 10:15:17 +00:00
p.send_heartbeat()
print("OFF")
time.sleep(1)