Skip to content

Commit 3cf9bee

Browse files
authoredMay 21, 2024··
Merge branch 'master' into idm-4.2-troubleshoot
2 parents a76221d + 3c6bd79 commit 3cf9bee

File tree

11 files changed

+217
-55
lines changed

11 files changed

+217
-55
lines changed
 

‎.github/workflows/examples-linux-tv-casting-app.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
run: |
6868
./scripts/run_in_build_env.sh \
6969
"python3 ./scripts/tests/run_tv_casting_test.py"
70-
timeout-minutes: 1
70+
timeout-minutes: 2 # Comment this out to debug if GitHub Action times out.
7171

7272
- name: Uploading Size Reports
7373
uses: ./.github/actions/upload-size-reports

‎examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/setuppayloadscanner/CHIPDeviceDetailsFragment.kt

-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ class CHIPDeviceDetailsFragment : Fragment() {
6161
binding.discriminatorEd.setText(deviceInfo.discriminator.toString())
6262
binding.serialNumberEd.setText(deviceInfo.serialNumber)
6363
binding.discoveryCapabilitiesTv.text = "${deviceInfo.discoveryCapabilities}"
64-
6564
if (deviceInfo.optionalQrCodeInfoMap.isEmpty()) {
6665
binding.vendorTagsLabelTv.visibility = View.GONE
6766
binding.vendorTagsContainer.visibility = View.GONE

‎examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/setuppayloadscanner/CHIPDeviceInfo.kt

+10-2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import kotlinx.parcelize.Parcelize
2424
import matter.onboardingpayload.DiscoveryCapability
2525
import matter.onboardingpayload.OnboardingPayload
2626
import matter.onboardingpayload.OnboardingPayloadException
27+
import matter.onboardingpayload.OptionalQRCodeInfoType
2728

2829
/** Class to hold the CHIP device information. */
2930
@Parcelize
@@ -57,6 +58,13 @@ data class CHIPDeviceInfo(
5758
if (serialNumber.isNotEmpty()) {
5859
onboardingPayload.addSerialNumber(serialNumber)
5960
}
61+
optionalQrCodeInfoMap.forEach { (_, info) ->
62+
if (info.type == OptionalQRCodeInfoType.TYPE_STRING && info.data != null) {
63+
onboardingPayload.addOptionalVendorData(info.tag, info.data)
64+
} else {
65+
onboardingPayload.addOptionalVendorData(info.tag, info.intDataValue)
66+
}
67+
}
6068
return onboardingPayload
6169
}
6270

@@ -78,8 +86,8 @@ data class CHIPDeviceInfo(
7886
setupPayload.getLongDiscriminatorValue(),
7987
setupPayload.setupPinCode,
8088
setupPayload.commissioningFlow,
81-
setupPayload.optionalQRCodeInfo.mapValues { (_, info) ->
82-
QrCodeInfo(info.tag, info.type, info.data, info.int32)
89+
setupPayload.getAllOptionalVendorData().associate { info ->
90+
info.tag to QrCodeInfo(info.tag, info.type, info.data, info.int32)
8391
},
8492
setupPayload.discoveryCapabilities,
8593
setupPayload.hasShortDiscriminator,

‎examples/android/CHIPTool/app/src/main/res/layout/chip_device_info_fragment.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -151,15 +151,15 @@
151151
android:layout_width="wrap_content"
152152
android:layout_height="wrap_content"
153153
android:layout_marginBottom="8dp"
154-
android:layout_below="@id/vendorTagsLabelTv"
154+
android:layout_below="@id/vendorTagsContainer"
155155
android:layout_alignParentStart="true"
156156
android:textSize="20sp"/>
157157
<EditText
158158
android:id="@+id/discoveryCapabilitiesEd"
159159
android:layout_width="wrap_content"
160160
android:layout_height="wrap_content"
161161
android:layout_marginStart="16dp"
162-
android:layout_below="@id/vendorTagsLabelTv"
162+
android:layout_below="@id/vendorTagsContainer"
163163
android:layout_toEndOf="@id/discoveryCapabilitiesLabelTv"
164164
android:layout_alignParentEnd="true"
165165
android:textSize="11sp"
@@ -260,6 +260,6 @@
260260
android:layout_below="@id/showQRCodeUriBtn"
261261
android:layout_alignParentBottom="true"
262262
android:layout_alignParentStart="true"
263-
android:textSize="20sp"/>
263+
android:textSize="12sp"/>
264264
</RelativeLayout>
265265
</ScrollView>

‎examples/chef/chef.py

+13-4
Original file line numberDiff line numberDiff line change
@@ -696,11 +696,20 @@ def main() -> int:
696696
if options.build_target == "esp32":
697697
shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}/esp32")
698698
if options.enable_ipv4:
699-
shell.run_cmd(
700-
"sed -i 's/CONFIG_DISABLE_IPV4=y/#\\ CONFIG_DISABLE_IPV4\\ is\\ not\\ set/g' sdkconfig ")
699+
if sys.platform == "darwin":
700+
shell.run_cmd(
701+
"sed -i '' 's/CONFIG_DISABLE_IPV4=y/#\\ CONFIG_DISABLE_IPV4\\ is\\ not\\ set/g' sdkconfig ")
702+
else:
703+
shell.run_cmd(
704+
"sed -i 's/CONFIG_DISABLE_IPV4=y/#\\ CONFIG_DISABLE_IPV4\\ is\\ not\\ set/g' sdkconfig ")
701705
else:
702-
shell.run_cmd(
703-
"sed -i 's/#\\ CONFIG_DISABLE_IPV4\\ is\\ not\\ set/CONFIG_DISABLE_IPV4=y/g' sdkconfig ")
706+
if sys.platform == "darwin":
707+
shell.run_cmd(
708+
"sed -i '' 's/#\\ CONFIG_DISABLE_IPV4\\ is\\ not\\ set/CONFIG_DISABLE_IPV4=y/g' sdkconfig ")
709+
else:
710+
shell.run_cmd(
711+
"sed -i 's/#\\ CONFIG_DISABLE_IPV4\\ is\\ not\\ set/CONFIG_DISABLE_IPV4=y/g' sdkconfig ")
712+
704713
shell.run_cmd("idf.py build")
705714
shell.run_cmd("idf.py build flashing_script")
706715
shell.run_cmd(

‎examples/chef/esp32/sdkconfig.defaults

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ CONFIG_MBEDTLS_HKDF_C=y
6262

6363
# IRAM optimizations
6464
CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y
65+
CONFIG_RINGBUF_PLACE_FUNCTIONS_INTO_FLASH=y
6566

6667
# Increase LwIP IPv6 address number
6768
CONFIG_LWIP_IPV6_NUM_ADDRESSES=6

‎examples/chef/esp32/sdkconfig_rpc.defaults

+1
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,6 @@ CONFIG_MBEDTLS_HKDF_C=y
6161

6262
# IRAM optimizations
6363
CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y
64+
CONFIG_RINGBUF_PLACE_FUNCTIONS_INTO_FLASH=y
6465

6566
CONFIG_DIAG_USE_EXTERNAL_LOG_WRAP=y

‎examples/common/pigweed/rpc_services/BooleanState.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
namespace chip {
2929
namespace rpc {
3030

31-
class BooleanState final : public pw_rpc::nanopb::BooleanState::Service<BooleanState>
31+
class BooleanState : public pw_rpc::nanopb::BooleanState::Service<BooleanState>
3232
{
3333
public:
3434
virtual ~BooleanState() = default;

‎examples/common/pigweed/rpc_services/Locking.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
namespace chip {
2828
namespace rpc {
2929

30-
class Locking final : public pw_rpc::nanopb::Locking::Service<Locking>
30+
class Locking : public pw_rpc::nanopb::Locking::Service<Locking>
3131
{
3232
public:
3333
virtual ~Locking() = default;

‎scripts/tests/run_tv_casting_test.py

+185-41
Large diffs are not rendered by default.

‎src/controller/java/src/matter/onboardingpayload/QRCodeBasicOnboardingPayloadGenerator.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,6 @@ private fun populateTLVBits(
178178

179179
for (i in 0 until tlvBufSizeInBytes) {
180180
val value = tlvBuf[i]
181-
populateBits(bits, offset, value.toLong(), 8, totalPayloadDataSizeInBits)
181+
populateBits(bits, offset, value.toUByte().toLong(), 8, totalPayloadDataSizeInBits)
182182
}
183183
}

0 commit comments

Comments
 (0)
Please sign in to comment.