Skip to content

app: refactor and align code#232

Merged
DematteisGiacomo merged 1 commit intomainfrom
align_review_cline
Apr 29, 2025
Merged

app: refactor and align code#232
DematteisGiacomo merged 1 commit intomainfrom
align_review_cline

Conversation

@DematteisGiacomo
Copy link
Copy Markdown
Collaborator

Refactor and align code across modules.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors and aligns code across modules by standardizing naming conventions, function parameter names, and thread/callback identifiers. Key updates include renaming state objects and callback functions for clarity, updating comments, and improving consistency in module threading and watchdog handling.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
app/src/modules/power/power.c Updated state struct naming and renamed function parameters and callbacks.
app/src/modules/network/network.c Reformatted module state enum and updated inline comments.
app/src/modules/location/location.c Renamed state object and function parameters to improve consistency.
app/src/modules/fota/fota.c Standardized state handler declarations and thread/callback naming.
app/src/modules/environmental/environmental.c Applied naming consistency and updated log module registration.
app/src/modules/cloud/cloud.c Refactored state object and state handler names; improved logging.
Comments suppressed due to low confidence (1)

app/src/modules/network/network.c:62

  • Typo in comment: 'disconencted' should be corrected to 'disconnected'.
/* The device is disconencted from network and is not searching */

Refactor and align code across modules.

Signed-off-by: Giacomo Dematteis <giacomo.dematteis@nordicsemi.no>
@sonarqubecloud
Copy link
Copy Markdown

* detachment yet.
*/
STATE_DISCONNECTING,
/* The device is not connected to a network */
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Indentation as intended here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

yes, to highlight the hierarchies in the state machine. Other modules (cloud and fota) have the same

@DematteisGiacomo DematteisGiacomo merged commit 9cc4f47 into main Apr 29, 2025
4 checks passed
@DematteisGiacomo DematteisGiacomo deleted the align_review_cline branch April 29, 2025 07:51
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.

4 participants