Skip to content

Commit

Permalink
Add DEBUG_SERIAL #define macros where missing
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmpye committed Sep 5, 2023
1 parent fb76d1d commit 5ed20b5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions V10_BMS/src/serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ void usart_read_callback(struct usart_module *const usart_module) {
//We want 20 byte messages as they contain the error flags.
if (serial_read_buffer[startFrame + MSG_NUM_OFFSET] == 0x06 || serial_read_buffer[startFrame + MSG_NUM_OFFSET] == 0x03) {
if (serial_read_buffer[startFrame+ MSG_ERR_CODE_OFFSET] == 0x01) {
#ifdef SERIAL_DEBUG
serial_debug_send_message("USART message: Error from vacuum: FILTER\r\n");
#endif
leds_show_filter_err_status(true);
}
else {
Expand All @@ -105,7 +107,9 @@ void usart_read_callback(struct usart_module *const usart_module) {
}
else if (serial_read_buffer[startFrame + MSG_NUM_OFFSET] == 0x04 ||serial_read_buffer[startFrame + MSG_NUM_OFFSET] == 0x07) {
if (serial_read_buffer[startFrame+ MSG_ERR_CODE_OFFSET] == 0x01) {
#ifdef SERIAL_DEBUG
serial_debug_send_message("USART message: Error from vacuum: BLOCKED\r\n");
#endif
leds_show_blocked_err_status(true);
}
else {
Expand Down

0 comments on commit 5ed20b5

Please sign in to comment.