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

[thread-host] add set channel max power api #2551

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

Irving-cl
Copy link
Contributor

This PR adds the SetChannelMaxPower method to ThreadHost.

The PR implements this method for RcpHost. The implementation for NCP will be added later.

Copy link

codecov bot commented Oct 21, 2024

Codecov Report

Attention: Patch coverage is 0% with 13 lines in your changes missing coverage. Please review.

Project coverage is 46.13%. Comparing base (2b41187) to head (104cacd).
Report is 849 commits behind head on main.

Files with missing lines Patch % Lines
src/ncp/rcp_host.cpp 0.00% 11 Missing ⚠️
src/ncp/ncp_host.cpp 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2551      +/-   ##
==========================================
- Coverage   55.77%   46.13%   -9.65%     
==========================================
  Files          87      104      +17     
  Lines        6890    12447    +5557     
  Branches        0      907     +907     
==========================================
+ Hits         3843     5742    +1899     
- Misses       3047     6394    +3347     
- Partials        0      311     +311     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Irving-cl Irving-cl force-pushed the thread_host_set_channel_max_power branch 2 times, most recently from 5159ada to d7ac367 Compare October 21, 2024 07:17
Copy link
Contributor

@zhanglongxia zhanglongxia left a comment

Choose a reason for hiding this comment

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

LGTM

@Irving-cl Irving-cl force-pushed the thread_host_set_channel_max_power branch 2 times, most recently from 11b942d to 345139a Compare October 23, 2024 15:03
@Irving-cl Irving-cl requested a review from jwhui October 29, 2024 03:48
@jwhui jwhui requested a review from abtink October 29, 2024 04:01
Copy link
Member

@abtink abtink left a comment

Choose a reason for hiding this comment

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

Looks good. 👍

One smaller suggestion below (the PR is also fine as is).

otbrLogInfo("Set channel max power: channel=%u, maxPower=%d", static_cast<unsigned int>(channel),
static_cast<int>(maxPower));
SuccessOrExit(error = otPlatRadioSetChannelTargetPower(mInstance, channel, maxPower),
errorMsg = "Failed to set channel max power");
Copy link
Member

Choose a reason for hiding this comment

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

Just noticed that we allow an optional action statement in SuccessOrExit() in ot-br-posix. Nice... :)

src/ncp/thread_host.hpp Outdated Show resolved Hide resolved
@Irving-cl Irving-cl force-pushed the thread_host_set_channel_max_power branch from 345139a to ca4146e Compare October 30, 2024 03:48
@Irving-cl Irving-cl force-pushed the thread_host_set_channel_max_power branch from ca4146e to 104cacd Compare October 30, 2024 03:49
@jwhui jwhui changed the title [thread host] add set channel max power api [thread-host] add set channel max power api Oct 30, 2024
@jwhui jwhui merged commit f9b3bd3 into openthread:main Oct 30, 2024
32 checks passed
@Irving-cl Irving-cl deleted the thread_host_set_channel_max_power branch November 6, 2024 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants