From 247010eb4624c27a9a92c114c16e8a674ee1bdd5 Mon Sep 17 00:00:00 2001 From: Jessy Diamond Exum Date: Fri, 14 Jul 2017 21:59:23 -0700 Subject: [PATCH] Added can forwarding method to python library. --- panda/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/panda/__init__.py b/panda/__init__.py index 1fed253..d180be0 100644 --- a/panda/__init__.py +++ b/panda/__init__.py @@ -148,7 +148,11 @@ class Panda(object): # ******************* configuration ******************* def set_controls_allowed(self, on): - self._handle.controlWrite(Panda.REQUEST_TYPE, 0xdc, (0x1337 if on else 0), 0, b'') + self._handle.controlWrite(Panda.REQUEST_TYPE, 0xdc, (0x1337 if on else 0), 0, b'') + + def set_can_forwarding(self, from_bus, to_bus): + """This feature may not work correctly with saturated busses""" + self._handle.controlWrite(Panda.REQUEST_TYPE, 0xdd, from_bus, to_bus, b'') def set_gmlan(self, on, bus=2): self._handle.controlWrite(Panda.REQUEST_TYPE, 0xdb, on, bus, b'')