Skip to content

Commit 69da199

Browse files
committed
fix CI
1 parent 1efecf7 commit 69da199

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

examples/tv-app/tv-common/include/CHIPProjectAppConfig.h

+3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
// TVs need to be commissioners and likely want to be discoverable
3131
#define CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY 1
3232

33+
// TVs can handle the memory impact of supporting a larger list
34+
#define CHIP_DEVICE_CONFIG_UDC_MAX_TARGET_APPS 10
35+
3336
// TVs will often enable this feature
3437
#define CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_PASSCODE 1
3538

src/include/platform/CHIPDeviceConfig.h

+13
Original file line numberDiff line numberDiff line change
@@ -749,6 +749,19 @@ static_assert(CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING_INTERVAL_MIN <= CHIP_DEVICE
749749
#define CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY 0
750750
#endif
751751

752+
/**
753+
* CHIP_DEVICE_CONFIG_UDC_MAX_TARGET_APPS
754+
*
755+
* The number of target apps that a client can include in a UDC message.
756+
*
757+
* Depends upon CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY set to 1
758+
*
759+
* For Video Players, this value should be set to 10
760+
*/
761+
#ifndef CHIP_DEVICE_CONFIG_UDC_MAX_TARGET_APPS
762+
#define CHIP_DEVICE_CONFIG_UDC_MAX_TARGET_APPS 3
763+
#endif
764+
752765
/**
753766
* CHIP_DEVICE_CONFIG_ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE
754767
*

src/protocols/user_directed_commissioning/UDCClientState.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class UDCClientState
143143

144144
bool AddTargetAppInfo(TargetAppInfo vid)
145145
{
146-
if (mNumTargetAppInfos >= sizeof(mTargetAppInfos))
146+
if (mNumTargetAppInfos >= kMaxTargetAppInfos)
147147
{
148148
// already at max
149149
return false;
@@ -225,7 +225,7 @@ class UDCClientState
225225
char mPairingInst[chip::Dnssd::kMaxPairingInstructionLen + 1] = {};
226226
uint16_t mPairingHint = 0;
227227

228-
constexpr static size_t kMaxTargetAppInfos = 10;
228+
constexpr static size_t kMaxTargetAppInfos = CHIP_DEVICE_CONFIG_UDC_MAX_TARGET_APPS;
229229
uint8_t mNumTargetAppInfos = 0; // number of vendor Ids
230230
TargetAppInfo mTargetAppInfos[kMaxTargetAppInfos];
231231

0 commit comments

Comments
 (0)