From fb8fb169f18e2d56237517c018f7fdb2552355fc Mon Sep 17 00:00:00 2001 From: Jason Teng Date: Sun, 4 Jun 2023 17:12:54 -0700 Subject: [PATCH] Add: display dac stream control --- Application/Src/CLI.cpp | 4 ++++ Application/Src/Thread.cpp | 1 + 2 files changed, 5 insertions(+) diff --git a/Application/Src/CLI.cpp b/Application/Src/CLI.cpp index daa49c0..789a78c 100644 --- a/Application/Src/CLI.cpp +++ b/Application/Src/CLI.cpp @@ -134,6 +134,10 @@ int32_t CLI::cmd_motor(int32_t argc, char** argv) { motor_dac.off(); } else if (!strcmp(argv[1], "breath")) { motor_dac.breath(); + } else if (!strcmp(argv[1], "stream_on")) { + xTaskResumeFromISR(thread.utilities_handle); + } else if (!strcmp(argv[1], "stream_off")) { + vTaskSuspend(thread.utilities_handle); } else { serialCOM.sendString("Unknown Command\n"); } diff --git a/Application/Src/Thread.cpp b/Application/Src/Thread.cpp index 3843525..b8a2c58 100644 --- a/Application/Src/Thread.cpp +++ b/Application/Src/Thread.cpp @@ -42,6 +42,7 @@ void Thread::init() { cli.init(); motor_dac.init(); flash.Load(); + vTaskSuspend(utilities_handle); vTaskSuspend(NULL); } }