From d55dceff371c4080d179fb26e6f175927cc48768 Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Sat, 16 Apr 2022 14:25:49 +0100 Subject: apps: Add ability to do a clean reboot Allow a clean shutdown to end in either power off or reboot. Add a new event SYS_REBOOT to signal it and sys_reboot() to trigger the event. SYS_REBOOT signals a reboot request and should be listened for alongside SYS_POWEROFF events. Change-Id: I99ba7fb5feed2bb5a0a40a274e8466ad74fe3a43 --- apps/plugins/lua/rocklib.c | 1 + 1 file changed, 1 insertion(+) (limited to 'apps/plugins/lua/rocklib.c') diff --git a/apps/plugins/lua/rocklib.c b/apps/plugins/lua/rocklib.c index 6131a479db..cadc8be6ac 100644 --- a/apps/plugins/lua/rocklib.c +++ b/apps/plugins/lua/rocklib.c @@ -1090,6 +1090,7 @@ LUALIB_API int luaopen_rock(lua_State *L) RB_CONSTANT(SYS_USB_DISCONNECTED), RB_CONSTANT(SYS_TIMEOUT), RB_CONSTANT(SYS_POWEROFF), + RB_CONSTANT(SYS_REBOOT), RB_CONSTANT(SYS_CHARGER_CONNECTED), RB_CONSTANT(SYS_CHARGER_DISCONNECTED), -- cgit v1.2.3