-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
107 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/usr/bin/env python | ||
import time | ||
from panda import Panda | ||
|
||
p1 = Panda('430026000951363338383037') | ||
p2 = Panda('380016000551363338383037') | ||
|
||
# this is a test, no safety | ||
p1.set_safety_mode(Panda.SAFETY_ALLOUTPUT) | ||
p2.set_safety_mode(Panda.SAFETY_ALLOUTPUT) | ||
|
||
# get versions | ||
print(p1.get_version()) | ||
print(p2.get_version()) | ||
|
||
# this sets bus 2 to actually be GMLAN | ||
p2.set_gmlan(bus=2) | ||
|
||
# send w bitbang then without | ||
p1.set_gmlan(bus=None) | ||
p1.can_send(20, "\x01", bus=3) | ||
p1.set_gmlan(bus=2) | ||
p1.can_send(20, "\x01", bus=3) | ||
#time.sleep(0.1) | ||
#p1.set_gmlan(bus=None) | ||
#p1.can_send(20, "\x01", bus=3) | ||
|
||
# test echo | ||
# (to send on GMLAN, set bus=3) | ||
time.sleep(0.1) | ||
print p2.can_recv() | ||
|