-
Notifications
You must be signed in to change notification settings - Fork 590
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ixxat bus state and hardware errors detection (#1141)
* Added comment to CAN_MSGFLAGS_* and CAN_MSGFLAGS2_* constants * CANMSGINFO.bAddFlags has been renamed to bFlags2 in IXXAT VCI4 * Added a comment that CANMSGINFO.Bytes.bAddFlags is called bFlags2 in VCI v4. * Implementation is now tested against VCI v4 * Dropped manual timeout handling as it is a job done by BusABC.read(). Better handling of CAN error messages: - In case of HW errors (overrun, warning limit exceeded, bus coupling error) raise VCIError - In case of error log IXXAT-specific error codes * Fixed unbound variable usage. Use log.warning instead of deprecated log.warn. * Now wrapping IXXAT VCI v4 * Added CAN_OPMODE_AUTOBAUD controller operating mode. * Mapped symbol canChannelGetStatus, used to implement the 'state' property. Hardware error checking in _recv_internal() handles BUS OFF situation. * Use CANMSGINFO.bAddFlags instead of CANMSGINFO.bFlags2 * Call canControlClose() AFTER canControlReset() or it will always fail * Added CANMSG.__str__ * Removed conflict marker * Renamed parameter 'msg' to 'msgs' in _send_periodic_internal(), consistent with BusABC * Changed plain format() calls to f-strings as per review * Removed binascii module dependency using memoryview Co-authored-by: Giuseppe Corbelli <giuseppe.corbelli@weightpack.com>
- Loading branch information
Showing
7 changed files
with
183 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.