openpilot is an open source driver assistance system. openpilot performs the functions of Automated Lane Centering and Adaptive Cruise Control for over 200 supported car makes and models.

23 lines
456 B

5 years ago
#!/usr/bin/env python3
import zmq
import time
from hexdump import hexdump
import cereal.messaging as messaging
from cereal.services import service_list
from cereal import log
def mock_x():
liveMpc = messaging.pub_sock('liveMpc')
while 1:
m = messaging.new_message()
mx = []
m.init('liveMpc')
for x in range(0, 100):
mx.append(x*1.0)
m.liveMpc.x = mx
liveMpc.send(m.to_bytes())
if __name__=="__main__":
mock_x()