Skip to content

fix for updating credential #10

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

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

fix for updating credential #10

wants to merge 1 commit into from

Conversation

fabik111
Copy link
Collaborator

@fabik111 fabik111 commented May 16, 2025

This PR fix the problem:
If the AgentsManagerClass::update() is called also outside the NetworkConfigurator class and the NetworkConfigurator is in the CONFIGURED state, the NetworkConfigurator is no more able to detect when a new peer (Mobile app or FE) is connecting for changing credentials and, consequentially, to move to the state UPDATING_CONFIG when needed

Copy link

codecov bot commented May 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.13%. Comparing base (cab5e7e) to head (1b50d52).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #10   +/-   ##
=======================================
  Coverage   89.13%   89.13%           
=======================================
  Files           7        7           
  Lines         709      709           
  Branches       89       89           
=======================================
  Hits          632      632           
  Misses         77       77           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

Memory usage change @ 6f71366

Board flash % RAM for global variables %
arduino:mbed_giga:giga 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed_nano:nanorp2040connect 🔺 +14 - +14 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed_nicla:nicla_vision 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed_opta:opta 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed_portenta:envie_m7 N/A N/A N/A N/A
arduino:renesas_portenta:portenta_c33 🔺 +8 - +8 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:renesas_uno:unor4wifi 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrwifi1010 🔺 +16 - +16 +0.01 - +0.01 0 - 0 0.0 - 0.0
arduino:samd:nano_33_iot 🔺 +16 - +16 +0.01 - +0.01 0 - 0 0.0 - 0.0
Click for full report table
Board examples/NetworkConfiguratorDemo
flash
% examples/NetworkConfiguratorDemo
RAM for global variables
%
arduino:mbed_giga:giga 0 0.0 0 0.0
arduino:mbed_nano:nanorp2040connect 14 0.0 0 0.0
arduino:mbed_nicla:nicla_vision 0 0.0 0 0.0
arduino:mbed_opta:opta 0 0.0 0 0.0
arduino:mbed_portenta:envie_m7 N/A N/A N/A N/A
arduino:renesas_portenta:portenta_c33 8 0.0 0 0.0
arduino:renesas_uno:unor4wifi 0 0.0 0 0.0
arduino:samd:mkrwifi1010 16 0.01 0 0.0
arduino:samd:nano_33_iot 16 0.01 0 0.0
Click for full report CSV
Board,examples/NetworkConfiguratorDemo<br>flash,%,examples/NetworkConfiguratorDemo<br>RAM for global variables,%
arduino:mbed_giga:giga,0,0.0,0,0.0
arduino:mbed_nano:nanorp2040connect,14,0.0,0,0.0
arduino:mbed_nicla:nicla_vision,0,0.0,0,0.0
arduino:mbed_opta:opta,0,0.0,0,0.0
arduino:mbed_portenta:envie_m7,N/A,N/A,N/A,N/A
arduino:renesas_portenta:portenta_c33,8,0.0,0,0.0
arduino:renesas_uno:unor4wifi,0,0.0,0,0.0
arduino:samd:mkrwifi1010,16,0.01,0,0.0
arduino:samd:nano_33_iot,16,0.01,0,0.0

@per1234 per1234 added type: imperfection Perceived defect in any part of project topic: code Related to content of the project itself labels May 17, 2025
@fabik111 fabik111 marked this pull request as ready for review May 19, 2025 09:32
@fabik111 fabik111 requested a review from pennam May 19, 2025 09:33
@fabik111 fabik111 force-pushed the fix-connected-state branch from 6f71366 to 1b50d52 Compare May 19, 2025 11:54
Copy link

Memory usage change @ 1b50d52

Board flash % RAM for global variables %
arduino:mbed_giga:giga 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed_nano:nanorp2040connect 🔺 +14 - +14 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed_nicla:nicla_vision 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed_opta:opta 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed_portenta:envie_m7 N/A N/A N/A N/A
arduino:renesas_portenta:portenta_c33 🔺 +8 - +8 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:renesas_uno:unor4wifi 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrwifi1010 🔺 +16 - +16 +0.01 - +0.01 0 - 0 0.0 - 0.0
arduino:samd:nano_33_iot 🔺 +16 - +16 +0.01 - +0.01 0 - 0 0.0 - 0.0
Click for full report table
Board examples/NetworkConfiguratorDemo
flash
% examples/NetworkConfiguratorDemo
RAM for global variables
%
arduino:mbed_giga:giga 0 0.0 0 0.0
arduino:mbed_nano:nanorp2040connect 14 0.0 0 0.0
arduino:mbed_nicla:nicla_vision 0 0.0 0 0.0
arduino:mbed_opta:opta 0 0.0 0 0.0
arduino:mbed_portenta:envie_m7 N/A N/A N/A N/A
arduino:renesas_portenta:portenta_c33 8 0.0 0 0.0
arduino:renesas_uno:unor4wifi 0 0.0 0 0.0
arduino:samd:mkrwifi1010 16 0.01 0 0.0
arduino:samd:nano_33_iot 16 0.01 0 0.0
Click for full report CSV
Board,examples/NetworkConfiguratorDemo<br>flash,%,examples/NetworkConfiguratorDemo<br>RAM for global variables,%
arduino:mbed_giga:giga,0,0.0,0,0.0
arduino:mbed_nano:nanorp2040connect,14,0.0,0,0.0
arduino:mbed_nicla:nicla_vision,0,0.0,0,0.0
arduino:mbed_opta:opta,0,0.0,0,0.0
arduino:mbed_portenta:envie_m7,N/A,N/A,N/A,N/A
arduino:renesas_portenta:portenta_c33,8,0.0,0,0.0
arduino:renesas_uno:unor4wifi,0,0.0,0,0.0
arduino:samd:mkrwifi1010,16,0.01,0,0.0
arduino:samd:nano_33_iot,16,0.01,0,0.0

_agentsManager->update();
bool updatedConfigInprogress = _agentsManager->isConfigInProgress();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
bool updatedConfigInprogress = _agentsManager->isConfigInProgress();
const bool updatedConfigInprogress = _agentsManager->isConfigInProgress();

if (_agentsManager->isConfigInProgress() && !configInprogress) {
scanNetworkOptions();
return NetworkConfiguratorStates::UPDATING_CONFIG;
if(_configInProgress != updatedConfigInprogress) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
if(_configInProgress != updatedConfigInprogress) {
if (_configInProgress != updatedConfigInprogress) {

return NetworkConfiguratorStates::UPDATING_CONFIG;
if(_configInProgress != updatedConfigInprogress) {
_configInProgress = updatedConfigInprogress;
if(_configInProgress) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
if(_configInProgress) {
if (_configInProgress) {

Copy link
Collaborator

@pennam pennam left a comment

Choose a reason for hiding this comment

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

only few suggestions to keep the style of the file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants