Skip to content

Commit 8e9cd3d

Browse files
committed
* Add the missing compile macro
1 parent 913084e commit 8e9cd3d

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

src/setup_payload/SetupPayload.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,11 @@ bool PayloadContents::isValidQRCodePayload(ValidationMode mode) const
6262
if (mode == ValidationMode::kProduce)
6363
{
6464
chip::RendezvousInformationFlags valid(RendezvousInformationFlag::kBLE, RendezvousInformationFlag::kOnNetwork,
65-
RendezvousInformationFlag::kSoftAP, RendezvousInformationFlag::kWiFiPAF);
65+
RendezvousInformationFlag::kSoftAP
66+
#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF
67+
, RendezvousInformationFlag::kWiFiPAF
68+
#endif
69+
);
6670
VerifyOrReturnValue(rendezvousInformation.Value().HasOnly(valid), false);
6771
}
6872

src/setup_payload/SetupPayload.h

+2
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ enum class RendezvousInformationFlag : uint8_t
101101
kSoftAP = 1 << 0, ///< Device supports Wi-Fi softAP
102102
kBLE = 1 << 1, ///< Device supports BLE
103103
kOnNetwork = 1 << 2, ///< Device supports Setup on network
104+
#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF
104105
kWiFiPAF = 1 << 3, ///< Device supports Wi-Fi Public Action Frame for discovery
106+
#endif
105107
};
106108
using RendezvousInformationFlags = chip::BitFlags<RendezvousInformationFlag, uint8_t>;
107109

src/transport/raw/PeerAddress.h

+6-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ enum class Type : uint8_t
5353
kUdp,
5454
kBle,
5555
kTcp,
56+
#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF
5657
kWiFiPAF,
58+
#endif
5759
};
5860

5961
/**
@@ -168,9 +170,11 @@ class PeerAddress
168170
#endif
169171
snprintf(buf, bufSize, "TCP:[%s%s]:%d", ip_addr, interface, mPort);
170172
break;
173+
#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF
171174
case Type::kWiFiPAF:
172175
snprintf(buf, bufSize, "WiFiPAF");
173176
break;
177+
#endif
174178
case Type::kBle:
175179
// Note that BLE does not currently use any specific address.
176180
snprintf(buf, bufSize, "BLE");
@@ -212,8 +216,9 @@ class PeerAddress
212216
{
213217
return TCP(addr).SetPort(port).SetInterface(interface);
214218
}
215-
219+
#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF
216220
static PeerAddress WiFiPAF() { return PeerAddress(Type::kWiFiPAF); }
221+
#endif
217222

218223
static PeerAddress Multicast(chip::FabricId fabric, chip::GroupId group)
219224
{

0 commit comments

Comments
 (0)