mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-20 21:42:05 +08:00
100f89a161
* openpilot v0.9.9 release date: 2025-06-05T19:54:08 master commit: 8aadf02b2fd91f4e1285e18c2c7feb32d93b66f5 * AGNOS 12.4 (#35558) agnos12.4 --------- Co-authored-by: Vehicle Researcher <user@comma.ai> Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
18 lines
585 B
Python
Executable File
18 lines
585 B
Python
Executable File
#!/usr/bin/env python3
|
|
from opendbc.car.structs import CarParams
|
|
from panda import Panda
|
|
|
|
# This script is intended to be used in conjunction with the echo_loopback_test.py test script from panda jungle.
|
|
# It sends a reversed response back for every message received containing b"test".
|
|
if __name__ == "__main__":
|
|
p = Panda()
|
|
p.set_safety_mode(CarParams.SafetyModel.allOutput)
|
|
p.set_power_save(False)
|
|
|
|
while True:
|
|
incoming = p.can_recv()
|
|
for message in incoming:
|
|
address, data, bus = message
|
|
if b'test' in data:
|
|
p.can_send(address, data[::-1], bus)
|