Skip to content

Commit

Permalink
[nrfconnect] Fix OTA initialization order
Browse files Browse the repository at this point in the history
Recent OTA changes impose an assumption that OTA Requestor
must be initialized prior to the OTA Requestor driver.
  • Loading branch information
Damian-Nordic committed Mar 24, 2022
1 parent 07fc8cd commit 484a64a
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/examples-nrfconnect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
/tmp/bloat_reports/
- name: Build example nRF Connect SDK Lighting App on nRF52840 DK with RPC
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
timeout-minutes: 10
timeout-minutes: 20
run: |
scripts/examples/nrfconnect_example.sh lighting-app nrf52840dk_nrf52840 -DOVERLAY_CONFIG=rpc.overlay
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
Expand Down
2 changes: 1 addition & 1 deletion examples/all-clusters-app/nrfconnect/main/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@ void AppTask::InitOTARequestor()
#if CONFIG_CHIP_OTA_REQUESTOR
mOTAImageProcessor.SetOTADownloader(&mBDXDownloader);
mBDXDownloader.SetImageProcessorDelegate(&mOTAImageProcessor);
mOTARequestorDriver.Init(&mOTARequestor, &mOTAImageProcessor);
mOTARequestorStorage.Init(chip::Server::GetInstance().GetPersistentStorage());
mOTARequestor.Init(chip::Server::GetInstance(), mOTARequestorStorage, mOTARequestorDriver, mBDXDownloader);
mOTARequestorDriver.Init(&mOTARequestor, &mOTAImageProcessor);
chip::SetRequestorInstance(&mOTARequestor);
#endif
}
Expand Down
2 changes: 1 addition & 1 deletion examples/lighting-app/nrfconnect/main/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,9 @@ void AppTask::InitOTARequestor()
#if CONFIG_CHIP_OTA_REQUESTOR
sOTAImageProcessor.SetOTADownloader(&sBDXDownloader);
sBDXDownloader.SetImageProcessorDelegate(&sOTAImageProcessor);
sOTARequestorDriver.Init(&sOTARequestor, &sOTAImageProcessor);
sRequestorStorage.Init(Server::GetInstance().GetPersistentStorage());
sOTARequestor.Init(Server::GetInstance(), sRequestorStorage, sOTARequestorDriver, sBDXDownloader);
sOTARequestorDriver.Init(&sOTARequestor, &sOTAImageProcessor);
chip::SetRequestorInstance(&sOTARequestor);
#endif
}
Expand Down
2 changes: 1 addition & 1 deletion examples/lock-app/nrfconnect/main/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,9 @@ void AppTask::InitOTARequestor()
#if CONFIG_CHIP_OTA_REQUESTOR
sOTAImageProcessor.SetOTADownloader(&sBDXDownloader);
sBDXDownloader.SetImageProcessorDelegate(&sOTAImageProcessor);
sOTARequestorDriver.Init(&sOTARequestor, &sOTAImageProcessor);
sRequestorStorage.Init(Server::GetInstance().GetPersistentStorage());
sOTARequestor.Init(Server::GetInstance(), sRequestorStorage, sOTARequestorDriver, sBDXDownloader);
sOTARequestorDriver.Init(&sOTARequestor, &sOTAImageProcessor);
chip::SetRequestorInstance(&sOTARequestor);
#endif
}
Expand Down
2 changes: 1 addition & 1 deletion examples/pump-app/nrfconnect/main/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ void AppTask::InitOTARequestor()
#if CONFIG_CHIP_OTA_REQUESTOR
sOTAImageProcessor.SetOTADownloader(&sBDXDownloader);
sBDXDownloader.SetImageProcessorDelegate(&sOTAImageProcessor);
sOTARequestorDriver.Init(&sOTARequestor, &sOTAImageProcessor);
sRequestorStorage.Init(chip::Server::GetInstance().GetPersistentStorage());
sOTARequestor.Init(chip::Server::GetInstance(), sRequestorStorage, sOTARequestorDriver, sBDXDownloader);
sOTARequestorDriver.Init(&sOTARequestor, &sOTAImageProcessor);
chip::SetRequestorInstance(&sOTARequestor);
#endif
}
Expand Down
2 changes: 1 addition & 1 deletion examples/pump-controller-app/nrfconnect/main/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,9 @@ void AppTask::InitOTARequestor()
#if CONFIG_CHIP_OTA_REQUESTOR
sOTAImageProcessor.SetOTADownloader(&sBDXDownloader);
sBDXDownloader.SetImageProcessorDelegate(&sOTAImageProcessor);
sOTARequestorDriver.Init(&sOTARequestor, &sOTAImageProcessor);
sRequestorStorage.Init(chip::Server::GetInstance().GetPersistentStorage());
sOTARequestor.Init(chip::Server::GetInstance(), sRequestorStorage, sOTARequestorDriver, sBDXDownloader);
sOTARequestorDriver.Init(&sOTARequestor, &sOTAImageProcessor);
chip::SetRequestorInstance(&sOTARequestor);
#endif
}
Expand Down

0 comments on commit 484a64a

Please sign in to comment.