Skip to content

Commit

Permalink
ESP32: Add a menuconfig option to enable/disable persist subscription (
Browse files Browse the repository at this point in the history
…project-chip#30889)

* ESP32: Add a menuconfig option to enable/disable persist subscription

* enable persistent subscription by default
  • Loading branch information
wqx6 authored and raul-marquez-csa committed Feb 16, 2024
1 parent b3911f2 commit 836fa03
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
6 changes: 6 additions & 0 deletions config/esp32/components/chip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,12 @@ if ((CONFIG_BT_ENABLED) AND (CONFIG_ENABLE_CHIPOBLE))
endif()
endif()

if (CONFIG_ENABLE_PERSIST_SUBSCRIPTIONS)
chip_gn_arg_append("chip_persist_subscriptions" "true")
else()
chip_gn_arg_append("chip_persist_subscriptions" "false")
endif()

if (CONFIG_ENABLE_ESP32_BLE_CONTROLLER)
chip_gn_arg_append("chip_enable_ble_controller" "true")
endif()
Expand Down
7 changes: 7 additions & 0 deletions config/esp32/components/chip/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,13 @@ menu "CHIP Core"
help
Some device types don't require the read client. Enabling this option may save some flash/ram.

config ENABLE_PERSIST_SUBSCRIPTIONS
bool "Enable persist subscriptions"
default y
help
Enable persist subscriptions to make the device resume the subscriptions from the persist
subscriptions information after reboot.

config BUILD_CHIP_TESTS
bool "Build CHIP tests"
default n
Expand Down
4 changes: 2 additions & 2 deletions src/platform/device.gni
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ declare_args() {

# Enable Subscription persistence / resumption for CI and supported platforms
if (chip_device_platform == "darwin" || chip_device_platform == "linux" ||
chip_device_platform == "esp32" || chip_device_platform == "fake" ||
chip_device_platform == "efr32" || chip_device_platform == "SiWx917") {
chip_device_platform == "fake" || chip_device_platform == "efr32" ||
chip_device_platform == "SiWx917") {
chip_persist_subscriptions = true
} else {
chip_persist_subscriptions = false
Expand Down

0 comments on commit 836fa03

Please sign in to comment.