Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apps/blestress: extend functionality of blestress #1731

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

piotrnarajowski
Copy link
Contributor

@piotrnarajowski piotrnarajowski commented Mar 20, 2024

This commit adds new enchancements to blestress app such as:

  • Define device role (TX/RX) using shell command
  • run only specific test case

@piotrnarajowski piotrnarajowski force-pushed the console_input branch 3 times, most recently from a02f549 to 951aed9 Compare March 21, 2024 12:04
This commit adds new enchancements to blestress app.
@piotrnarajowski piotrnarajowski marked this pull request as ready for review March 22, 2024 15:51
uint8_t dflt = 0;
int rc;

rc = parse_arg_init(argc - 1, argv +1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
rc = parse_arg_init(argc - 1, argv +1);
rc = parse_arg_init(argc - 1, argv + 1);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick

Comment on lines +794 to +795
.itvl_min = 0x0006,/*BLE_GAP_INITIAL_CONN_ITVL_MIN */
.itvl_max = 0x0006,/*BLE_GAP_INITIAL_CONN_ITVL_MIN */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.itvl_min = 0x0006,/*BLE_GAP_INITIAL_CONN_ITVL_MIN */
.itvl_max = 0x0006,/*BLE_GAP_INITIAL_CONN_ITVL_MIN */
.itvl_min = 0x0006,/* BLE_GAP_INITIAL_CONN_ITVL_MIN */
.itvl_max = 0x0006,/* BLE_GAP_INITIAL_CONN_ITVL_MIN */

nitpick

Comment on lines +1478 to +1479
} else {
rx_stress_start(test_case_num);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is else here necessary? If test_case_num == 0 run those loops, otherwise just run rx_stress_start(test_case_num), or am I missing something?

Suggested change
} else {
rx_stress_start(test_case_num);
}
rx_stress_start(test_case_num);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The point was not to run rx_stress_start(0) after exiting the if statement

void rx_stress_start_auto();

#ifdef __cplusplus
}
#endif

#endif //_BLE_STRESS_RX_H
#endif /*_BLE_STRESS_RX_H */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick

Suggested change
#endif /*_BLE_STRESS_RX_H */
#endif /* _BLE_STRESS_RX_H */

Comment on lines +32 to +34
console_printf(
"\033[0;33mUse case 1 - "
"Stress Connect -> Connect Cancel: \n\033[0m");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
console_printf(
"\033[0;33mUse case 1 - "
"Stress Connect -> Connect Cancel: \n\033[0m");
console_printf("\033[0;33mUse case 1 - "
"Stress Connect -> Connect Cancel: \n\033[0m");

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applies also in some places below.

Comment on lines +35 to +36
console_printf("Con attempts = %d\n",
test_ctxs->con_stat[1].attempts_num);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
console_printf("Con attempts = %d\n",
test_ctxs->con_stat[1].attempts_num);
console_printf("Con attempts = %d\n",
test_ctxs->con_stat[1].attempts_num);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applies also in some places below.

@@ -1640,13 +1647,13 @@ tx_stress_main_task_fn(void *arg)
assert(rc == 0);

/* Start test 1 - Connect/Connect cancel */
//tx_stress_test_perform(1);
/*tx_stress_test_perform(1); */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick

Suggested change
/*tx_stress_test_perform(1); */
/* tx_stress_test_perform(1); */

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants