From c9188a739d674080a86097b477b68c64d6b2e3b1 Mon Sep 17 00:00:00 2001 From: Christian Sandberg Date: Sun, 15 Oct 2017 14:53:55 +0200 Subject: [PATCH] Fix EMCY reset --- canopen/emcy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/canopen/emcy.py b/canopen/emcy.py index 9d88753e..f193914d 100644 --- a/canopen/emcy.py +++ b/canopen/emcy.py @@ -22,7 +22,7 @@ def __init__(self): def on_emcy(self, can_id, data, timestamp): code, register, data = self.EMCY_STRUCT.unpack(data) - if code & 0xFF == 0: + if code & 0xFF00 == 0: # Error reset self.active = [] for callback in self.callbacks: