@@ -45,6 +45,8 @@ EndpointId kRefEndpointId = 1;
45
45
EndpointId kColdCabinetEndpointId = 2 ;
46
46
EndpointId kFreezeCabinetEndpointId = 3 ;
47
47
48
+
49
+
48
50
RefrigeratorManager RefrigeratorManager::sRefrigeratorMgr ;
49
51
50
52
namespace {
@@ -72,6 +74,11 @@ CHIP_ERROR RefrigeratorManager::Init()
72
74
SetTagList (kColdCabinetEndpointId , Span<const Clusters::Descriptor::Structs::SemanticTagStruct::Type>(refrigeratorTagList));
73
75
SetTagList (kFreezeCabinetEndpointId , Span<const Clusters::Descriptor::Structs::SemanticTagStruct::Type>(freezerTagList));
74
76
77
+ TempCtrlAttr::MinTemperature::Set (kColdCabinetEndpointId , MIN_TEMP_COLD_CABINATE);
78
+ TempCtrlAttr::MaxTemperature::Set (kColdCabinetEndpointId , MAX_TEMP_COLD_CABINATE);
79
+ TempCtrlAttr::MinTemperature::Set (kFreezeCabinetEndpointId , MIN_TEMP_FREEZER_CABINATE);
80
+ TempCtrlAttr::MaxTemperature::Set (kFreezeCabinetEndpointId , MAX_TEMP_FREEZER_CABINATE);
81
+
75
82
app::Clusters::TemperatureControl::SetInstance (&sAppSupportedTemperatureLevelsDelegate );
76
83
return CHIP_NO_ERROR;
77
84
}
@@ -105,18 +112,6 @@ void RefrigeratorManager::RefAndTempCtrlAttributeChangeHandler(EndpointId endpoi
105
112
}
106
113
break ;
107
114
108
- case RefAndTempAttr::StartUpMode::Id: {
109
- int16_t startUpMode = static_cast <int16_t >(*value);
110
- mStartUpMode = startUpMode;
111
- }
112
- break ;
113
-
114
- case RefAndTempAttr::OnMode::Id: {
115
- int16_t onMode = static_cast <int16_t >(*value);
116
- mOnMode = onMode;
117
- }
118
- break ;
119
-
120
115
default : {
121
116
ChipLogError (AppServer, " Unhandled Refrigerator and Temperature attribute %ld" , attributeId);
122
117
return ;
@@ -136,21 +131,6 @@ void RefrigeratorManager::TempCtrlAttributeChangeHandler(EndpointId endpointId,
136
131
TempCtrlAttr::TemperatureSetpoint::Set (endpointId, temperatureSetpoint);
137
132
}
138
133
break ;
139
-
140
- case TempCtrlAttr::MinTemperature::Id: {
141
- int16_t minTemperature = ConvertToPrintableTemp (static_cast <int16_t >(*value));
142
- mMinTemperature = minTemperature;
143
- TempCtrlAttr::MinTemperature::Set (endpointId, minTemperature);
144
- }
145
- break ;
146
-
147
- case TempCtrlAttr::MaxTemperature::Id: {
148
- int16_t maxTemperature = ConvertToPrintableTemp (static_cast <int16_t >(*value));
149
- mMaxTemperature = maxTemperature;
150
- TempCtrlAttr::MaxTemperature::Set (endpointId, maxTemperature);
151
- }
152
- break ;
153
-
154
134
default : {
155
135
ChipLogError (AppServer, " Unhandled Temperature controlled attribute %ld" , attributeId);
156
136
return ;
@@ -177,14 +157,7 @@ void RefrigeratorManager::RefAlaramAttributeChangeHandler(EndpointId endpointId,
177
157
RefAlarmAttr::State::Set (endpointId, mState );
178
158
}
179
159
break ;
180
-
181
- case RefAlarmAttr::Supported::Id: {
182
- auto supported = static_cast <uint32_t >(*value);
183
- mSupported = static_cast <chip::app::Clusters::RefrigeratorAlarm::AlarmBitmap>(supported);
184
- RefAlarmAttr::Supported::Set (endpointId, mSupported );
185
- }
186
- break ;
187
-
160
+
188
161
default : {
189
162
ChipLogError (AppServer, " Unhandled Refrigerator Alarm attribute %ld" , attributeId);
190
163
return ;
0 commit comments