Skip to content

Make EStopManager Interrupt based#268

Merged
hhvrc merged 15 commits into
developfrom
feature/interrupt-based-estop
Aug 21, 2024
Merged

Make EStopManager Interrupt based#268
hhvrc merged 15 commits into
developfrom
feature/interrupt-based-estop

Conversation

@hhvrc

@hhvrc hhvrc commented Aug 21, 2024

Copy link
Copy Markdown
Contributor

This will lower its response time, reduce cpu load, and prepare this feature for the ESP-IDF conversion

@hhvrc hhvrc added this to the ESP-IDF milestone Aug 21, 2024
@hhvrc hhvrc requested a review from nullstalgia August 21, 2024 12:32
@hhvrc hhvrc self-assigned this Aug 21, 2024

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cpp-linter Review

Only 1 out of 6 clang-format concerns fit within this pull request's diff.

Click here for the full clang-format patch
diff --git a/src/VisualStateManager.cpp b/src/VisualStateManager.cpp
index 4aed02a..c668a30 100644
--- a/src/VisualStateManager.cpp
+++ b/src/VisualStateManager.cpp
@@ -149 +149 @@ const PinPatternManager::State kSolidOffPattern[] = {
-template <std::size_t N>
+template<std::size_t N>
@@ -224 +224 @@ void _updateVisualState() {
-  bool rgbActive = s_RGBLedManager != nullptr;
+  bool rgbActive  = s_RGBLedManager != nullptr;
@@ -285 +285 @@ void _handleWiFiScanDone(arduino_event_t* event) {
-#endif // OPENSHOCK_LED_GPIO
+#endif  // OPENSHOCK_LED_GPIO
@@ -288 +288 @@ void _handleWiFiScanDone(arduino_event_t* event) {
-#endif // OPENSHOCK_LED_WS2812B
+#endif  // OPENSHOCK_LED_WS2812B
diff --git a/src/radio/RFTransmitter.cpp b/src/radio/RFTransmitter.cpp
index 80a187d..702b827 100644
--- a/src/radio/RFTransmitter.cpp
+++ b/src/radio/RFTransmitter.cpp
@@ -182,2 +182 @@ void RFTransmitter::TransmitTask(void* arg) {
-    if(OpenShock::EStopManager::IsEStopped()) {
-
+    if (OpenShock::EStopManager::IsEStopped()) {
@@ -208 +207 @@ void RFTransmitter::TransmitTask(void* arg) {
-        if(cmd->until + TRANSMIT_END_DURATION < OpenShock::millis()) {
+        if (cmd->until + TRANSMIT_END_DURATION < OpenShock::millis()) {

Have any feedback or feature suggestions? Share it here.

Comment thread src/radio/RFTransmitter.cpp Outdated
hhvrc and others added 2 commits August 21, 2024 14:39
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@github-actions github-actions Bot dismissed their stale review August 21, 2024 12:41

outdated suggestion

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cpp-linter Review

Only 0 out of 5 clang-format concerns fit within this pull request's diff.

Click here for the full clang-format patch
diff --git a/src/VisualStateManager.cpp b/src/VisualStateManager.cpp
index 4aed02a..c668a30 100644
--- a/src/VisualStateManager.cpp
+++ b/src/VisualStateManager.cpp
@@ -149 +149 @@ const PinPatternManager::State kSolidOffPattern[] = {
-template <std::size_t N>
+template<std::size_t N>
@@ -224 +224 @@ void _updateVisualState() {
-  bool rgbActive = s_RGBLedManager != nullptr;
+  bool rgbActive  = s_RGBLedManager != nullptr;
@@ -285 +285 @@ void _handleWiFiScanDone(arduino_event_t* event) {
-#endif // OPENSHOCK_LED_GPIO
+#endif  // OPENSHOCK_LED_GPIO
@@ -288 +288 @@ void _handleWiFiScanDone(arduino_event_t* event) {
-#endif // OPENSHOCK_LED_WS2812B
+#endif  // OPENSHOCK_LED_WS2812B
diff --git a/src/radio/RFTransmitter.cpp b/src/radio/RFTransmitter.cpp
index f43b77a..702b827 100644
--- a/src/radio/RFTransmitter.cpp
+++ b/src/radio/RFTransmitter.cpp
@@ -207 +207 @@ void RFTransmitter::TransmitTask(void* arg) {
-        if(cmd->until + TRANSMIT_END_DURATION < OpenShock::millis()) {
+        if (cmd->until + TRANSMIT_END_DURATION < OpenShock::millis()) {

Have any feedback or feature suggestions? Share it here.

@github-actions github-actions Bot dismissed their stale review August 21, 2024 12:41

outdated suggestion

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cpp-linter Review

Only 0 out of 5 clang-format concerns fit within this pull request's diff.

Click here for the full clang-format patch
diff --git a/src/VisualStateManager.cpp b/src/VisualStateManager.cpp
index 4aed02a..c668a30 100644
--- a/src/VisualStateManager.cpp
+++ b/src/VisualStateManager.cpp
@@ -149 +149 @@ const PinPatternManager::State kSolidOffPattern[] = {
-template <std::size_t N>
+template<std::size_t N>
@@ -224 +224 @@ void _updateVisualState() {
-  bool rgbActive = s_RGBLedManager != nullptr;
+  bool rgbActive  = s_RGBLedManager != nullptr;
@@ -285 +285 @@ void _handleWiFiScanDone(arduino_event_t* event) {
-#endif // OPENSHOCK_LED_GPIO
+#endif  // OPENSHOCK_LED_GPIO
@@ -288 +288 @@ void _handleWiFiScanDone(arduino_event_t* event) {
-#endif // OPENSHOCK_LED_WS2812B
+#endif  // OPENSHOCK_LED_WS2812B
diff --git a/src/radio/RFTransmitter.cpp b/src/radio/RFTransmitter.cpp
index f43b77a..702b827 100644
--- a/src/radio/RFTransmitter.cpp
+++ b/src/radio/RFTransmitter.cpp
@@ -207 +207 @@ void RFTransmitter::TransmitTask(void* arg) {
-        if(cmd->until + TRANSMIT_END_DURATION < OpenShock::millis()) {
+        if (cmd->until + TRANSMIT_END_DURATION < OpenShock::millis()) {

Have any feedback or feature suggestions? Share it here.

@hhvrc hhvrc dismissed github-actions[bot]’s stale review August 21, 2024 12:43

None concern this PR

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cpp-linter Review

Only 0 out of 5 clang-format concerns fit within this pull request's diff.

Click here for the full clang-format patch
diff --git a/src/VisualStateManager.cpp b/src/VisualStateManager.cpp
index 91cf5d3..1d729f8 100644
--- a/src/VisualStateManager.cpp
+++ b/src/VisualStateManager.cpp
@@ -149 +149 @@ const PinPatternManager::State kSolidOffPattern[] = {
-template <std::size_t N>
+template<std::size_t N>
@@ -224 +224 @@ void _updateVisualState() {
-  bool rgbActive = s_RGBLedManager != nullptr;
+  bool rgbActive  = s_RGBLedManager != nullptr;
@@ -285 +285 @@ void _handleWiFiScanDone(arduino_event_t* event) {
-#endif // OPENSHOCK_LED_GPIO
+#endif  // OPENSHOCK_LED_GPIO
@@ -288 +288 @@ void _handleWiFiScanDone(arduino_event_t* event) {
-#endif // OPENSHOCK_LED_WS2812B
+#endif  // OPENSHOCK_LED_WS2812B
diff --git a/src/radio/RFTransmitter.cpp b/src/radio/RFTransmitter.cpp
index f43b77a..702b827 100644
--- a/src/radio/RFTransmitter.cpp
+++ b/src/radio/RFTransmitter.cpp
@@ -207 +207 @@ void RFTransmitter::TransmitTask(void* arg) {
-        if(cmd->until + TRANSMIT_END_DURATION < OpenShock::millis()) {
+        if (cmd->until + TRANSMIT_END_DURATION < OpenShock::millis()) {

Have any feedback or feature suggestions? Share it here.

@github-actions github-actions Bot dismissed their stale review August 21, 2024 22:34

outdated suggestion

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cpp-linter Review

Only 0 out of 5 clang-format concerns fit within this pull request's diff.

Click here for the full clang-format patch
diff --git a/src/VisualStateManager.cpp b/src/VisualStateManager.cpp
index 91cf5d3..1d729f8 100644
--- a/src/VisualStateManager.cpp
+++ b/src/VisualStateManager.cpp
@@ -149 +149 @@ const PinPatternManager::State kSolidOffPattern[] = {
-template <std::size_t N>
+template<std::size_t N>
@@ -224 +224 @@ void _updateVisualState() {
-  bool rgbActive = s_RGBLedManager != nullptr;
+  bool rgbActive  = s_RGBLedManager != nullptr;
@@ -285 +285 @@ void _handleWiFiScanDone(arduino_event_t* event) {
-#endif // OPENSHOCK_LED_GPIO
+#endif  // OPENSHOCK_LED_GPIO
@@ -288 +288 @@ void _handleWiFiScanDone(arduino_event_t* event) {
-#endif // OPENSHOCK_LED_WS2812B
+#endif  // OPENSHOCK_LED_WS2812B
diff --git a/src/radio/RFTransmitter.cpp b/src/radio/RFTransmitter.cpp
index f43b77a..702b827 100644
--- a/src/radio/RFTransmitter.cpp
+++ b/src/radio/RFTransmitter.cpp
@@ -207 +207 @@ void RFTransmitter::TransmitTask(void* arg) {
-        if(cmd->until + TRANSMIT_END_DURATION < OpenShock::millis()) {
+        if (cmd->until + TRANSMIT_END_DURATION < OpenShock::millis()) {

Have any feedback or feature suggestions? Share it here.

@hhvrc hhvrc dismissed github-actions[bot]’s stale review August 21, 2024 22:45

None concern this PR

@nullstalgia nullstalgia left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments above Task and ISR need to be updated (but that will be done in an upcoming PR), otherwise LGTM.

(Tested on Core V2 hardware)

@hhvrc hhvrc merged commit bfe82c3 into develop Aug 21, 2024
@hhvrc hhvrc deleted the feature/interrupt-based-estop branch August 21, 2024 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants