From 27cd1b4359a14879f64234b7946aac3396a73170 Mon Sep 17 00:00:00 2001
From: Davide Mor <davide.mor@skywarder.eu>
Date: Sun, 19 Mar 2023 17:32:04 +0100
Subject: [PATCH] [sx1278] Fixed clang-format

---
 src/entrypoints/sx1278-serial.cpp                   | 2 +-
 src/shared/radio/SX1278/SX1278Common.cpp            | 6 +++---
 src/shared/radio/SX1278/SX1278Common.h              | 1 -
 src/tests/radio/sx1278/lora/test-sx1278-mavlink.cpp | 2 +-
 4 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/entrypoints/sx1278-serial.cpp b/src/entrypoints/sx1278-serial.cpp
index a4b8ad028..39be5c51f 100644
--- a/src/entrypoints/sx1278-serial.cpp
+++ b/src/entrypoints/sx1278-serial.cpp
@@ -204,7 +204,7 @@ int main()
     printf("\n[sx1278] Configuring sx1278 fsk...\n");
     if ((err = sx1278->init(config)) != SX1278Fsk::Error::NONE)
     {
-        // FIXME: Why does clang-format put this line up here?
+                         // FIXME: Why does clang-format put this line up here?
         printf("[sx1278] sx1278->init error\n");
         return -1;
     }
diff --git a/src/shared/radio/SX1278/SX1278Common.cpp b/src/shared/radio/SX1278/SX1278Common.cpp
index af118e818..0e7442813 100644
--- a/src/shared/radio/SX1278/SX1278Common.cpp
+++ b/src/shared/radio/SX1278/SX1278Common.cpp
@@ -64,7 +64,7 @@ void SX1278Common::waitForIrq(LockMode &_guard, IrqFlags irq, bool unlock)
         // An interrupt could occur and read from this variables
         {
             miosix::FastInterruptDisableLock dLock;
-            state.irq_wait_thread  = miosix::Thread::IRQgetCurrentThread();
+            state.irq_wait_thread = miosix::Thread::IRQgetCurrentThread();
         }
 
         // Check that this hasn't already happened
@@ -156,7 +156,7 @@ SX1278Common::DeviceState SX1278Common::lockMode(Mode mode, DioMapping mapping,
     DeviceState old_state = state;
 
     enterMode(mode, mapping, tx_frontend, rx_frontend);
-    state.irq_wait_thread  = nullptr;
+    state.irq_wait_thread = nullptr;
 
     return old_state;
 }
@@ -164,7 +164,7 @@ SX1278Common::DeviceState SX1278Common::lockMode(Mode mode, DioMapping mapping,
 void SX1278Common::unlockMode(DeviceState old_state)
 {
     // Do this copy manually, we want stuff to be copied in a specific order
-    state.irq_wait_thread  = old_state.irq_wait_thread;
+    state.irq_wait_thread = old_state.irq_wait_thread;
     enterMode(old_state.mode, old_state.mapping, old_state.is_tx_frontend_on,
               old_state.is_rx_frontend_on);
 }
diff --git a/src/shared/radio/SX1278/SX1278Common.h b/src/shared/radio/SX1278/SX1278Common.h
index d718dbf91..6dd68834f 100644
--- a/src/shared/radio/SX1278/SX1278Common.h
+++ b/src/shared/radio/SX1278/SX1278Common.h
@@ -98,7 +98,6 @@ private:
     };
 
 public:
-
     /**
      * @brief Handle generic DIO irq.
      */
diff --git a/src/tests/radio/sx1278/lora/test-sx1278-mavlink.cpp b/src/tests/radio/sx1278/lora/test-sx1278-mavlink.cpp
index 3b9426541..63ed5eeb7 100644
--- a/src/tests/radio/sx1278/lora/test-sx1278-mavlink.cpp
+++ b/src/tests/radio/sx1278/lora/test-sx1278-mavlink.cpp
@@ -204,7 +204,7 @@ int main()
 
     sx1278 =
         new SX1278Lora(bus, cs, SPI::ClockDivider::DIV_64, std::move(frontend));
-    
+
     printf("\n[sx1278] Configuring sx1278...\n");
     if ((err = sx1278->init(config)) != SX1278Lora::Error::NONE)
     {
-- 
GitLab