From e83a887c6b561eb93b6aab8c3830f0a2ee1eee6f Mon Sep 17 00:00:00 2001 From: Erik Olof Gunnar Andersson Date: Thu, 28 Nov 2024 21:06:40 +0100 Subject: [PATCH] Make code intent clearer --- main/main.c | 5 ++++- main/self_test/self_test.c | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/main/main.c b/main/main.c index 7b51abfd..ce4c9b07 100644 --- a/main/main.c +++ b/main/main.c @@ -126,7 +126,10 @@ void app_main(void) SERIAL_init(); (*GLOBAL_STATE.ASIC_functions.init_fn)(GLOBAL_STATE.POWER_MANAGEMENT_MODULE.frequency_value, GLOBAL_STATE.asic_count); - SERIAL_set_baud((*GLOBAL_STATE.ASIC_functions.set_max_baud_fn)(), GLOBAL_STATE.board_version >= 300); + + // Temporary work around for older boards. + bool wait_for_tx = GLOBAL_STATE.board_version >= 300; + SERIAL_set_baud((*GLOBAL_STATE.ASIC_functions.set_max_baud_fn)(), wait_for_tx); SERIAL_clear_buffer(); GLOBAL_STATE.ASIC_initalized = true; diff --git a/main/self_test/self_test.c b/main/self_test/self_test.c index 6242452c..d25ec8d2 100644 --- a/main/self_test/self_test.c +++ b/main/self_test/self_test.c @@ -241,7 +241,11 @@ void self_test(void * pvParameters) int baud = (*GLOBAL_STATE->ASIC_functions.set_max_baud_fn)(); vTaskDelay(10 / portTICK_PERIOD_MS); - SERIAL_set_baud(baud, GLOBAL_STATE->board_version >= 300); + + + // Temporary work around for older boards. + bool wait_for_tx = GLOBAL_STATE.board_version >= 300; + SERIAL_set_baud(baud, wait_for_tx); vTaskDelay(1000 / portTICK_PERIOD_MS);