From cf05c9cd0854df1257640f772fccbe2e55abccd7 Mon Sep 17 00:00:00 2001 From: Bernd Meyer Date: Thu, 10 Mar 2016 12:07:44 +1100 Subject: [PATCH] Don't try to handle uart input until we have set up the buffer for it --- app/user/user_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/user/user_main.c b/app/user/user_main.c index 520a9a1d..290010bc 100644 --- a/app/user/user_main.c +++ b/app/user/user_main.c @@ -80,16 +80,19 @@ void TEXT_SECTION_ATTR user_start_trampoline (void) call_user_start (); } +static bool lua_started=false; // +================== New task interface ==================+ static void start_lua(task_param_t param, uint8 priority) { char* lua_argv[] = { (char *)"lua", (char *)"-i", NULL }; NODE_DBG("Task task_lua started.\n"); lua_main( 2, lua_argv ); + lua_started=true; } static void handle_input(task_param_t flag, uint8 priority) { // c_printf("HANDLE_INPUT: %u %u\n", flag, priority); REMOVE - lua_handle_input (flag); + if (lua_started) + lua_handle_input (flag); } static task_handle_t input_sig;