Skip to content

Commit

Permalink
Update example scripts to support canfd (commaai#1059)
Browse files Browse the repository at this point in the history
  • Loading branch information
zunichky authored and mlocoteta committed Apr 29, 2023
1 parent 32df789 commit 87a85ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/can_bit_transition.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ class Message():

def __init__(self, message_id):
self.message_id = message_id
self.ones = [0] * 8 # bit set if 1 is always seen
self.zeros = [0] * 8 # bit set if 0 is always seen
self.ones = [0] * 64 # bit set if 1 is always seen
self.zeros = [0] * 64 # bit set if 0 is always seen

def printBitDiff(self, other):
"""Prints bits that transition from always zero to always 1 and vice versa."""
Expand Down
4 changes: 2 additions & 2 deletions examples/can_unique.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ class Message():
def __init__(self, message_id):
self.message_id = message_id
self.data = {} # keyed by hex string encoded message data
self.ones = [0] * 8 # bit set if 1 is seen
self.zeros = [0] * 8 # bit set if 0 has been seen
self.ones = [0] * 64 # bit set if 1 is seen
self.zeros = [0] * 64 # bit set if 0 has been seen

def printBitDiff(self, other):
"""Prints bits that are set or cleared compared to other background."""
Expand Down

0 comments on commit 87a85ee

Please sign in to comment.