diff --git a/examples/bridge-app/linux/include/Device.h b/examples/bridge-app/linux/include/Device.h index b85633ceb3fdf3..8fb55101917381 100644 --- a/examples/bridge-app/linux/include/Device.h +++ b/examples/bridge-app/linux/include/Device.h @@ -179,8 +179,10 @@ class DevicePowerSource : public Device kChanged_Description = kChanged_Last << 2, } Changed; - DevicePowerSource(const char * szDeviceName, std::string szLocation, uint32_t aFeatureMap) : - Device(szDeviceName, szLocation), mFeatureMap(aFeatureMap){}; + DevicePowerSource(const char * szDeviceName, std::string szLocation, + chip::BitFlags aFeatureMap) : + Device(szDeviceName, szLocation), + mFeatureMap(aFeatureMap){}; using DeviceCallback_fn = std::function; void SetChangeCallback(DeviceCallback_fn aChanged_CB) { mChanged_CB = aChanged_CB; } @@ -188,7 +190,7 @@ class DevicePowerSource : public Device void SetBatChargeLevel(uint8_t aBatChargeLevel); void SetDescription(std::string aDescription); - inline uint32_t GetFeatureMap() { return mFeatureMap; }; + inline uint32_t GetFeatureMap() { return mFeatureMap.Raw(); }; inline uint8_t GetBatChargeLevel() { return mBatChargeLevel; }; inline uint8_t GetOrder() { return mOrder; }; inline uint8_t GetStatus() { return mStatus; }; @@ -202,7 +204,7 @@ class DevicePowerSource : public Device uint8_t mOrder = 0; uint8_t mStatus = 0; std::string mDescription = "Primary Battery"; - uint32_t mFeatureMap; + chip::BitFlags mFeatureMap; DeviceCallback_fn mChanged_CB; }; diff --git a/examples/bridge-app/linux/main.cpp b/examples/bridge-app/linux/main.cpp index 2fa20a30a8875d..3fae757c736ff8 100644 --- a/examples/bridge-app/linux/main.cpp +++ b/examples/bridge-app/linux/main.cpp @@ -989,7 +989,7 @@ int main(int argc, char * argv[]) // Setup composed device with two temperature sensors and a power source ComposedDevice ComposedDevice("Composed Device", "Bedroom"); - DevicePowerSource ComposedPowerSource("Composed Power Source", "Bedroom", EMBER_AF_POWER_SOURCE_FEATURE_BATTERY); + DevicePowerSource ComposedPowerSource("Composed Power Source", "Bedroom", PowerSource::PowerSourceFeature::kBattery); ComposedDevice.SetReachable(true); ComposedTempSensor1.SetReachable(true); diff --git a/src/app/common/templates/config-data.yaml b/src/app/common/templates/config-data.yaml index b118bf17b25def..350237e753a46e 100644 --- a/src/app/common/templates/config-data.yaml +++ b/src/app/common/templates/config-data.yaml @@ -35,7 +35,6 @@ DefineBitmaps: - BarrierControlSafetyStatus - ColorLoopUpdateFlags - LevelControlFeature - - PowerSourceFeature # We need a more configurable way of deciding which clusters have which init functions.... # See https://github.com/project-chip/connectedhomeip/issues/4369 diff --git a/zzz_generated/app-common/app-common/zap-generated/enums.h b/zzz_generated/app-common/app-common/zap-generated/enums.h index 8debcf5eab5547..db52df2fdd3394 100644 --- a/zzz_generated/app-common/app-common/zap-generated/enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/enums.h @@ -257,11 +257,3 @@ enum EmberAfStepMode : uint8_t #define EMBER_AF_LEVEL_CONTROL_FEATURE_LIGHTING_OFFSET (1) #define EMBER_AF_LEVEL_CONTROL_FEATURE_FREQUENCY (4) #define EMBER_AF_LEVEL_CONTROL_FEATURE_FREQUENCY_OFFSET (2) -#define EMBER_AF_POWER_SOURCE_FEATURE_WIRED (1) -#define EMBER_AF_POWER_SOURCE_FEATURE_WIRED_OFFSET (0) -#define EMBER_AF_POWER_SOURCE_FEATURE_BATTERY (2) -#define EMBER_AF_POWER_SOURCE_FEATURE_BATTERY_OFFSET (1) -#define EMBER_AF_POWER_SOURCE_FEATURE_RECHARGEABLE (4) -#define EMBER_AF_POWER_SOURCE_FEATURE_RECHARGEABLE_OFFSET (2) -#define EMBER_AF_POWER_SOURCE_FEATURE_REPLACEABLE (8) -#define EMBER_AF_POWER_SOURCE_FEATURE_REPLACEABLE_OFFSET (3)