Make EStopManager Interrupt based#268
Conversation
There was a problem hiding this comment.
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.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
nullstalgia
left a comment
There was a problem hiding this comment.
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)
This will lower its response time, reduce cpu load, and prepare this feature for the ESP-IDF conversion