From 6b06e28394e82cac90a6017f6ff50823f62105b0 Mon Sep 17 00:00:00 2001 From: Anatole SCHRAMM Date: Wed, 25 Oct 2023 12:46:43 +0200 Subject: [PATCH] Enabling the settings save feature (called when leaving the settings screen) only when the HARDWARE_PLATFORM is set to SMART_WATCH_PCB_RELEASE --- src/W800_SDK_v1.00.10/app/gfx/gfx_task.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/W800_SDK_v1.00.10/app/gfx/gfx_task.c b/src/W800_SDK_v1.00.10/app/gfx/gfx_task.c index f280637..39d90db 100644 --- a/src/W800_SDK_v1.00.10/app/gfx/gfx_task.c +++ b/src/W800_SDK_v1.00.10/app/gfx/gfx_task.c @@ -1,3 +1,4 @@ +#include "app_config.h" #include "app_common.h" #include "app_utils.h" #include "lvgl.h" @@ -386,10 +387,13 @@ static void getBMP280DataCb(float *temperature, float *pressure) static void saveSettingsToFlashCb(void) { - /*if(!persistency_save_settings_to_flash()) + // Only enable the settings save feature if we compile in SMART_WATCH_PCB_RELEASE mode + #if HARDWARE_PLATFORM == SMART_WATCH_PCB_RELEASE + if(!persistency_save_settings_to_flash()) { APP_LOG_ERROR("Failed to save watch settings to flash"); - }*/ + } + #endif } static void performFactoryResetCb()