forked from commaai/panda
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CAN: health message for each CAN module (commaai#1067)
* initial can health pkt * MISRA: variable scope * MISRA 10.4 * typo * add total_fwd_cnt * check size of can_health_t * improve * comment * that's better * move * add health check to tests * why? * ... * revert later * meh * Revert "meh" This reverts commit 0eb8432. * Revert "revert later" This reverts commit 2d98957. * adjust test
- Loading branch information
1 parent
38257a9
commit 0eef8cf
Showing
11 changed files
with
193 additions
and
86 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// When changing this struct, python/__init__.py needs to be kept up to date! | ||
#define CAN_HEALTH_PACKET_VERSION 1 | ||
typedef struct __attribute__((packed)) { | ||
uint8_t bus_off; | ||
uint32_t bus_off_cnt; | ||
uint8_t error_warning; | ||
uint8_t error_passive; | ||
uint8_t last_error; // real time LEC value | ||
uint8_t last_stored_error; // last LEC positive error code stored | ||
uint8_t last_data_error; // DLEC (for CANFD only) | ||
uint8_t last_data_stored_error; // last DLEC positive error code stored (for CANFD only) | ||
uint8_t receive_error_cnt; // REC | ||
uint8_t transmit_error_cnt; // TEC | ||
uint32_t total_error_cnt; // How many times any error interrupt were invoked | ||
uint32_t total_tx_lost_cnt; // Tx event FIFO element Lost | ||
uint32_t total_rx_lost_cnt; // Rx FIFO 0 message Lost | ||
uint32_t total_tx_cnt; | ||
uint32_t total_rx_cnt; | ||
uint32_t total_fwd_cnt; // Messages forwarded from one bus to another | ||
} can_health_t; |
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
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.