From 138a8a90ba88629c34fcc7348c86e464a614fe5f Mon Sep 17 00:00:00 2001 From: Sebastien Merle Date: Tue, 18 Nov 2025 14:24:15 +0100 Subject: [PATCH] Fix updater info The function that derive the updater information was relying on the device only doing one boot attempt of the new software version (next system being the valid system when booting the new software) and this was causing issue with new platforms that are configured to retry to boot the new software multiple times before falling back. As this wasn't required, it now ignores the next system to derive the current information. In addition we show a warning when the updater status and info fail to match the expectations. --- src/grisp_connect_updater.erl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/grisp_connect_updater.erl b/src/grisp_connect_updater.erl index bfd30f2..70cf947 100644 --- a/src/grisp_connect_updater.erl +++ b/src/grisp_connect_updater.erl @@ -149,16 +149,17 @@ update_info() -> action_required => remove_sdcard_and_reboot}; % Updated and rebooted {ready, - #{type := system, id := TestId} = Boot, + #{type := system, id := BootId} = Boot, #{type := system, id := ValidId}, - #{type := system, id := NextId}} - when ValidId =/= TestId, ValidId =:= NextId -> + _} + when ValidId =/= BootId -> #{update_enabled => true, boot_source => Boot, update_status => updated, update_message => <<"Device updated, validation required">>, action_required => validate}; - _ -> + StatusInfo -> + ?LOG_WARNING("Updater info is not supported: ~p", [StatusInfo]), #{update_enabled => true} end end.