diff --git a/examples/refrigerator-app/silabs/include/RefrigeratorManager.h b/examples/refrigerator-app/silabs/include/RefrigeratorManager.h index a03fd99ddb3986..db45adca37a87e 100644 --- a/examples/refrigerator-app/silabs/include/RefrigeratorManager.h +++ b/examples/refrigerator-app/silabs/include/RefrigeratorManager.h @@ -62,9 +62,9 @@ class RefrigeratorManager private: friend RefrigeratorManager & RefrigeratorMgr(); - uint8_t mCurrentMode; - uint8_t mStartUpMode; - uint8_t mOnMode; + int16_t mCurrentMode; + int16_t mStartUpMode; + int16_t mOnMode; int16_t mTemperatureSetpoint; int16_t mMinTemperature; diff --git a/examples/refrigerator-app/silabs/src/RefrigeratorManager.cpp b/examples/refrigerator-app/silabs/src/RefrigeratorManager.cpp index a7ce16e1a921b1..83f0560f436c3a 100644 --- a/examples/refrigerator-app/silabs/src/RefrigeratorManager.cpp +++ b/examples/refrigerator-app/silabs/src/RefrigeratorManager.cpp @@ -27,6 +27,7 @@ #include "AppEvent.h" #include "AppTask.h" #include +#include /********************************************************** @@ -100,19 +101,19 @@ void RefrigeratorManager::RefAndTempCtrlAttributeChangeHandler(EndpointId endpoi switch (attributeId) { case RefAndTempAttr::CurrentMode::Id: { - int8_t currentMode = static_cast(*value); + int16_t currentMode = static_cast(*value); mCurrentMode = currentMode; } break; case RefAndTempAttr::StartUpMode::Id: { - int8_t startUpMode = static_cast(*value); + int16_t startUpMode = static_cast(*value); mStartUpMode = startUpMode; } break; case RefAndTempAttr::OnMode::Id: { - int8_t onMode = static_cast(*value); + int16_t onMode = static_cast(*value); mOnMode = onMode; } break; @@ -176,22 +177,22 @@ void RefrigeratorManager::RefAlaramAttributeChangeHandler(EndpointId endpointId, switch (attributeId) { case RefAlarmAttr::Mask::Id: { - int8_t mask = static_cast(*value); - mMask = mask; + auto mask = static_cast(*value); + mState = static_cast(mask); RefAlarmAttr::Mask::Set(endpointId, mMask); } break; case RefAlarmAttr::State::Id: { - int8_t state = static_cast(*value); - mState = state; + auto state = static_cast(*value); + mState = static_cast(state); RefAlarmAttr::State::Set(endpointId, mState); } break; case RefAlarmAttr::Supported::Id: { - int8_t supported = static_cast(*value); - mSupported = supported; + auto supported = static_cast(*value); + mSupported = static_cast(supported); RefAlarmAttr::Supported::Set(endpointId, mSupported); } break; diff --git a/examples/refrigerator-app/silabs/src/ZclCallbacks.cpp b/examples/refrigerator-app/silabs/src/ZclCallbacks.cpp index 0394819c12fe7d..03235c240694c6 100644 --- a/examples/refrigerator-app/silabs/src/ZclCallbacks.cpp +++ b/examples/refrigerator-app/silabs/src/ZclCallbacks.cpp @@ -105,23 +105,24 @@ void emberAfRefrigeratorAlarmClusterInitCallback(EndpointId endpoint) {} */ void emberAfTemperatureControlClusterInitCallback(EndpointId endpoint) {} -/** - * @brief Handles the SetTemperature command for the Temperature Control Cluster. - * - * This function is called when the SetTemperature command is received from a client. - * It is responsible for setting the temperature for the cabinet as per the command data. - * - * @param CommandHandler commandObj Pointer to the command handler object. - * @param const ConcreteCommandPath commandPath The path of the command received. - * @param const DecodableType & commandData - * The data decoded from the SetTemperature command, which includes the desired temperature. - * - * @return bool Returns true if the command was handled successfully, false otherwise. - * - * @note The actual implementation to set the temperature is yet to be added. - */ -bool emberAfTemperatureControlClusterSetTemperatureCallback( - chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::TemperatureControl::Commands::SetTemperature::DecodableType & commandData) { - // TODO: Add implementation to set the temperature for the cabinet -} \ No newline at end of file +// /** +// * @brief Handles the SetTemperature command for the Temperature Control Cluster. +// * +// * This function is called when the SetTemperature command is received from a client. +// * It is responsible for setting the temperature for the cabinet as per the command data. +// * +// * @param CommandHandler commandObj Pointer to the command handler object. +// * @param const ConcreteCommandPath commandPath The path of the command received. +// * @param const DecodableType & commandData +// * The data decoded from the SetTemperature command, which includes the desired temperature. +// * +// * @return bool Returns true if the command was handled successfully, false otherwise. +// * +// * @note The actual implementation to set the temperature is yet to be added. +// */ +// bool emberAfTemperatureControlClusterSetTemperatureCallback( +// chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, +// const chip::app::Clusters::TemperatureControl::Commands::SetTemperature::DecodableType & commandData) { +// // TODO: Add implementation to set the temperature for the cabinet +// return true; +// } \ No newline at end of file