From be90d23eeb8720f255f94e9a28b24e338d8f5ad5 Mon Sep 17 00:00:00 2001 From: anschrammh Date: Fri, 5 Jan 2024 21:28:29 +0100 Subject: [PATCH] Also resetting the bma456 internal setp counts when resetting the watch to its factory settings, this is nedeed because if the watch crashes or resets on its own, the bma456 is not reset anymore allowing to save the current step counter count and saving time by not reloading the config file. --- src/W800_SDK_v1.00.10/app/gfx/gfx_task.c | 7 +++++++ 1 file changed, 7 insertions(+) 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 25a7bca..d783a85 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 @@ -402,6 +402,13 @@ static void saveSettingsToFlashCb(void) static void performFactoryResetCb() { + // Reset the BMA456 internal step counter + if(!watch_peripherals_accelerometer_step_count_reset()) + { + APP_LOG_ERROR("Failed to reset the step counter"); + return; + } + // Reload factory settings persistency_factory_reset();