From 5427ef564d230b15ce61cf29e879b0fa5dcc943b Mon Sep 17 00:00:00 2001
From: "Yipeng (Andrew) Wang" <98450999+YPAndrew0907@users.noreply.github.com>
Date: Thu, 22 Feb 2024 18:37:35 -0500
Subject: [PATCH] testing commit
---
.idea/misc.xml | 18 +++++
.idea/vcs.xml | 6 ++
.idea/workspace.xml | 144 ++++++++++++++++++++++++++++++++++++++++
MSB/.idea/workspace.xml | 94 ++++++++++++++++++++++++++
MSB/msb_main.c | 15 ++++-
5 files changed, 274 insertions(+), 3 deletions(-)
create mode 100644 .idea/misc.xml
create mode 100644 .idea/vcs.xml
create mode 100644 .idea/workspace.xml
create mode 100644 MSB/.idea/workspace.xml
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..53624c9
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..35eb1dd
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
new file mode 100644
index 0000000..0237634
--- /dev/null
+++ b/.idea/workspace.xml
@@ -0,0 +1,144 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1708564805295
+
+
+ 1708564805295
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MSB/.idea/workspace.xml b/MSB/.idea/workspace.xml
new file mode 100644
index 0000000..a6ad733
--- /dev/null
+++ b/MSB/.idea/workspace.xml
@@ -0,0 +1,94 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {
+ "associatedIndex": 0
+}
+
+
+
+
+
+
+
+
+ {
+ "keyToString": {
+ "ASKED_ADD_EXTERNAL_FILES": "true",
+ "ASKED_SHARE_PROJECT_CONFIGURATION_FILES": "true",
+ "C/C++ File.Unnamed.executor": "Run",
+ "RunOnceActivity.OpenProjectViewOnStart": "true",
+ "RunOnceActivity.ShowReadmeOnStart": "true",
+ "RunOnceActivity.cidr.known.project.marker": "true",
+ "RunOnceActivity.readMode.enableVisualFormatting": "true",
+ "SHARE_PROJECT_CONFIGURATION_FILES": "true",
+ "cf.first.check.clang-format": "false",
+ "cidr.known.project.marker": "true",
+ "git-widget-placeholder": "main",
+ "node.js.detected.package.eslint": "true",
+ "node.js.detected.package.tslint": "true",
+ "node.js.selected.package.eslint": "(autodetect)",
+ "node.js.selected.package.tslint": "(autodetect)",
+ "nodejs_package_manager_path": "npm",
+ "vue.rearranger.settings.migration": "true"
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+ 1708126180566
+
+
+ 1708126180566
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MSB/msb_main.c b/MSB/msb_main.c
index 52f6919..979a287 100644
--- a/MSB/msb_main.c
+++ b/MSB/msb_main.c
@@ -3,13 +3,18 @@
#include "api/msb_can.h"
#include "cmsis_os.h"
+//Thread ID identifies the thread.
osThreadId_t canTaskHandle;
void init_msb() {
- // spawn CAN output thread
- start_can_publisher();
+ // Create a thread to run start_can_publisher
+ canTaskHandle = osThreadNew(start_can_publisher, NULL, NULL);
+ if (canTaskHandle == NULL) {
+ // Handle error, need implementation in the future
+ }
}
+// test
void start_msb() {
init_msb();
@@ -21,5 +26,9 @@ void start_msb() {
}
void stop_msb() {
-
+ if (canTaskHandle != NULL) {
+ osThreadTerminate(canTaskHandle);
+ //put Null for now, implementation in the future
+ canTaskHandle = NULL;
+ }
}