Skip to content

Commit

Permalink
Temporarily fix the compilation errors for ESP OTA Requestor app
Browse files Browse the repository at this point in the history
  • Loading branch information
wqx6 committed Dec 1, 2021
1 parent 04f047b commit dd2de3e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/ota-requestor-app/esp32/main/OTARequesterImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ void OnQueryImageFailure(void * context, EmberAfStatus status);
void OnApplyUpdateResponse(void * context, const ApplyUpdateResponse::DecodableType & response);
void OnApplyUpdateRequestFailure(void * context, EmberAfStatus status);

void OnConnected(void * context, chip::DeviceProxy * deviceProxy);
void OnConnected(void * context, chip::OperationalDeviceProxy * deviceProxy);
void OnConnectionFailure(void * context, NodeId deviceId, CHIP_ERROR error);

void OnBlockReceived(void * context, const chip::bdx::TransferSession::BlockData & blockdata);
Expand Down Expand Up @@ -174,7 +174,7 @@ void OnApplyUpdateRequestFailure(void * context, EmberAfStatus status)
ChipLogDetail(SoftwareUpdate, "ApplyUpdateRequest failure response %" PRIu8, status);
}

void OnConnected(void * context, chip::DeviceProxy * deviceProxy)
void OnConnected(void * context, chip::OperationalDeviceProxy * deviceProxy)
{
ChipLogDetail(SoftwareUpdate, "Callback OnConnected");
uint8_t * command = reinterpret_cast<uint8_t *>(context);
Expand Down
13 changes: 13 additions & 0 deletions examples/ota-requestor-app/esp32/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

#include "CHIPDeviceManager.h"
#include "DeviceCallbacks.h"
#include "app/util/af-enums.h"
#include "app/util/af.h"
#include "esp_heap_caps_init.h"
#include "esp_log.h"
#include "esp_netif.h"
Expand Down Expand Up @@ -180,3 +182,14 @@ extern "C" void app_main()

ESPInitConsole();
}

// TODO: We should use the function definition in /src/app/clusters/ota-requestor/ClusterInterface.cpp
// Temporarily add this function.

bool emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback(
chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath,
const chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::DecodableType & commandData)
{
emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_SUCCESS);
return true;
}

0 comments on commit dd2de3e

Please sign in to comment.