Skip to content

Commit

Permalink
Fix SetValveLevel, correct error code and added include needed by oth…
Browse files Browse the repository at this point in the history
…er platforms (project-chip#31750)
  • Loading branch information
ReneJosefsen authored Jan 30, 2024
1 parent f5ca5ad commit 48e7bae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include <lib/core/CHIPError.h>
#include <lib/support/logging/CHIPLogging.h>
#include <platform/CHIPDeviceConfig.h>
#include <platform/CHIPDeviceLayer.h>

using namespace chip;
using namespace chip::app;
Expand Down Expand Up @@ -335,7 +336,7 @@ CHIP_ERROR SetValveLevel(EndpointId ep, DataModel::Nullable<Percent> level, Data
VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == AutoCloseTime::SetNull(ep), attribute_error);
}
#else
return CHIP_FAILURE;
return CHIP_ERROR_NOT_IMPLEMENTED;
#endif // ZCL_USING_TIME_SYNCHRONIZATION_CLUSTER_SERVER
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void SetDefaultDelegate(EndpointId endpoint, Delegate * delegate);
Delegate * GetDefaultDelegate(EndpointId endpoint);

CHIP_ERROR CloseValve(chip::EndpointId ep);
CHIP_ERROR SetValveLevel(chip::EndpointId ep, chip::Percent level, DataModel::Nullable<uint32_t> openDuration);
CHIP_ERROR SetValveLevel(chip::EndpointId ep, DataModel::Nullable<Percent> level, DataModel::Nullable<uint32_t> openDuration);
CHIP_ERROR UpdateCurrentLevel(chip::EndpointId ep, chip::Percent currentLevel);
CHIP_ERROR UpdateCurrentState(chip::EndpointId ep, ValveConfigurationAndControl::ValveStateEnum currentState);
CHIP_ERROR EmitValveFault(chip::EndpointId ep, chip::BitMask<ValveConfigurationAndControl::ValveFaultBitmap> fault);
Expand Down

0 comments on commit 48e7bae

Please sign in to comment.