Skip to content

Commit d618e23

Browse files
author
Karl Fleischmann
committed
add masks in use code comment
1 parent 473ba27 commit d618e23

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

adafruit_mcp2515/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,7 @@ def _create_mask(self, match):
782782
else:
783783
mask = STDID_BOTTOM_11_MASK
784784

785-
# has this mask already been setup, if so just return the index
785+
# has this mask already been loaded?
786786
for index, existing_mask in enumerate(self._masks_in_use):
787787
if mask == existing_mask:
788788
self._dbg("Mask Found", index, existing_mask)
@@ -793,7 +793,8 @@ def _create_mask(self, match):
793793
next_mask_index = masks_used
794794

795795
self._set_mask_register(next_mask_index, mask, match.extended)
796-
# self._masks_in_use.append(MASKS[next_mask_index])
796+
# Append the actual mask to the 'in use' array so later we can
797+
# find it to use again
797798
self._masks_in_use.append(mask)
798799
return next_mask_index
799800

0 commit comments

Comments
 (0)