summaryrefslogtreecommitdiff
path: root/src/tangara/ui/ui_fsm.cpp
diff options
context:
space:
mode:
authorcooljqln <cooljqln@noreply.codeberg.org>2025-03-12 23:51:40 +0000
committercooljqln <cooljqln@noreply.codeberg.org>2025-03-12 23:51:40 +0000
commitfe38a57120145f73abf170400fe4a0eb0fd2714a (patch)
tree80c2ca8003fe32e59eccf2e208a53e1e87c66790 /src/tangara/ui/ui_fsm.cpp
parent42c2a4f2445ff56a2a0a78c4ef265e5be346d40d (diff)
parent9fdf94e9cee5a5180ffefc2b8314f7a9879ebbc6 (diff)
downloadtangara-fw-fe38a57120145f73abf170400fe4a0eb0fd2714a.tar.gz
Merge pull request 'Allow manually unmounting the SD card' (#271) from ayumi/tangara-fw:unmount into main
Reviewed-on: https://codeberg.org/cool-tech-zone/tangara-fw/pulls/271
Diffstat (limited to 'src/tangara/ui/ui_fsm.cpp')
-rw-r--r--src/tangara/ui/ui_fsm.cpp5
1 files changed, 5 insertions, 0 deletions
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",
{