Commit 5df98101 authored by Johny Mattsson's avatar Johny Mattsson
Browse files

Prevent UART/startup race ala 1517.

We're already in the right context, there is no point posting back the
Lua start, we can do it right then and there instead.
parent e355057d
...@@ -83,9 +83,8 @@ static void handle_esp_event (task_param_t param, task_prio_t prio) ...@@ -83,9 +83,8 @@ static void handle_esp_event (task_param_t param, task_prio_t prio)
// +================== New task interface ==================+ // +================== New task interface ==================+
static void start_lua(task_param_t param, task_prio_t prio) { static void start_lua ()
(void)param; {
(void)prio;
char* lua_argv[] = { (char *)"lua", (char *)"-i", NULL }; char* lua_argv[] = { (char *)"lua", (char *)"-i", NULL };
NODE_DBG("Task task_lua started.\n"); NODE_DBG("Task task_lua started.\n");
lua_main( 2, lua_argv ); lua_main( 2, lua_argv );
...@@ -142,8 +141,6 @@ void nodemcu_init(void) ...@@ -142,8 +141,6 @@ void nodemcu_init(void)
// Note that fs_format leaves the file system mounted // Note that fs_format leaves the file system mounted
} }
#endif #endif
task_post_low(task_get_id(start_lua), 0);
} }
...@@ -170,6 +167,7 @@ void app_main (void) ...@@ -170,6 +167,7 @@ void app_main (void)
system_init (); system_init ();
tcpip_adapter_init (); tcpip_adapter_init ();
start_lua ();
task_pump_messages (); task_pump_messages ();
__builtin_unreachable (); __builtin_unreachable ();
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment