From eacea59e8a3f9602ed06834a8edc4e6ab18a4bb9 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Tue, 30 Jan 2024 11:03:31 +1100 Subject: Do more to avoid and recover from partial db updates - do not power off in an update is in progress - explicitly store last update time, rather than deriving it from unchanged tracks. --- src/system_fsm/system_fsm.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/system_fsm/system_fsm.cpp') diff --git a/src/system_fsm/system_fsm.cpp b/src/system_fsm/system_fsm.cpp index df750e80..977f4a6d 100644 --- a/src/system_fsm/system_fsm.cpp +++ b/src/system_fsm/system_fsm.cpp @@ -95,7 +95,8 @@ void SystemState::react(const internal::SamdInterrupt&) { } auto SystemState::IdleCondition() -> bool { - return sServices->gpios().IsLocked() && + auto db = sServices->database().lock(); + return sServices->gpios().IsLocked() && !(db && db->isUpdating()) && audio::AudioState::is_in_state(); } -- cgit v1.2.3