log all meterbus uart errors

This commit is contained in:
Wolfgang Hottgenroth 2020-11-22 22:59:41 +01:00
parent bd435dd5d6
commit 3dd954d379
No known key found for this signature in database
GPG Key ID: 656C88C7C1734267

View File

@ -269,6 +269,7 @@ void mbusCommRxCpltCallback(UART_HandleTypeDef *huart) {
} }
void mbusCommErrorCallback(UART_HandleTypeDef *huart) { void mbusCommErrorCallback(UART_HandleTypeDef *huart) {
coloredMsg(LOG_RED, false, "mbc errcb 0x%02x", huart->ErrorCode);
if (huart->ErrorCode == HAL_UART_ERROR_ORE) { if (huart->ErrorCode == HAL_UART_ERROR_ORE) {
coloredMsg(LOG_RED, false, "mbc errcb overrun error, restart receiving"); coloredMsg(LOG_RED, false, "mbc errcb overrun error, restart receiving");
mbusCommStats.overrunCnt += 1; mbusCommStats.overrunCnt += 1;