Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(fota): remove custom download callback #42

Merged
merged 1 commit into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions overlay-memfault.conf
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,3 @@ CONFIG_MEMFAULT_NCS_FW_VERSION="0.0.99-dev"

# Define our own implementation of this function
CONFIG_MEMFAULT_NCS_IMPLEMENT_METRICS_COLLECTION=n

# Let's manage the memfault_fota_download_callback() from
# the asset tracker application rather than using the Memfault default
CONFIG_MEMFAULT_FOTA_DOWNLOAD_CALLBACK_CUSTOM=y
15 changes: 0 additions & 15 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -522,21 +522,6 @@ static void prv_run_memfault_fota_check(void) {
k_work_schedule(&s_memfault_fota_work, K_SECONDS(FOTA_WORK_ITEM_DELAY_SECONDS));
}

void memfault_fota_download_callback(const struct fota_download_evt *evt)
{
switch (evt->id) {
case FOTA_DOWNLOAD_EVT_FINISHED:
MEMFAULT_LOG_INFO("OTA Complete, resetting to install update!");
memfault_platform_reboot();
break;
case FOTA_DOWNLOAD_EVT_ERROR:
MEMFAULT_LOG_ERROR("FOTA failed");
break;
default:
break;
}
}

static void prv_memfault_fota_timer_expiry_handler(struct k_timer *timer)
{
ARG_UNUSED(timer);
Expand Down
Loading