You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The log system gives detialed runtime information and therefore with help with debug. Some examples:
Consider a logic that waits for CAN bus mailbox availability, if the wait time exceeds threshold, it means something goes wrong. The only noticeable behavior in such case might just be a non-working motor. However given only the external behavior would be hard to precisely and efficiently locate the issue.
This is how it used to be like
while (HAL_CAN_GetTxMailboxesFreeLevel(&hcan2) == 0);
possible implementation of logging system
while (HAL_CAN_GetTxMailboxesFreeLevel(&hcan2) == 0) {
Log_Warning("[can bsp] can mailbox full. CAN send data pending.");
if (pending_time > PENDING_ERROR_THRESHOLD_TIME) {
Log_Error("[can bsp] can mailbox is really unhappy for %f s.", pending_time);
}
}
another example would be receiving CAN frame with unregistered CAN id
The text was updated successfully, but these errors were encountered:
Add customized log logic. Possible interface could be:
The log system gives detialed runtime information and therefore with help with debug. Some examples:
Consider a logic that waits for CAN bus mailbox availability, if the wait time exceeds threshold, it means something goes wrong. The only noticeable behavior in such case might just be a non-working motor. However given only the external behavior would be hard to precisely and efficiently locate the issue.
This is how it used to be like
possible implementation of logging system
another example would be receiving CAN frame with unregistered CAN id
The text was updated successfully, but these errors were encountered: