Skip to content

Commit

Permalink
Make code intent clearer
Browse files Browse the repository at this point in the history
  • Loading branch information
eandersson committed Nov 28, 2024
1 parent ef6db86 commit e83a887
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 4 additions & 1 deletion main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 5 additions & 1 deletion main/self_test/self_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit e83a887

Please sign in to comment.