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

example/twr_aloha: fixes #17988

Merged
merged 6 commits into from
Apr 27, 2022
Merged

Conversation

fjmolinas
Copy link
Contributor

@fjmolinas fjmolinas commented Apr 22, 2022

Contribution description

This PR fixes some issues with the examples/twr_aloha example and some improvements to work better as read-eval-print-loops:

repl improvements:

  • 359ad5e: only print distance values on initiator to avoid spurious data on the other node pexpect buffer
  • 93f7066: make sure the function blocks for the whole request time

misc improvemtns:

  • 5e7bb6c: error on invalid short address
  • 1af9cdb: extends ifconfig command

fixes:

  • 26969e2: should be & and not &&
  • 544551d: adds missing request parameters

Testing procedure

examples/twr_aloha still functions correctly

> main(): This is RIOT! (Version: 2022.07-devel-236-gbab476-pr_twr_aloha_fixes)
> ifconfig
ifconfig
Iface  3        HWaddr: 03:B4  Channel: 5  NID: DE:CA

                Long HWaddr: 08:2B:31:07:CC:53:03:B4
                TX-Power: 8.0dBm  TC-PGdelay: 0xb5
> twr lst on
twr lst on
[twr]: start listening
>
main(): This is RIOT! (Version: 2022.07-devel-236-gbab476-pr_twr_aloha_fixes)
> twr req -c 5 -i 100 03:B4
twr req -c 5 -i 100 03:B4
[twr]: start ranging
{"t": 15519, "src": "57:81", "dst": "03:B4", "d_cm": 27}
{"t": 15620, "src": "57:81", "dst": "03:B4", "d_cm": 28}
{"t": 15720, "src": "57:81", "dst": "03:B4", "d_cm": 30}
{"t": 15820, "src": "57:81", "dst": "03:B4", "d_cm": 26}
{"t": 15920, "src": "57:81", "dst": "03:B4", "d_cm": 32}

the test passes:

make -C examples/twr_aloha/ flash test-with-config

...
----------------------------------------------------------------------
Ran 3 tests in 9.262s

OK

@fjmolinas fjmolinas requested a review from jia200x as a code owner April 22, 2022 13:55
@github-actions github-actions bot added Area: doc Area: Documentation Area: examples Area: Example Applications Area: pkg Area: External package ports labels Apr 22, 2022
@fjmolinas fjmolinas added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Apr 22, 2022
@fjmolinas
Copy link
Contributor Author

I'll split once the CI is green.

@benpicco benpicco requested a review from aabadie April 22, 2022 14:37
@fjmolinas fjmolinas force-pushed the pr_twr_aloha_fixes branch 2 times, most recently from c48756b to bfa909b Compare April 25, 2022 11:07
@fjmolinas fjmolinas force-pushed the pr_twr_aloha_fixes branch from bfa909b to 3e91ed6 Compare April 27, 2022 06:25
@github-actions github-actions bot removed the Area: pkg Area: External package ports label Apr 27, 2022
@fjmolinas fjmolinas force-pushed the pr_twr_aloha_fixes branch 2 times, most recently from 010054d to 359ad5e Compare April 27, 2022 06:31
@fjmolinas fjmolinas changed the title pkg/uwb_core: many fixes example/twr_aloha: fixes Apr 27, 2022
@fjmolinas fjmolinas force-pushed the pr_twr_aloha_fixes branch 2 times, most recently from bc97fdc to 4cf13fd Compare April 27, 2022 06:41
@github-actions github-actions bot removed the Area: doc Area: Documentation label Apr 27, 2022
@fjmolinas fjmolinas force-pushed the pr_twr_aloha_fixes branch from 4cf13fd to 6067b41 Compare April 27, 2022 06:41
@fjmolinas fjmolinas force-pushed the pr_twr_aloha_fixes branch from 6067b41 to bab476a Compare April 27, 2022 07:07
@fjmolinas fjmolinas force-pushed the pr_twr_aloha_fixes branch from bab476a to a5f54b5 Compare April 27, 2022 07:12
Copy link
Contributor

@aabadie aabadie left a comment

Choose a reason for hiding this comment

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

Code changes look good and test outputs are provided.

ACK

@fjmolinas fjmolinas merged commit c036b6c into RIOT-OS:master Apr 27, 2022
@fjmolinas fjmolinas deleted the pr_twr_aloha_fixes branch April 27, 2022 10:50
@chrysn chrysn added this to the Release 2022.07 milestone Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: examples Area: Example Applications CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants