('ack-delimiter', 'ACK delimiter'),
('stuff-bit', 'Stuff bit'),
('warnings', 'Human-readable warnings'),
- ('bits', 'Bits'),
+ ('bit', 'Bit'),
)
annotation_rows = (
- ('bits', 'Bits', (17,)),
- ('fields', 'Fields', tuple(range(17))),
+ ('bits', 'Bits', (15, 17)),
+ ('fields', 'Fields', tuple(range(15)) + (16,)),
)
def __init__(self, **kwargs):
return False
# Stuff bit. Keep it in self.rawbits, but drop it from self.bits.
- self.putx([15, ['Stuff bit: %d' % self.rawbits[-1],
- 'SB: %d' % self.rawbits[-1], 'SB']])
self.bits.pop() # Drop last bit.
return True
# Get the index of the current CAN frame bit (without stuff bits).
bitnum = len(self.bits) - 1
- # Emit a bit value annotation.
- self.putx([17, [str(can_rx)]])
-
# If this is a stuff bit, remove it from self.bits and ignore it.
if self.is_stuff_bit():
+ self.putx([15, [str(can_rx)]])
self.curbit += 1 # Increase self.curbit (bitnum is not affected).
return
+ else:
+ self.putx([17, [str(can_rx)]])
# Bit 0: Start of frame (SOF) bit
if bitnum == 0: