Skip to content

Commit

Permalink
Commiting customer changes to unicast_server main()
Browse files Browse the repository at this point in the history
  • Loading branch information
desinord committed Dec 11, 2024
1 parent 0f7a92d commit 66ca8de
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions applications/nrf5340_audio/unicast_server/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,43 @@ int main(void)

ret = bt_mgmt_adv_start(0, ext_adv_buf, ext_adv_buf_cnt, NULL, 0, true);
ERR_CHK(ret);

Check failure on line 568 in applications/nrf5340_audio/unicast_server/main.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

TRAILING_WHITESPACE

applications/nrf5340_audio/unicast_server/main.c:568 trailing whitespace
// Test monotonicity

Check failure on line 569 in applications/nrf5340_audio/unicast_server/main.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

C99_COMMENTS

applications/nrf5340_audio/unicast_server/main.c:569 do not use C99 // comments
uint32_t timestamps_us[10];
int counter;
for (counter = 0; counter < 1000000; counter++){

Check warning on line 572 in applications/nrf5340_audio/unicast_server/main.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

LINE_SPACING

applications/nrf5340_audio/unicast_server/main.c:572 Missing a blank line after declarations

Check failure on line 572 in applications/nrf5340_audio/unicast_server/main.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

SPACING

applications/nrf5340_audio/unicast_server/main.c:572 space required before the open brace '{'
// progress bar

Check failure on line 573 in applications/nrf5340_audio/unicast_server/main.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

C99_COMMENTS

applications/nrf5340_audio/unicast_server/main.c:573 do not use C99 // comments
if ((counter % 1000) == 0) {
LOG_ERR("%u", counter);
}

// get some timestamps

Check failure on line 578 in applications/nrf5340_audio/unicast_server/main.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

C99_COMMENTS

applications/nrf5340_audio/unicast_server/main.c:578 do not use C99 // comments
int i;
for (i=0;i<10;i++){

Check warning on line 580 in applications/nrf5340_audio/unicast_server/main.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

LINE_SPACING

applications/nrf5340_audio/unicast_server/main.c:580 Missing a blank line after declarations

Check failure on line 580 in applications/nrf5340_audio/unicast_server/main.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

SPACING

applications/nrf5340_audio/unicast_server/main.c:580 spaces required around that '=' (ctx:VxV)

Check failure on line 580 in applications/nrf5340_audio/unicast_server/main.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

SPACING

applications/nrf5340_audio/unicast_server/main.c:580 space required after that ';' (ctx:VxV)

Check failure on line 580 in applications/nrf5340_audio/unicast_server/main.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

SPACING

applications/nrf5340_audio/unicast_server/main.c:580 spaces required around that '<' (ctx:VxV)

Check failure on line 580 in applications/nrf5340_audio/unicast_server/main.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

SPACING

applications/nrf5340_audio/unicast_server/main.c:580 space required after that ';' (ctx:VxV)

Check failure on line 580 in applications/nrf5340_audio/unicast_server/main.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

SPACING

applications/nrf5340_audio/unicast_server/main.c:580 space required before the open brace '{'
timestamps_us[i] = audio_sync_timer_capture();
}

// check if there's a negative delta
int incorrect_entry = -1;
for (i=1;i<10;i++){

Check warning on line 586 in applications/nrf5340_audio/unicast_server/main.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

LINE_SPACING

applications/nrf5340_audio/unicast_server/main.c:586 Missing a blank line after declarations
if (timestamps_us[i-1] > timestamps_us[i]){
incorrect_entry = i-1;
}
}

// report error
if (incorrect_entry >= 0){
LOG_ERR("\nIncorrect timestamp:");
for (i=0;i<10;i++){
if (incorrect_entry == i){
LOG_ERR("t[%u] = %u <<--", i, timestamps_us[i]);
} else {
LOG_ERR("t[%u] = %u", i, timestamps_us[i]);
}
}
break;
}
}
return 0;
}

0 comments on commit 66ca8de

Please sign in to comment.