Skip to content

Commit

Permalink
Restyle
Browse files Browse the repository at this point in the history
  • Loading branch information
Terence Hampson committed Mar 7, 2023
1 parent d281ca9 commit 2c4506c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/controller/python/chip/clusters/Attribute.py
Original file line number Diff line number Diff line change
Expand Up @@ -1110,7 +1110,7 @@ def Init():
handle.pychip_WriteClient_WriteGroupAttributes.restype = PyChipError

# Both WriteAttributes and WriteGroupAttributes are variadic functions. As per ctype documentation
# https://docs.python.org/3/library/ctypes.html#calling-varadic-functions, it is critical that we
# https://docs.python.org/3/library/ctypes.html#calling-varadic-functions, it is critical that we
# specify the argtypes attribute for the regular, non-variadic, function arguments for this to work
# on ARM64 for Apple Platforms.
# TODO We could move away from a variadic function to one where we provide a vector of the
Expand Down
6 changes: 3 additions & 3 deletions src/controller/python/chip/clusters/attribute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -332,9 +332,9 @@ PyChipError pychip_WriteClient_WriteAttributes(void * appContext, DeviceProxy *

// The FFI from Python to C when calling a variadic function has issues when the regular, non-variadic, function
// arguments are unit16_t. As a result we pass these arguments as size_t and cast them to the expected uint16_t.
uint16_t timedWriteTimeoutMs = static_cast<uint16_t>(timedWriteTimeoutMsSizeT);
uint16_t timedWriteTimeoutMs = static_cast<uint16_t>(timedWriteTimeoutMsSizeT);
uint16_t interactionTimeoutMs = static_cast<uint16_t>(interactionTimeoutMsSizeT);
uint16_t busyWaitMs = static_cast<uint16_t>(busyWaitMsSizeT);
uint16_t busyWaitMs = static_cast<uint16_t>(busyWaitMsSizeT);

std::unique_ptr<WriteClientCallback> callback = std::make_unique<WriteClientCallback>(appContext);
std::unique_ptr<WriteClient> client = std::make_unique<WriteClient>(
Expand Down Expand Up @@ -398,7 +398,7 @@ PyChipError pychip_WriteClient_WriteGroupAttributes(size_t groupIdSizeT, chip::C
// arguments are unit16_t (which is the type for chip::GroupId). As a result we pass these arguments as size_t
// and cast them to the expected type here.
chip::GroupId groupId = static_cast<chip::GroupId>(groupIdSizeT);
uint16_t busyWaitMs = static_cast<uint16_t>(busyWaitMsSizeT);
uint16_t busyWaitMs = static_cast<uint16_t>(busyWaitMsSizeT);

chip::Messaging::ExchangeManager * exchangeManager = chip::app::InteractionModelEngine::GetInstance()->GetExchangeManager();
VerifyOrReturnError(exchangeManager != nullptr, ToPyChipError(CHIP_ERROR_INCORRECT_STATE));
Expand Down

0 comments on commit 2c4506c

Please sign in to comment.