mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-19 21:43:59 +08:00
* car stuff
* thermal
* Revert "car stuff"
This reverts commit 77fd1c65ebd01abfa8493ae12c9e6b14f7ada976.
* panda state
* camera stuff
* start deg
* most is building
* builds
* planner + controls run
* fix up paramsd
* cleanup
* process replay passes
* fix webcam build
* camerad
* no more frame
* thermald
* ui
* paramsd
* camera replay
* fix long tests
* fix camerad tests
* maxSteeringAngle
* bump cereal
* more frame
* cereal master
old-commit-hash: 312b681a46
23 lines
908 B
Python
Executable File
23 lines
908 B
Python
Executable File
#!/usr/bin/env python3
|
|
import time
|
|
import cereal.messaging as messaging
|
|
from selfdrive.manager import start_managed_process, kill_managed_process
|
|
|
|
services = ['controlsState', 'deviceState', 'radarState'] # the services needed to be spoofed to start ui offroad
|
|
procs = ['camerad', 'ui', 'modeld', 'calibrationd']
|
|
[start_managed_process(p) for p in procs] # start needed processes
|
|
pm = messaging.PubMaster(services)
|
|
|
|
dat_cs, dat_deviceState, dat_radar = [messaging.new_message(s) for s in services]
|
|
dat_cs.controlsState.rearViewCam = False # ui checks for these two messages
|
|
dat_deviceState.deviceState.started = True
|
|
|
|
try:
|
|
while True:
|
|
pm.send('controlsState', dat_cs)
|
|
pm.send('deviceState', dat_deviceState)
|
|
pm.send('radarState', dat_radar)
|
|
time.sleep(1 / 100) # continually send, rate doesn't matter for deviceState
|
|
except KeyboardInterrupt:
|
|
[kill_managed_process(p) for p in procs]
|