From b19bbd3daceb0e62b44a312702b20b02a09eac43 Mon Sep 17 00:00:00 2001 From: Raj Nakarja Date: Thu, 19 Sep 2024 11:37:51 +0100 Subject: [PATCH] Button click ensures Frame stays powered for pairing --- source/application/luaport.c | 2 +- source/application/main.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/source/application/luaport.c b/source/application/luaport.c index d20c2be4..aa8fad15 100644 --- a/source/application/luaport.c +++ b/source/application/luaport.c @@ -108,7 +108,7 @@ void run_lua(bool factory_reset, bool is_paired) } // Run main.lua - int status = luaL_dostring(L, "require('main')"); + int status = luaL_dostring(L, "frame.stay_awake(false); require('main')"); if (status != LUA_OK) { diff --git a/source/application/main.c b/source/application/main.c index c739617c..0cb9112d 100644 --- a/source/application/main.c +++ b/source/application/main.c @@ -290,6 +290,7 @@ static void hardware_setup(bool *factory_reset) { LOG("Factory reset"); *factory_reset = true; + stay_awake = true; } }