Skip to content

Commit bd328b9

Browse files
committed
code review comments
1 parent 1c0dccf commit bd328b9

File tree

5 files changed

+7
-11
lines changed

5 files changed

+7
-11
lines changed

src/platform/silabs/efr32/BUILD.gn

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ static_library("efr32") {
9191
} else if (chip_enable_ota_requestor) {
9292
sources += [
9393
"${silabs_platform_dir}/OTAImageProcessorImpl.h",
94-
"${silabs_platform_dir}/efr32/OTAImageProcessorImpl.cpp",
94+
"OTAImageProcessorImpl.cpp",
9595
]
9696
}
9797

src/platform/silabs/multi-ota/OTAMultiImageProcessorImpl.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -440,16 +440,13 @@ CHIP_ERROR OTAMultiImageProcessorImpl::ReleaseBlock()
440440

441441
void OTAMultiImageProcessorImpl::FetchNextData(uint32_t context)
442442
{
443-
ChipLogError(SoftwareUpdate, "Fetch data 1:");
444-
445443
auto * imageProcessor = &OTAMultiImageProcessorImpl::GetDefaultInstance();
446444
SystemLayer().ScheduleLambda([imageProcessor] {
447445
if (imageProcessor->mDownloader)
448446
{
449447
imageProcessor->mDownloader->FetchNextData();
450448
}
451449
});
452-
ChipLogError(SoftwareUpdate, "Fetch data 2:");
453450
}
454451

455452
OTAMultiImageProcessorImpl & OTAMultiImageProcessorImpl::GetDefaultInstance()

src/platform/silabs/multi-ota/OTAMultiImageProcessorImpl.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
* This hook is called at the end of OTAMultiImageProcessorImpl::Init.
3131
* It should generally register the OTATlvProcessor instances.
3232
*/
33-
CHIP_ERROR OtaHookInit();
3433

3534
namespace chip {
3635

@@ -40,6 +39,8 @@ class OTAMultiImageProcessorImpl : public OTAImageProcessorInterface
4039
using ProviderLocation = chip::OTARequestorInterface::ProviderLocationType;
4140

4241
CHIP_ERROR Init(OTADownloader * downloader);
42+
CHIP_ERROR OtaHookInit();
43+
static CHIP_ERROR ProcessDescriptor(void * descriptor);
4344
void Clear();
4445

4546
//////////// OTAImageProcessorInterface Implementation ///////////////

src/platform/silabs/multi-ota/OTATlvProcessor.h

+2
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ namespace chip {
4141
#define CHIP_OTA_PROCESSOR_EEPROM_OFFSET CHIP_ERROR_TLV_PROCESSOR(0x0C)
4242
#define CHIP_OTA_PROCESSOR_EXTERNAL_STORAGE CHIP_ERROR_TLV_PROCESSOR(0x0D)
4343
#define CHIP_OTA_PROCESSOR_START_IMAGE CHIP_ERROR_TLV_PROCESSOR(0x0E)
44+
#define SL_GENERIC_OTA_ERROR CHIP_ERROR_TLV_PROCESSOR(0x0E)
45+
4446

4547
// Descriptor constants
4648
inline constexpr size_t kVersionStringSize = 64;

src/platform/silabs/multi-ota/efr32/OTAHooks.cpp

+2-6
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,19 @@
2121

2222
#include <app/clusters/ota-requestor/OTARequestorInterface.h>
2323

24-
#include <platform/silabs/multi-ota/efr32/OTACustomProcessor.h>
2524
#include <platform/silabs/multi-ota/efr32/OTAFirmwareProcessor.h>
2625

27-
CHIP_ERROR ProcessDescriptor(void * descriptor)
26+
CHIP_ERROR chip::OTAMultiImageProcessorImpl::ProcessDescriptor(void * descriptor)
2827
{
2928
auto desc = static_cast<chip::OTAFirmwareProcessor::Descriptor *>(descriptor);
3029
ChipLogDetail(SoftwareUpdate, "Descriptor: %ld, %s, %s", desc->version, desc->versionString, desc->buildDate);
3130

3231
return CHIP_NO_ERROR;
3332
}
3433

35-
CHIP_ERROR OtaHookInit()
34+
CHIP_ERROR chip::OTAMultiImageProcessorImpl::OtaHookInit()
3635
{
3736
static chip::OTAFirmwareProcessor sApplicationProcessor;
38-
#if CONFIG_CHIP_SILABS_OTA_FACTORY_DATA_PROCESSOR
39-
static chip::OTAFactoryDataProcessor sFactoryDataProcessor;
40-
#endif // CONFIG_CHIP_SILABS_OTA_FACTORY_DATA_PROCESSOR
4137

4238
sApplicationProcessor.RegisterDescriptorCallback(ProcessDescriptor);
4339

0 commit comments

Comments
 (0)