Skip to content

Potentially unused SocketCAN constants? #574

Closed
@karlding

Description

@karlding

I was looking through the SocketCAN constants defined in can/interfaces/socketcan/constants.py, and noticed these constants:

REMOTE_FRAME = True
DATA_FRAME = False
WAKEUP_MSG = True
ERROR_FRAME = True

DRIVER_MODE_SILENT = False
DRIVER_MODE_NORMAL = (not DRIVER_MODE_SILENT)

What is the purpose of these? Are these just to be backwards compatible so we aren't breaking some old API? I didn't seem to find any documentation about these or a deprecation warning anywhere..

Otherwise, I didn't see any references in the code where they are used, so can they safely be removed? In my local testing it doesn't seem like removing these breaks anything.

I have prepared a patch to remove these, but I thought I'd check first before jumping the gun 😂

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions