Skip to content

Commit

Permalink
Remove using and featuremap in header file
Browse files Browse the repository at this point in the history
  • Loading branch information
erwinpan1 committed Feb 12, 2024
1 parent d4b5cff commit 13aa22e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <app/util/config.h>

using namespace chip;
using namespace chip::app;
using namespace chip::app::Clusters::KeypadInput;

void KeypadInputManager::HandleSendKey(CommandResponseHelper<SendKeyResponseType> & helper, const CecKeyCodeType & keycCode)
Expand Down Expand Up @@ -101,11 +102,6 @@ void KeypadInputManager::HandleSendKey(CommandResponseHelper<SendKeyResponseType

uint32_t KeypadInputManager::GetFeatureMap(chip::EndpointId endpoint)
{
if (endpoint >= EMBER_AF_KEYPAD_INPUT_CLUSTER_SERVER_ENDPOINT_COUNT)
{
return mDynamicEndpointFeatureMap;
}

uint32_t featureMap = 0;
Attributes::FeatureMap::Get(endpoint, &featureMap);
return featureMap;
Expand Down
12 changes: 4 additions & 8 deletions examples/chef/common/clusters/keypad-input/KeypadInputManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,15 @@

#include <app/clusters/keypad-input-server/keypad-input-server.h>

using chip::app::CommandResponseHelper;
using KeypadInputDelegate = chip::app::Clusters::KeypadInput::Delegate;
using SendKeyResponseType = chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::Type;
using CecKeyCodeType = chip::app::Clusters::KeypadInput::CECKeyCodeEnum;

class KeypadInputManager : public KeypadInputDelegate
class KeypadInputManager : public chip::app::Clusters::KeypadInput::Delegate
{
using SendKeyResponseType = chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::Type;
using CecKeyCodeType = chip::app::Clusters::KeypadInput::CECKeyCodeEnum;
public:
void HandleSendKey(CommandResponseHelper<SendKeyResponseType> & helper, const CecKeyCodeType & keyCode) override;
void HandleSendKey(chip::app::CommandResponseHelper<SendKeyResponseType> & helper, const CecKeyCodeType & keyCode) override;

uint32_t GetFeatureMap(chip::EndpointId endpoint) override;

private:
// TODO: set this based upon meta data from app
uint32_t mDynamicEndpointFeatureMap = 7;
};

0 comments on commit 13aa22e

Please sign in to comment.