From 2496d15d8af8e8be10bb65681897f05fc5aae9d7 Mon Sep 17 00:00:00 2001 From: oomzay Date: Fri, 9 Feb 2018 13:42:11 +0000 Subject: [PATCH] VectorBus: Added reset() method. --- can/interfaces/vector/canlib.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/can/interfaces/vector/canlib.py b/can/interfaces/vector/canlib.py index eb18d6e39..19e2c78da 100644 --- a/can/interfaces/vector/canlib.py +++ b/can/interfaces/vector/canlib.py @@ -174,3 +174,9 @@ def shutdown(self): vxlapi.xlDeactivateChannel(self.port_handle, self.mask) vxlapi.xlClosePort(self.port_handle) vxlapi.xlCloseDriver() + + def reset(self): + vxlapi.xlDeactivateChannel(self.port_handle, self.mask) + vxlapi.xlActivateChannel(self.port_handle, self.mask, + vxlapi.XL_BUS_TYPE_CAN, 0) +