Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/master' into x7715-…
Browse files Browse the repository at this point in the history
…inet-3b-state
  • Loading branch information
kpschoedel committed Oct 20, 2021
2 parents 78535d5 + 60b44c4 commit d934c7d
Show file tree
Hide file tree
Showing 113 changed files with 14,689 additions and 17,012 deletions.
1 change: 0 additions & 1 deletion config/ameba/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ mbedtls_target = "//mbedtls:mbedtls"
lwip_platform = "external"

chip_build_tests = true
chip_inet_config_enable_dns_resolver = false

chip_inet_config_enable_tcp_endpoint = true
chip_inet_config_enable_udp_endpoint = true
Expand Down
1 change: 0 additions & 1 deletion config/esp32/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ mbedtls_target = "//mbedtls:mbedtls"
lwip_platform = "external"

chip_build_tests = true
chip_inet_config_enable_dns_resolver = false

#Enabling this causes some error
#chip_inet_config_enable_tun_endpoint = false
Expand Down
18 changes: 18 additions & 0 deletions config/esp32/components/chip/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,18 @@ menu "CHIP Device Layer"
help
The size (in bytes) of the service directory cache. This limits the maximum size of the directory
that can be returned in response to a service directory query.

config ENABLE_EXTENDED_DISCOVERY
bool "Enable Extended discovery Support"
default n
help
Enables support for Extended Discovery.

config ENABLE_COMMISSIONABLE_DEVICE_TYPE
bool "Enable Device type in commissionable node discovery."
default n
help
Enables or Disables the support for Commissionable Device Type.

endmenu

Expand Down Expand Up @@ -409,6 +421,12 @@ menu "CHIP Device Layer"
help
A string identifying the firmware revision running on the device.

config DEVICE_TYPE
int "Default Device type"
default 0
help
The default device type.

endmenu

menu "WiFi Station Options"
Expand Down
1 change: 0 additions & 1 deletion config/mbed/chip-gn/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ chip_device_project_config_include = ""

chip_inet_config_enable_udp_endpoint = true
chip_inet_config_enable_tcp_endpoint = true
chip_inet_config_enable_dns_resolver = true

chip_custom_build_cflags = []

Expand Down
1 change: 0 additions & 1 deletion config/nrfconnect/chip-module/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ chip_gn_arg_bool ("chip_enable_nfc" CONFIG_CHIP_NFC_COMM
chip_gn_arg_bool ("chip_build_tests" CONFIG_CHIP_BUILD_TESTS)
chip_gn_arg_bool ("chip_monolithic_tests" CONFIG_CHIP_BUILD_TESTS)
chip_gn_arg_bool ("chip_inet_config_enable_tcp_endpoint" CONFIG_CHIP_BUILD_TESTS)
chip_gn_arg_bool ("chip_inet_config_enable_dns_resolver" CONFIG_CHIP_BUILD_TESTS)
chip_gn_arg_bool ("chip_build_libshell" CONFIG_CHIP_LIB_SHELL)
chip_gn_arg_bool ("chip_build_pw_rpc_lib" CONFIG_CHIP_PW_RPC)

Expand Down
1 change: 0 additions & 1 deletion config/qpg/chip-gn/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ chip_enable_nfc = false
chip_build_tests = false
chip_monolithic_tests = false
chip_inet_config_enable_tcp_endpoint = false
chip_inet_config_enable_dns_resolver = false
chip_build_libshell = false
qpg_ar = "arm-none-eabi-ar"
qpg_cc = "arm-none-eabi-gcc"
Expand Down
1 change: 0 additions & 1 deletion config/standalone/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@
# Options from standalone-chip.mk that differ from configure defaults. These
# options are used from examples/.
chip_build_tests = false
chip_inet_config_enable_dns_resolver = false
1 change: 0 additions & 1 deletion config/telink/chip-module/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ chip_gn_arg_bool ("chip_enable_openthread" CONFIG_NET_L2_OPENTH
chip_gn_arg_bool ("chip_inet_config_enable_ipv4" CONFIG_NET_IPV4)
chip_gn_arg_bool ("chip_build_tests" CONFIG_CHIP_BUILD_TESTS)
chip_gn_arg_bool ("chip_inet_config_enable_tcp_endpoint" CONFIG_CHIP_BUILD_TESTS)
chip_gn_arg_bool ("chip_inet_config_enable_dns_resolver" CONFIG_CHIP_BUILD_TESTS)
chip_gn_arg_bool ("chip_build_libshell" CONFIG_CHIP_LIB_SHELL)
chip_gn_arg_bool ("chip_build_pw_rpc_lib" CONFIG_CHIP_PW_RPC)

Expand Down
1 change: 0 additions & 1 deletion config/tizen/chip-gn/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ chip_device_platform = "tizen"
chip_build_tests = false

chip_inet_config_enable_raw_endpoint = false
chip_inet_config_enable_dns_resolver = false
54 changes: 51 additions & 3 deletions examples/all-clusters-app/esp32/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,49 @@ class DeviceListModel : public ListScreen::Model
}
};

class ActionListModel : public ListScreen::Model
{
int GetItemCount() override { return static_cast<int>(mActions.size()); }
std::string GetItemText(int i) override { return mActions[i].title.c_str(); }
void ItemAction(int i) override
{
ESP_LOGI(TAG, "generic action %d", i);
mActions[i].action();
}

protected:
void AddAction(const char * name, std::function<void(void)> action) { mActions.push_back(Action(name, action)); }

private:
struct Action
{
std::string title;
std::function<void(void)> action;

Action(const char * t, std::function<void(void)> a) : title(t), action(a) {}
};

std::vector<Action> mActions;
};

class MdnsDebugListModel : public ActionListModel
{
public:
std::string GetTitle() override { return "mDNS Debug"; }

MdnsDebugListModel() { AddAction("(Re-)Init", std::bind(&MdnsDebugListModel::DoReinit, this)); }

private:
void DoReinit()
{
CHIP_ERROR err = Dnssd::ServiceAdvertiser::Instance().Init(&DeviceLayer::InetLayer);
if (err != CHIP_NO_ERROR)
{
ESP_LOGE(TAG, "Error initializing: %s", err.AsString());
}
}
};

class SetupListModel : public ListScreen::Model
{
public:
Expand Down Expand Up @@ -696,10 +739,10 @@ extern "C" void app_main()
ESP_LOGI(TAG, "Opening device list");
ScreenManager::PushScreen(chip::Platform::New<ListScreen>(chip::Platform::New<DeviceListModel>()));
})
->Item("Custom",
->Item("mDNS Debug",
[]() {
ESP_LOGI(TAG, "Opening custom screen");
ScreenManager::PushScreen(chip::Platform::New<CustomScreen>());
ESP_LOGI(TAG, "Opening MDNS debug");
ScreenManager::PushScreen(chip::Platform::New<ListScreen>(chip::Platform::New<MdnsDebugListModel>()));
})
->Item("QR Code",
[=]() {
Expand All @@ -722,6 +765,11 @@ extern "C" void app_main()
ESP_LOGI(TAG, "Opening Setup list");
ScreenManager::PushScreen(chip::Platform::New<ListScreen>(chip::Platform::New<SetupListModel>()));
})
->Item("Custom",
[]() {
ESP_LOGI(TAG, "Opening custom screen");
ScreenManager::PushScreen(chip::Platform::New<CustomScreen>());
})
->Item("More")
->Item("Items")
->Item("For")
Expand Down
Loading

0 comments on commit d934c7d

Please sign in to comment.