From 53830687baf73576976f34136f45506f91fa972d Mon Sep 17 00:00:00 2001 From: Jonathan Megevand Date: Tue, 21 Sep 2021 18:13:59 +0200 Subject: [PATCH] WC: Move HasFeature from Static --- .../window-covering-server/window-covering-server.cpp | 9 +++++---- .../window-covering-server/window-covering-server.h | 3 +++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/app/clusters/window-covering-server/window-covering-server.cpp b/src/app/clusters/window-covering-server/window-covering-server.cpp index cb3bfb32716830..6563a9a7797821 100644 --- a/src/app/clusters/window-covering-server/window-covering-server.cpp +++ b/src/app/clusters/window-covering-server/window-covering-server.cpp @@ -62,10 +62,7 @@ using namespace chip::app::Clusters::WindowCovering; #define CHECK_BOUNDS_INVALID(MIN, VAL, MAX) ((VAL < MIN) || (VAL > MAX)) #define CHECK_BOUNDS_VALID(MIN, VAL, MAX) (!CHECK_BOUNDS_INVALID(MIN, VAL, MAX)) -static bool HasFeature(chip::EndpointId endpoint, Features feature) -{ - return true; -} + static uint16_t ConvertValue(uint16_t inputLowValue, uint16_t inputHighValue, uint16_t outputLowValue, uint16_t outputHighValue, uint16_t value) { @@ -160,6 +157,10 @@ namespace app { namespace Clusters { namespace WindowCovering { +bool HasFeature(chip::EndpointId endpoint, Features feature) +{ + return true; +} void PrintPercent100ths(const char * pMessage, uint16_t percent100ths) { diff --git a/src/app/clusters/window-covering-server/window-covering-server.h b/src/app/clusters/window-covering-server/window-covering-server.h index 7aef6a1e8fef91..a56d3060d51d3b 100644 --- a/src/app/clusters/window-covering-server/window-covering-server.h +++ b/src/app/clusters/window-covering-server/window-covering-server.h @@ -20,6 +20,7 @@ #include #include #include +#include namespace chip { namespace app { @@ -99,6 +100,8 @@ enum class LimitStatus : uint8_t }; static_assert(sizeof(LimitStatus) == sizeof(uint8_t), "LimitStatus Size is not correct"); +bool HasFeature(chip::EndpointId endpoint, Features feature); + void TypeSet(chip::EndpointId endpoint, EmberAfWcType type); EmberAfWcType TypeGet(chip::EndpointId endpoint);