Make the gmlan test a little easier to use
@@ -46,6 +46,7 @@ if __name__ == "__main__":
p0.can_clear(0xFFFF)
p1.can_clear(0xFFFF)
+ try:
loops = 0
while True:
for speed in [33.3, 83.3]:
@@ -61,14 +62,14 @@ if __name__ == "__main__":
send(p1, 1, b"1to0:" + bytes(str(loops%100), "utf-8"))
time.sleep(0.05)
rx = list(filter(lambda x: x[3] < 128, p0.can_recv()))
- #print(rx)
+ print(rx)
assert(len(rx) == 1)
print("Send 0 -> 1")
send(p0, 1, b"0to1:" + bytes(str(loops%100), "utf-8"))
time.sleep(0.05)
rx = list(filter(lambda x: x[3] < 128, p1.can_recv()))
- #print(rx)
+ print(rx)
assert(len(rx) == 1)
time.sleep(0.5)
@@ -76,4 +77,5 @@ if __name__ == "__main__":
loops += 1
print(f"Completed {loops} loops")
- #time.sleep(2)
+ except:
+ print("Test failed somehow. Did you power the black panda using the GMLAN harness?")
