Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
deanlee committed Nov 13, 2024
1 parent 7e1fb7e commit 88e15b0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions opendbc/can/parser_pyx.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,11 @@ cdef class CANParser:
del self.can

def update_strings(self, data, sendcan=False):
# If data is a Python nested list, update using the legacy method
if not hasattr(data, "get_data_pointer"):
return self.update_from_list(data, sendcan)

# If data is a ParsedCanData object, directly use the underlying C++ vector[CanData]
cdef uintptr_t pointer = data.get_data_pointer()
can_data = <vector[CanData]*> pointer
return self._update(can_data[0], sendcan)
Expand Down

0 comments on commit 88e15b0

Please sign in to comment.