Skip to content

Commit

Permalink
better naming of warning condition variable
Browse files Browse the repository at this point in the history
  • Loading branch information
adammwest committed Oct 6, 2024
1 parent f85d361 commit faf924e
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion components/asic/bm1366.c
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ asic_result * BM1366_receive_work(void)
ESP_LOGI(TAG, "UART Error in serial RX");
return NULL;
} else if (uart_timeout) {
if (asic_timeout_counter>=asic_timeout_warning) {
if (asic_timeout_counter>=asic_timeout_warning_threshold) {
ESP_LOGE(TAG, "ASIC not sending data");
asic_timeout_counter = 0;
}
Expand Down
2 changes: 1 addition & 1 deletion components/asic/bm1368.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ asic_result * BM1368_receive_work(void)
ESP_LOGI(TAG, "UART Error in serial RX");
return NULL;
} else if (uart_timeout) {
if (asic_timeout_counter>=asic_timeout_warning) {
if (asic_timeout_counter>=asic_timeout_warning_threshold) {
ESP_LOGE(TAG, "ASIC not sending data");
asic_timeout_counter = 0;
}
Expand Down
2 changes: 1 addition & 1 deletion components/asic/bm1370.c
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ asic_result * BM1370_receive_work(void)
ESP_LOGI(TAG, "UART Error in serial RX");
return NULL;
} else if (uart_timeout) {
if (asic_timeout_counter>=asic_timeout_warning) {
if (asic_timeout_counter>=asic_timeout_warning_threshold) {
ESP_LOGE(TAG, "ASIC not sending data");
asic_timeout_counter = 0;
}
Expand Down
2 changes: 1 addition & 1 deletion components/asic/bm1397.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ asic_result *BM1397_receive_work(void)
ESP_LOGI(TAG, "UART Error in serial RX");
return NULL;
} else if (uart_timeout) {
if (asic_timeout_counter>=asic_timeout_warning) {
if (asic_timeout_counter>=asic_timeout_warning_threshold) {
ESP_LOGE(TAG, "ASIC not sending data");
asic_timeout_counter = 0;
}
Expand Down
2 changes: 1 addition & 1 deletion components/asic/include/serial.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#define CHUNK_SIZE 1024

static uint8_t asic_timeout_counter = 0;
static uint8_t asic_timeout_warning = 2;
static uint8_t asic_timeout_warning_threshold = 2;
static int uart_timeout_ms = 10000;

int SERIAL_send(uint8_t *, int, bool);
Expand Down

0 comments on commit faf924e

Please sign in to comment.