Skip to content

Commit

Permalink
Merge branch 'master' into idm-4.2-troubleshoot
Browse files Browse the repository at this point in the history
  • Loading branch information
raul-marquez-csa authored May 21, 2024
2 parents a76221d + 3c6bd79 commit 3cf9bee
Show file tree
Hide file tree
Showing 11 changed files with 217 additions and 55 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/examples-linux-tv-casting-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
run: |
./scripts/run_in_build_env.sh \
"python3 ./scripts/tests/run_tv_casting_test.py"
timeout-minutes: 1
timeout-minutes: 2 # Comment this out to debug if GitHub Action times out.

- name: Uploading Size Reports
uses: ./.github/actions/upload-size-reports
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ class CHIPDeviceDetailsFragment : Fragment() {
binding.discriminatorEd.setText(deviceInfo.discriminator.toString())
binding.serialNumberEd.setText(deviceInfo.serialNumber)
binding.discoveryCapabilitiesTv.text = "${deviceInfo.discoveryCapabilities}"

if (deviceInfo.optionalQrCodeInfoMap.isEmpty()) {
binding.vendorTagsLabelTv.visibility = View.GONE
binding.vendorTagsContainer.visibility = View.GONE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import kotlinx.parcelize.Parcelize
import matter.onboardingpayload.DiscoveryCapability
import matter.onboardingpayload.OnboardingPayload
import matter.onboardingpayload.OnboardingPayloadException
import matter.onboardingpayload.OptionalQRCodeInfoType

/** Class to hold the CHIP device information. */
@Parcelize
Expand Down Expand Up @@ -57,6 +58,13 @@ data class CHIPDeviceInfo(
if (serialNumber.isNotEmpty()) {
onboardingPayload.addSerialNumber(serialNumber)
}
optionalQrCodeInfoMap.forEach { (_, info) ->
if (info.type == OptionalQRCodeInfoType.TYPE_STRING && info.data != null) {
onboardingPayload.addOptionalVendorData(info.tag, info.data)
} else {
onboardingPayload.addOptionalVendorData(info.tag, info.intDataValue)
}
}
return onboardingPayload
}

Expand All @@ -78,8 +86,8 @@ data class CHIPDeviceInfo(
setupPayload.getLongDiscriminatorValue(),
setupPayload.setupPinCode,
setupPayload.commissioningFlow,
setupPayload.optionalQRCodeInfo.mapValues { (_, info) ->
QrCodeInfo(info.tag, info.type, info.data, info.int32)
setupPayload.getAllOptionalVendorData().associate { info ->
info.tag to QrCodeInfo(info.tag, info.type, info.data, info.int32)
},
setupPayload.discoveryCapabilities,
setupPayload.hasShortDiscriminator,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,15 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_below="@id/vendorTagsLabelTv"
android:layout_below="@id/vendorTagsContainer"
android:layout_alignParentStart="true"
android:textSize="20sp"/>
<EditText
android:id="@+id/discoveryCapabilitiesEd"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_below="@id/vendorTagsLabelTv"
android:layout_below="@id/vendorTagsContainer"
android:layout_toEndOf="@id/discoveryCapabilitiesLabelTv"
android:layout_alignParentEnd="true"
android:textSize="11sp"
Expand Down Expand Up @@ -260,6 +260,6 @@
android:layout_below="@id/showQRCodeUriBtn"
android:layout_alignParentBottom="true"
android:layout_alignParentStart="true"
android:textSize="20sp"/>
android:textSize="12sp"/>
</RelativeLayout>
</ScrollView>
17 changes: 13 additions & 4 deletions examples/chef/chef.py
Original file line number Diff line number Diff line change
Expand Up @@ -696,11 +696,20 @@ def main() -> int:
if options.build_target == "esp32":
shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}/esp32")
if options.enable_ipv4:
shell.run_cmd(
"sed -i 's/CONFIG_DISABLE_IPV4=y/#\\ CONFIG_DISABLE_IPV4\\ is\\ not\\ set/g' sdkconfig ")
if sys.platform == "darwin":
shell.run_cmd(
"sed -i '' 's/CONFIG_DISABLE_IPV4=y/#\\ CONFIG_DISABLE_IPV4\\ is\\ not\\ set/g' sdkconfig ")
else:
shell.run_cmd(
"sed -i 's/CONFIG_DISABLE_IPV4=y/#\\ CONFIG_DISABLE_IPV4\\ is\\ not\\ set/g' sdkconfig ")
else:
shell.run_cmd(
"sed -i 's/#\\ CONFIG_DISABLE_IPV4\\ is\\ not\\ set/CONFIG_DISABLE_IPV4=y/g' sdkconfig ")
if sys.platform == "darwin":
shell.run_cmd(
"sed -i '' 's/#\\ CONFIG_DISABLE_IPV4\\ is\\ not\\ set/CONFIG_DISABLE_IPV4=y/g' sdkconfig ")
else:
shell.run_cmd(
"sed -i 's/#\\ CONFIG_DISABLE_IPV4\\ is\\ not\\ set/CONFIG_DISABLE_IPV4=y/g' sdkconfig ")

shell.run_cmd("idf.py build")
shell.run_cmd("idf.py build flashing_script")
shell.run_cmd(
Expand Down
1 change: 1 addition & 0 deletions examples/chef/esp32/sdkconfig.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ CONFIG_MBEDTLS_HKDF_C=y

# IRAM optimizations
CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y
CONFIG_RINGBUF_PLACE_FUNCTIONS_INTO_FLASH=y

# Increase LwIP IPv6 address number
CONFIG_LWIP_IPV6_NUM_ADDRESSES=6
1 change: 1 addition & 0 deletions examples/chef/esp32/sdkconfig_rpc.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,6 @@ CONFIG_MBEDTLS_HKDF_C=y

# IRAM optimizations
CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y
CONFIG_RINGBUF_PLACE_FUNCTIONS_INTO_FLASH=y

CONFIG_DIAG_USE_EXTERNAL_LOG_WRAP=y
2 changes: 1 addition & 1 deletion examples/common/pigweed/rpc_services/BooleanState.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
namespace chip {
namespace rpc {

class BooleanState final : public pw_rpc::nanopb::BooleanState::Service<BooleanState>
class BooleanState : public pw_rpc::nanopb::BooleanState::Service<BooleanState>
{
public:
virtual ~BooleanState() = default;
Expand Down
2 changes: 1 addition & 1 deletion examples/common/pigweed/rpc_services/Locking.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
namespace chip {
namespace rpc {

class Locking final : public pw_rpc::nanopb::Locking::Service<Locking>
class Locking : public pw_rpc::nanopb::Locking::Service<Locking>
{
public:
virtual ~Locking() = default;
Expand Down
Loading

0 comments on commit 3cf9bee

Please sign in to comment.