|
22 | 22 | #include "CookTopEndpoint.h" |
23 | 23 | #include "OvenEndpoint.h" |
24 | 24 |
|
| 25 | +#include <app-common/zap-generated/cluster-objects.h> |
| 26 | +#include <app-common/zap-generated/attributes/Accessors.h> |
| 27 | +#include <app/clusters/mode-base-server/mode-base-cluster-objects.h> |
| 28 | + |
25 | 29 | #include "AppConfig.h" |
26 | 30 | #include "AppTask.h" |
27 | 31 |
|
@@ -67,6 +71,24 @@ void OvenManager::Init() |
67 | 71 |
|
68 | 72 | VerifyOrReturn(mCookTopEndpoint.Init() == CHIP_NO_ERROR, ChipLogError(AppServer, "CookTopEndpoint Init failed")); |
69 | 73 |
|
| 74 | + // Initialize TemperatureControl cluster numeric temperature attributes for endpoint 2 (silent on failure) |
| 75 | + { |
| 76 | + Status tcStatus = TemperatureControl::Attributes::TemperatureSetpoint::Set(kTemperatureControlledCabinetEndpoint2, 0); |
| 77 | + VerifyOrReturn(tcStatus == Status::Success, |
| 78 | + ChipLogError(AppServer, "Endpoint2 TemperatureSetpoint init failed")); |
| 79 | + |
| 80 | + tcStatus = TemperatureControl::Attributes::MinTemperature::Set(kTemperatureControlledCabinetEndpoint2, 0); |
| 81 | + VerifyOrReturn(tcStatus == Status::Success, |
| 82 | + ChipLogError(AppServer, "Endpoint2 MinTemperature init failed")); |
| 83 | + |
| 84 | + tcStatus = TemperatureControl::Attributes::MaxTemperature::Set(kTemperatureControlledCabinetEndpoint2, 30000); |
| 85 | + VerifyOrReturn(tcStatus == Status::Success, |
| 86 | + ChipLogError(AppServer, "Endpoint2 MaxTemperature init failed")); |
| 87 | + |
| 88 | + tcStatus = TemperatureControl::Attributes::Step::Set(kTemperatureControlledCabinetEndpoint2, 500); |
| 89 | + VerifyOrReturn(tcStatus == Status::Success, ChipLogError(AppServer, "Endpoint2 Step init failed")); |
| 90 | + } |
| 91 | + |
70 | 92 | // Register the shared TemperatureLevelsDelegate for all the cooksurface endpoints |
71 | 93 | TemperatureControl::SetInstance(&mTemperatureControlDelegate); |
72 | 94 |
|
|
0 commit comments