From 9fdf94e9cee5a5180ffefc2b8314f7a9879ebbc6 Mon Sep 17 00:00:00 2001 From: ayumi Date: Sat, 15 Feb 2025 02:25:27 +0100 Subject: Allow manually unmounting the SD card --- src/tangara/ui/ui_fsm.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/tangara/ui/ui_fsm.cpp') diff --git a/src/tangara/ui/ui_fsm.cpp b/src/tangara/ui/ui_fsm.cpp index a22c704b..ebc4b635 100644 --- a/src/tangara/ui/ui_fsm.cpp +++ b/src/tangara/ui/ui_fsm.cpp @@ -714,6 +714,11 @@ void Lua::entry() { }); registry.AddPropertyModule("sd_card", { {"mounted", &sSdMounted}, + {"unmount", [&](lua_State*) { + events::System().Dispatch( + UnmountRequest{}); + return 0; + }}, }); registry.AddPropertyModule("usb", { -- cgit v1.2.3