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

caf: modules: added a custom command to the shell #11927

Merged
merged 1 commit into from
Aug 21, 2023

Conversation

tony-le-24
Copy link
Contributor

Added a custom command to simulate a button pressed event to the app_event_manager shell. This command then will be send using RTT in our nrf_cloud_rest_cell_location sample (with RTT Kconfigs enabled).

@tony-le-24 tony-le-24 requested a review from pdunaj as a code owner August 1, 2023 19:30
@github-actions github-actions bot added the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Aug 1, 2023
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Aug 1, 2023

Test specification

CI/Jenkins/NRF

  • Integration Platforms

CI/Jenkins/integration

Test Module File based changes Manually selected West overwrite
desktop52_verification X
test-fw-nrfconnect-apps X

Detailed information of selected test modules

Note: This message is automatically posted and updated by the CI

@tony-le-24 tony-le-24 marked this pull request as draft August 1, 2023 19:55
@plskeggs
Copy link
Contributor

plskeggs commented Aug 1, 2023

Looks good to me. You'll need to update the changelog and this page:
https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/others/app_event_manager.html

@tony-le-24 tony-le-24 force-pushed the rtt-support-cloud-samples branch 2 times, most recently from d61389c to 32fc050 Compare August 1, 2023 23:29
subsys/caf/modules/shell.c Outdated Show resolved Hide resolved
@NordicBuilder
Copy link
Contributor

You can find the documentation preview for this PR at this link. It will be updated about 10 minutes after the documentation build succeeds.

Note: This comment is automatically posted by the Documentation Publishing GitHub Action.

Copy link
Contributor

@glarsennordic glarsennordic left a comment

Choose a reason for hiding this comment

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

LGTM, only minor tweaks

subsys/caf/modules/CMakeLists.txt Outdated Show resolved Hide resolved
subsys/caf/modules/Kconfig Outdated Show resolved Hide resolved
subsys/caf/modules/Kconfig.shell Outdated Show resolved Hide resolved
subsys/caf/modules/shell.c Outdated Show resolved Hide resolved
@glarsennordic
Copy link
Contributor

Also please check the code owners for CAF to make sure we didn't miss them by accident since this code changed locations

Copy link
Contributor

@pdunaj pdunaj left a comment

Choose a reason for hiding this comment

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

I think it's ok.
We actually wanted to add injecting events but there was never enough time to do it. We can start with this change.

I originally thought injecting could actually be done in type agnostic way. The arguments could be event name (used to extract type id from section) and raw event data (that would have to be formed by the caller based on type). Maybe we should add it...

@pdunaj
Copy link
Contributor

pdunaj commented Aug 3, 2023

@MarekPieta , can you have a look?

@pdunaj pdunaj requested a review from MarekPieta August 3, 2023 08:13
subsys/caf/modules/Kconfig.shell Outdated Show resolved Hide resolved
subsys/caf/modules/Kconfig.shell Outdated Show resolved Hide resolved
subsys/caf/modules/shell.c Outdated Show resolved Hide resolved
subsys/caf/modules/shell.c Outdated Show resolved Hide resolved
subsys/caf/modules/shell.c Outdated Show resolved Hide resolved
subsys/caf/modules/shell.c Outdated Show resolved Hide resolved
subsys/caf/modules/shell.c Outdated Show resolved Hide resolved
@github-actions github-actions bot added doc-required PR must not be merged without tech writer approval. and removed changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. labels Aug 7, 2023
@tony-le-24 tony-le-24 requested a review from peknis August 7, 2023 17:03
@tony-le-24 tony-le-24 marked this pull request as ready for review August 7, 2023 17:08
@tony-le-24
Copy link
Contributor Author

@peknis I added a new shell module for CAF. How should I change the docs? thanks

@peknis
Copy link
Contributor

peknis commented Aug 8, 2023

@peknis I added a new shell module for CAF. How should I change the docs? thanks

I'd believe you need to write a piece of the new module in \ncs\nrf\doc\nrf\libraries\caf

@tony-le-24
Copy link
Contributor Author

tony-le-24 commented Aug 8, 2023

I'd believe you need to write a piece of the new module in \ncs\nrf\doc\nrf\libraries\caf

Thank you so much. I didn't know these exist. There are docs for other issues that I've been having too.

doc/nrf/libraries/caf/caf_shell.rst Outdated Show resolved Hide resolved
doc/nrf/libraries/caf/caf_shell.rst Outdated Show resolved Hide resolved
doc/nrf/libraries/caf/caf_shell.rst Outdated Show resolved Hide resolved
doc/nrf/libraries/caf/caf_shell.rst Outdated Show resolved Hide resolved
@tony-le-24 tony-le-24 requested a review from peknis August 11, 2023 17:10
@tony-le-24 tony-le-24 changed the title [Draft] subsys: app_event_manager: added a custom command to the shell caf: modules: added a custom command to the shell Aug 11, 2023
doc/nrf/libraries/caf/caf_shell.rst Outdated Show resolved Hide resolved
doc/nrf/libraries/caf/caf_shell.rst Show resolved Hide resolved
doc/nrf/libraries/caf/caf_shell.rst Outdated Show resolved Hide resolved
subsys/caf/modules/Kconfig.caf_shell Outdated Show resolved Hide resolved
subsys/caf/modules/Kconfig.caf_shell Outdated Show resolved Hide resolved
doc/nrf/libraries/caf/caf_shell.rst Outdated Show resolved Hide resolved
doc/nrf/libraries/caf/caf_shell.rst Outdated Show resolved Hide resolved
subsys/caf/modules/caf_shell.c Outdated Show resolved Hide resolved
subsys/caf/modules/caf_shell.c Outdated Show resolved Hide resolved
subsys/caf/modules/caf_shell.c Outdated Show resolved Hide resolved
doc/nrf/libraries/caf/caf_shell.rst Outdated Show resolved Hide resolved
@tony-le-24
Copy link
Contributor Author

@MarekPieta Thank you so much for your detailed review. I'll update the docs today.

doc/nrf/libraries/caf/caf_shell.rst Outdated Show resolved Hide resolved
doc/nrf/libraries/caf/caf_shell.rst Outdated Show resolved Hide resolved
doc/nrf/libraries/caf/caf_shell.rst Outdated Show resolved Hide resolved
subsys/caf/modules/caf_shell.c Show resolved Hide resolved
subsys/caf/modules/caf_shell.c Outdated Show resolved Hide resolved
Added a shell module to the Common Application Framework, and
added a custom command to that shell to simulate button press
event.

Signed-off-by: Tony Le <tony.le@nordicsemi.no>
@rlubos rlubos merged commit cda6d29 into nrfconnect:main Aug 21, 2023
14 checks passed
@tony-le-24 tony-le-24 deleted the rtt-support-cloud-samples branch August 21, 2023 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-required PR must not be merged without tech writer approval.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants