Skip to content

Commit

Permalink
[ICD] Added a way of activating the report on active mode from icd.gni (
Browse files Browse the repository at this point in the history
#29234)

* Added a way of activating the report on active mode from icd manager with build flags

* Restyled by shfmt

* Moved the ICD_REPORT_ON_ENTER_ACTIVE_MODE in the report scheduler implementation

* Moved the report on active define to the app BUILD.gn and removed un-necessary #ifdef

* Removed preset

* Added include AppBuildConfig

---------

Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed Oct 25, 2023
1 parent 523123b commit 2367516
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion scripts/examples/gn_silabs_example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ else
source "$CHIP_ROOT/scripts/activate.sh"
fi

ninja -v -C "$BUILD_DIR"/
ninja -C "$BUILD_DIR"/
#print stats
arm-none-eabi-size -A "$BUILD_DIR"/*.out

Expand Down
1 change: 1 addition & 0 deletions src/app/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ buildconfig_header("app_buildconfig") {
"CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE=${enable_eventlist_attribute}",
"CHIP_CONFIG_ENABLE_ICD_SERVER=${chip_enable_icd_server}",
"CHIP_CONFIG_ENABLE_READ_CLIENT=${chip_enable_read_client}",
"ICD_REPORT_ON_ENTER_ACTIVE_MODE=${chip_report_on_active_mode}",
]
}

Expand Down
5 changes: 0 additions & 5 deletions src/app/icd/ICDManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@
#define ICD_ENFORCE_SIT_SLOW_POLL_LIMIT 0
#endif

#ifndef ICD_REPORT_ON_ENTER_ACTIVE_MODE
// Enabling this makes the device emit subscription reports when transitioning from idle to active mode.
#define ICD_REPORT_ON_ENTER_ACTIVE_MODE 0
#endif

namespace chip {
namespace app {

Expand Down
3 changes: 3 additions & 0 deletions src/app/icd/icd.gni
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@ declare_args() {
# Matter SDK Configuration flag to enable ICD client functionality
# TODO - Add Specifics when the design is refined
chip_enable_icd_client = false

# Matter SDK Configuration flag to make the ICD manager emit a report on entering active mode
chip_report_on_active_mode = false
}
1 change: 1 addition & 0 deletions src/app/reporting/ReportSchedulerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* limitations under the License.
*/

#include <app/AppBuildConfig.h>
#include <app/InteractionModelEngine.h>
#include <app/reporting/ReportSchedulerImpl.h>

Expand Down

0 comments on commit 2367516

Please sign in to comment.