From a695c65a1096fd96c49ef8b072099a447c613390 Mon Sep 17 00:00:00 2001 From: bdring Date: Fri, 10 Jul 2020 16:18:36 -0500 Subject: [PATCH] Fix race condition in Huanyang.h. - Initial queue before task. --- Grbl_Esp32/Spindles/HuanyangSpindle.cpp | 4 ++-- Grbl_Esp32/grbl.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Grbl_Esp32/Spindles/HuanyangSpindle.cpp b/Grbl_Esp32/Spindles/HuanyangSpindle.cpp index 14a8b6bc..f25b65f1 100644 --- a/Grbl_Esp32/Spindles/HuanyangSpindle.cpp +++ b/Grbl_Esp32/Spindles/HuanyangSpindle.cpp @@ -108,6 +108,7 @@ void vfd_cmd_task(void* pvParameters) { void HuanyangSpindle :: init() { if (! _task_running) { // init can happen many times, we only want to start one task + hy_cmd_queue = xQueueCreate(5, sizeof(hy_command_t)); xTaskCreatePinnedToCore(vfd_cmd_task, // task "vfd_cmdTaskHandle", // name for task 2048, // size of task stack @@ -115,8 +116,7 @@ void HuanyangSpindle :: init() { 1, // priority &vfd_cmdTaskHandle, 0 // core - ); - hy_cmd_queue = xQueueCreate(5, sizeof(hy_command_t)); + ); _task_running = true; } diff --git a/Grbl_Esp32/grbl.h b/Grbl_Esp32/grbl.h index 90460f9f..b4292c95 100644 --- a/Grbl_Esp32/grbl.h +++ b/Grbl_Esp32/grbl.h @@ -22,7 +22,7 @@ // Grbl versioning system #define GRBL_VERSION "1.2a" -#define GRBL_VERSION_BUILD "20200631" +#define GRBL_VERSION_BUILD "20200710" //#include #include