Skip to content

Commit

Permalink
Fix tv-app build on darwin
Browse files Browse the repository at this point in the history
This was broken by #7266
  • Loading branch information
bzbarsky-apple committed Jun 14, 2021
1 parent 1e546a1 commit 18597e0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,13 @@ EmberAfKeypadInputStatus KeypadInputManager::proxyKeypadInputRequest(EmberAfKeyp
return EMBER_ZCL_KEYPAD_INPUT_STATUS_SUCCESS;
}

static void sendResponse(const char * responseName, uint8_t keypadInputStatus)
static void sendResponse(const char * responseName, EmberAfKeypadInputStatus keypadInputStatus)
{
// TODO: Once our enums are sized properly, or once we stop depending on the
// value being a certain type, we can remove the static_cast. For now the
// cast is safe because all EmberAfKeypadInputStatus values fit in uint32_t.
emberAfFillExternalBuffer((ZCL_CLUSTER_SPECIFIC_COMMAND | ZCL_FRAME_CONTROL_SERVER_TO_CLIENT), ZCL_KEYPAD_INPUT_CLUSTER_ID,
ZCL_SEND_KEY_RESPONSE_COMMAND_ID, "u", keypadInputStatus);
ZCL_SEND_KEY_RESPONSE_COMMAND_ID, "u", static_cast<uint8_t>(keypadInputStatus));

EmberStatus status = emberAfSendResponse();
if (status != EMBER_SUCCESS)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,13 @@ void MediaPlaybackManager::storeNewPlaybackState(chip::EndpointId endpoint, uint
}
}

static void sendResponse(const char * responseName, chip::CommandId commandId, uint8_t mediaPlaybackStatus)
static void sendResponse(const char * responseName, chip::CommandId commandId, EmberAfMediaPlaybackStatus mediaPlaybackStatus)
{
// TODO: Once our enums are sized properly, or once we stop depending on the
// value being a certain type, we can remove the static_cast. For now the
// cast is safe because all EmberAfKeypadInputStatus values fit in uint32_t.
emberAfFillExternalBuffer((ZCL_CLUSTER_SPECIFIC_COMMAND | ZCL_FRAME_CONTROL_SERVER_TO_CLIENT), ZCL_MEDIA_PLAYBACK_CLUSTER_ID,
commandId, "u", mediaPlaybackStatus);
commandId, "u", static_cast<uint8_t>(mediaPlaybackStatus));

EmberStatus status = emberAfSendResponse();
if (status != EMBER_SUCCESS)
Expand Down

0 comments on commit 18597e0

Please sign in to comment.