18 lines
332 B
18 lines
332 B
1 year ago
|
#!/usr/bin/env python
|
||
|
import time
|
||
4 months ago
|
from opendbc.car.structs import CarParams
|
||
1 year ago
|
from panda import Panda
|
||
|
|
||
|
p = Panda()
|
||
|
|
||
|
while True:
|
||
4 months ago
|
p.set_safety_mode(CarParams.SafetyModel.toyota)
|
||
1 year ago
|
p.send_heartbeat()
|
||
|
print("ON")
|
||
|
time.sleep(1)
|
||
4 months ago
|
p.set_safety_mode(CarParams.SafetyModel.noOutput)
|
||
1 year ago
|
p.send_heartbeat()
|
||
|
print("OFF")
|
||
|
time.sleep(1)
|
||
|
|