diff --git a/src/bsps/stm32f205rc_ciuti/config/miosix_settings.h b/src/bsps/stm32f205rc_ciuti/config/miosix_settings.h
index 22c33aa669e90ce3ce872c672a623f431203bc2d..49bd06ca471287e548728be3a4a33cd3e8d63a20 100644
--- a/src/bsps/stm32f205rc_ciuti/config/miosix_settings.h
+++ b/src/bsps/stm32f205rc_ciuti/config/miosix_settings.h
@@ -27,8 +27,8 @@
 // The PARSING_FROM_IDE is because Netbeans gets confused by this, it is never
 // defined when compiling the code.
 #ifndef PARSING_FROM_IDE
-//#error This error is a reminder that you have not edited miosix_settings.h
-// yet.
+// #error This error is a reminder that you have not edited miosix_settings.h
+//  yet.
 #endif  // PARSING_FROM_IDE
 
 /**
diff --git a/src/bsps/stm32f205rc_ciuti/interfaces-impl/bsp.cpp b/src/bsps/stm32f205rc_ciuti/interfaces-impl/bsp.cpp
index 39c47a1384b699e1917634cf2085ff22cd1f1123..1637b04ca1bc626798d9516e31abffead5e6c148 100644
--- a/src/bsps/stm32f205rc_ciuti/interfaces-impl/bsp.cpp
+++ b/src/bsps/stm32f205rc_ciuti/interfaces-impl/bsp.cpp
@@ -70,39 +70,39 @@ void IRQbspInit()
 
     spi1::cs::mode(Mode::OUTPUT);
     spi1::cs::high();
-    spi1::sck::mode(Mode::ALTERNATE);
     spi1::sck::alternateFunction(5);
-    spi1::miso::mode(Mode::ALTERNATE);
+    spi1::sck::mode(Mode::ALTERNATE);
     spi1::miso::alternateFunction(5);
-    spi1::mosi::mode(Mode::ALTERNATE);
+    spi1::miso::mode(Mode::ALTERNATE);
     spi1::mosi::alternateFunction(5);
+    spi1::mosi::mode(Mode::ALTERNATE);
 
-    spi2::sck::mode(Mode::ALTERNATE);
     spi2::sck::alternateFunction(5);
-    spi2::miso::mode(Mode::ALTERNATE);
+    spi2::sck::mode(Mode::ALTERNATE);
     spi2::miso::alternateFunction(5);
-    spi2::mosi::mode(Mode::ALTERNATE);
+    spi2::miso::mode(Mode::ALTERNATE);
     spi2::mosi::alternateFunction(5);
+    spi2::mosi::mode(Mode::ALTERNATE);
 
-    usart1::rx::mode(Mode::ALTERNATE);
     usart1::rx::alternateFunction(7);
-    usart1::tx::mode(Mode::ALTERNATE);
+    usart1::rx::mode(Mode::ALTERNATE);
     usart1::tx::alternateFunction(7);
+    usart1::tx::mode(Mode::ALTERNATE);
 
-    usart2::rx::mode(Mode::ALTERNATE);
     usart2::rx::alternateFunction(7);
-    usart2::tx::mode(Mode::ALTERNATE);
+    usart2::rx::mode(Mode::ALTERNATE);
     usart2::tx::alternateFunction(7);
+    usart2::tx::mode(Mode::ALTERNATE);
 
-    usart3::rx::mode(Mode::ALTERNATE);
     usart3::rx::alternateFunction(7);
-    usart3::tx::mode(Mode::ALTERNATE);
+    usart3::rx::mode(Mode::ALTERNATE);
     usart3::tx::alternateFunction(7);
+    usart3::tx::mode(Mode::ALTERNATE);
 
-    can1::rx::mode(Mode::ALTERNATE);
     can1::rx::alternateFunction(9);
-    can1::tx::mode(Mode::ALTERNATE);
+    can1::rx::mode(Mode::ALTERNATE);
     can1::tx::alternateFunction(9);
+    can1::tx::mode(Mode::ALTERNATE);
 
     using namespace devices;
 
@@ -124,8 +124,8 @@ void IRQbspInit()
     buttons::bypass::mode(Mode::INPUT);
     buttons::record::mode(Mode::INPUT);
 
-    buzzer::drive::mode(Mode::ALTERNATE);
     buzzer::drive::alternateFunction(3);
+    buzzer::drive::mode(Mode::ALTERNATE);
 
     leds::led1::mode(Mode::OUTPUT);
     leds::led1::low();
diff --git a/src/bsps/stm32f429zi_con_rig/config/miosix_settings.h b/src/bsps/stm32f429zi_con_rig/config/miosix_settings.h
index 5bb339e02447493b119574e5027f4970721d88bf..fb5d771285246a5b7cfd087bd8bb4b522d06967a 100644
--- a/src/bsps/stm32f429zi_con_rig/config/miosix_settings.h
+++ b/src/bsps/stm32f429zi_con_rig/config/miosix_settings.h
@@ -27,8 +27,8 @@
 // The PARSING_FROM_IDE is because Netbeans gets confused by this, it is never
 // defined when compiling the code.
 #ifndef PARSING_FROM_IDE
-//#error This error is a reminder that you have not edited miosix_settings.h
-// yet.
+// #error This error is a reminder that you have not edited miosix_settings.h
+//  yet.
 #endif  // PARSING_FROM_IDE
 
 /**
@@ -70,14 +70,14 @@ namespace miosix
 // Uncomment only *one* of those
 
 #define SCHED_TYPE_PRIORITY
-//#define SCHED_TYPE_CONTROL_BASED
-//#define SCHED_TYPE_EDF
+// #define SCHED_TYPE_CONTROL_BASED
+// #define SCHED_TYPE_EDF
 
 /// \def WITH_CPU_TIME_COUNTER
 /// Allows to enable/disable CPUTimeCounter to save code size and remove its
 /// overhead from the scheduling process. By default it is not defined
 /// (CPUTimeCounter is disabled).
-//#define WITH_CPU_TIME_COUNTER
+// #define WITH_CPU_TIME_COUNTER
 
 //
 // Filesystem options
@@ -110,7 +110,7 @@ const unsigned char MAX_OPEN_FILES = 8;
 /// This enables the dynamic loader to load elf programs, the extended system
 /// call service and, if the hardware supports it, the MPU to provide memory
 /// isolation of processes
-//#define WITH_PROCESSES
+// #define WITH_PROCESSES
 
 #if defined(WITH_PROCESSES) && defined(__NO_EXCEPTIONS)
 #error Processes require C++ exception support
@@ -145,7 +145,7 @@ const unsigned char MAX_OPEN_FILES = 8;
 /// \def WITH_DEEP_SLEEP
 /// Adds interfaces and required variables to support deep sleep state switch
 /// automatically when peripherals are not required
-//#define WITH_DEEP_SLEEP
+// #define WITH_DEEP_SLEEP
 
 /**
  * \def JTAG_DISABLE_SLEEP
diff --git a/src/bsps/stm32f429zi_con_rig/interfaces-impl/bsp.cpp b/src/bsps/stm32f429zi_con_rig/interfaces-impl/bsp.cpp
index bd78945768d115bef934039b429e4e86bb5e73cc..02a27c32d8c55a8eb1d19dea758617d63305503e 100644
--- a/src/bsps/stm32f429zi_con_rig/interfaces-impl/bsp.cpp
+++ b/src/bsps/stm32f429zi_con_rig/interfaces-impl/bsp.cpp
@@ -213,12 +213,12 @@ void IRQbspInit()
     RCC_SYNC();
 
     // Initialize everything
-    interfaces::spi1::sck::mode(Mode::ALTERNATE);
     interfaces::spi1::sck::alternateFunction(5);
-    interfaces::spi1::miso::mode(Mode::ALTERNATE);
+    interfaces::spi1::sck::mode(Mode::ALTERNATE);
     interfaces::spi1::miso::alternateFunction(5);
-    interfaces::spi1::mosi::mode(Mode::ALTERNATE);
+    interfaces::spi1::miso::mode(Mode::ALTERNATE);
     interfaces::spi1::mosi::alternateFunction(5);
+    interfaces::spi1::mosi::mode(Mode::ALTERNATE);
 
     btns::n2o_filling::mode(Mode::INPUT);
     btns::n2o_release::mode(Mode::INPUT);
diff --git a/src/bsps/stm32f429zi_death_stack_v1/config/miosix_settings.h b/src/bsps/stm32f429zi_death_stack_v1/config/miosix_settings.h
index 10946aeba9077c07d1b692eb1713a26d1431a55a..6f4e025893905677b49535bd077b1b6fe925b453 100644
--- a/src/bsps/stm32f429zi_death_stack_v1/config/miosix_settings.h
+++ b/src/bsps/stm32f429zi_death_stack_v1/config/miosix_settings.h
@@ -27,8 +27,8 @@
 // The PARSING_FROM_IDE is because Netbeans gets confused by this, it is never
 // defined when compiling the code.
 #ifndef PARSING_FROM_IDE
-//#error This error is a reminder that you have not edited miosix_settings.h
-// yet.
+// #error This error is a reminder that you have not edited miosix_settings.h
+//  yet.
 #endif  // PARSING_FROM_IDE
 
 /**
@@ -70,14 +70,14 @@ namespace miosix
 // Uncomment only *one* of those
 
 #define SCHED_TYPE_PRIORITY
-//#define SCHED_TYPE_CONTROL_BASED
-//#define SCHED_TYPE_EDF
+// #define SCHED_TYPE_CONTROL_BASED
+// #define SCHED_TYPE_EDF
 
 /// \def WITH_CPU_TIME_COUNTER
 /// Allows to enable/disable CPUTimeCounter to save code size and remove its
 /// overhead from the scheduling process. By default it is not defined
 /// (CPUTimeCounter is disabled).
-//#define WITH_CPU_TIME_COUNTER
+// #define WITH_CPU_TIME_COUNTER
 
 //
 // Filesystem options
@@ -110,7 +110,7 @@ const unsigned char MAX_OPEN_FILES = 8;
 /// This enables the dynamic loader to load elf programs, the extended system
 /// call service and, if the hardware supports it, the MPU to provide memory
 /// isolation of processes
-//#define WITH_PROCESSES
+// #define WITH_PROCESSES
 
 #if defined(WITH_PROCESSES) && defined(__NO_EXCEPTIONS)
 #error Processes require C++ exception support
@@ -145,7 +145,7 @@ const unsigned char MAX_OPEN_FILES = 8;
 /// \def WITH_DEEP_SLEEP
 /// Adds interfaces and required variables to support deep sleep state switch
 /// automatically when peripherals are not required
-//#define WITH_DEEP_SLEEP
+// #define WITH_DEEP_SLEEP
 
 /**
  * \def JTAG_DISABLE_SLEEP
diff --git a/src/bsps/stm32f429zi_death_stack_v1/interfaces-impl/bsp.cpp b/src/bsps/stm32f429zi_death_stack_v1/interfaces-impl/bsp.cpp
index 646ee99b221f0f426d5eff6d306c4d909cea9969..6e54d48a8c2a09abda7eefb7acd1644b7072c1f7 100644
--- a/src/bsps/stm32f429zi_death_stack_v1/interfaces-impl/bsp.cpp
+++ b/src/bsps/stm32f429zi_death_stack_v1/interfaces-impl/bsp.cpp
@@ -327,19 +327,19 @@ void IRQbspInit()
 #endif  //__ENABLE_XRAM
 
     using namespace interfaces;
-    spi1::sck::mode(Mode::ALTERNATE);
     spi1::sck::alternateFunction(5);
-    spi1::miso::mode(Mode::ALTERNATE);
+    spi1::sck::mode(Mode::ALTERNATE);
     spi1::miso::alternateFunction(5);
-    spi1::mosi::mode(Mode::ALTERNATE);
+    spi1::miso::mode(Mode::ALTERNATE);
     spi1::mosi::alternateFunction(5);
+    spi1::mosi::mode(Mode::ALTERNATE);
 
-    spi2::sck::mode(Mode::ALTERNATE);
     spi2::sck::alternateFunction(5);
-    spi2::miso::mode(Mode::ALTERNATE);
+    spi2::sck::mode(Mode::ALTERNATE);
     spi2::miso::alternateFunction(5);
-    spi2::mosi::mode(Mode::ALTERNATE);
+    spi2::miso::mode(Mode::ALTERNATE);
     spi2::mosi::alternateFunction(5);
+    spi2::mosi::mode(Mode::ALTERNATE);
 
     // Software I2C
     i2c::scl::high();
@@ -347,21 +347,21 @@ void IRQbspInit()
     i2c::sda::high();
     i2c::sda::mode(Mode::OPEN_DRAIN);
 
-    uart4::rx::mode(Mode::ALTERNATE);
     uart4::rx::alternateFunction(8);
-    uart4::tx::mode(Mode::ALTERNATE);
+    uart4::rx::mode(Mode::ALTERNATE);
     uart4::tx::alternateFunction(8);
+    uart4::tx::mode(Mode::ALTERNATE);
 
-    can::rx::mode(Mode::ALTERNATE);
     can::rx::alternateFunction(9);
-    can::tx::mode(Mode::ALTERNATE);
+    can::rx::mode(Mode::ALTERNATE);
     can::tx::alternateFunction(9);
+    can::tx::mode(Mode::ALTERNATE);
 
     using namespace sensors;
     adis16405::cs::mode(Mode::OUTPUT);
     adis16405::cs::high();
-    adis16405::ckIn::mode(Mode::ALTERNATE);
     adis16405::ckIn::alternateFunction(2);
+    adis16405::ckIn::mode(Mode::ALTERNATE);
     adis16405::dio1::mode(Mode::INPUT);
     adis16405::rst::mode(Mode::OUTPUT);
     adis16405::rst::high();
@@ -396,11 +396,11 @@ void IRQbspInit()
     motP2::mode(Mode::OUTPUT);
     motP2::low();
 
-    rogP1::mode(Mode::ALTERNATE);
     rogP1::alternateFunction(2);
+    rogP1::mode(Mode::ALTERNATE);
 
-    rogP2::mode(Mode::ALTERNATE);
     rogP2::alternateFunction(2);
+    rogP2::mode(Mode::ALTERNATE);
 
     nc_dtch::mode(Mode::INPUT);
     motor_act::mode(Mode::INPUT);
@@ -412,8 +412,8 @@ void IRQbspInit()
     motor_gnd::low();
 
     using namespace actuators;
-    tcPwm::mode(Mode::ALTERNATE);
     tcPwm::alternateFunction(3);
+    tcPwm::mode(Mode::ALTERNATE);
 
     thCut1::ena::mode(Mode::OUTPUT);
     thCut1::ena::low();
diff --git a/src/bsps/stm32f429zi_death_stack_v2/config/miosix_settings.h b/src/bsps/stm32f429zi_death_stack_v2/config/miosix_settings.h
index aaee8b547e5996e93ae14c79aa38ea091cab45e6..5e46fc07ae64763ab77e94d351d0452b92fae3aa 100644
--- a/src/bsps/stm32f429zi_death_stack_v2/config/miosix_settings.h
+++ b/src/bsps/stm32f429zi_death_stack_v2/config/miosix_settings.h
@@ -27,8 +27,8 @@
 // The PARSING_FROM_IDE is because Netbeans gets confused by this, it is never
 // defined when compiling the code.
 #ifndef PARSING_FROM_IDE
-//#error This error is a reminder that you have not edited miosix_settings.h
-// yet.
+// #error This error is a reminder that you have not edited miosix_settings.h
+//  yet.
 #endif  // PARSING_FROM_IDE
 
 /**
@@ -70,14 +70,14 @@ namespace miosix
 // Uncomment only *one* of those
 
 #define SCHED_TYPE_PRIORITY
-//#define SCHED_TYPE_CONTROL_BASED
-//#define SCHED_TYPE_EDF
+// #define SCHED_TYPE_CONTROL_BASED
+// #define SCHED_TYPE_EDF
 
 /// \def WITH_CPU_TIME_COUNTER
 /// Allows to enable/disable CPUTimeCounter to save code size and remove its
 /// overhead from the scheduling process. By default it is not defined
 /// (CPUTimeCounter is disabled).
-//#define WITH_CPU_TIME_COUNTER
+// #define WITH_CPU_TIME_COUNTER
 
 //
 // Filesystem options
@@ -110,7 +110,7 @@ const unsigned char MAX_OPEN_FILES = 8;
 /// This enables the dynamic loader to load elf programs, the extended system
 /// call service and, if the hardware supports it, the MPU to provide memory
 /// isolation of processes
-//#define WITH_PROCESSES
+// #define WITH_PROCESSES
 
 #if defined(WITH_PROCESSES) && defined(__NO_EXCEPTIONS)
 #error Processes require C++ exception support
@@ -145,7 +145,7 @@ const unsigned char MAX_OPEN_FILES = 8;
 /// \def WITH_DEEP_SLEEP
 /// Adds interfaces and required variables to support deep sleep state switch
 /// automatically when peripherals are not required
-//#define WITH_DEEP_SLEEP
+// #define WITH_DEEP_SLEEP
 
 /**
  * \def JTAG_DISABLE_SLEEP
diff --git a/src/bsps/stm32f429zi_death_stack_v2/interfaces-impl/bsp.cpp b/src/bsps/stm32f429zi_death_stack_v2/interfaces-impl/bsp.cpp
index b7574a91aa84f527af37387db0b72f3df46665b1..8dc6f3db0635ae9438b635c522c1220b6e0b3740 100644
--- a/src/bsps/stm32f429zi_death_stack_v2/interfaces-impl/bsp.cpp
+++ b/src/bsps/stm32f429zi_death_stack_v2/interfaces-impl/bsp.cpp
@@ -337,44 +337,44 @@ void IRQbspInit()
 
     using namespace interfaces;
 
-    spi1::sck::mode(Mode::ALTERNATE);
     spi1::sck::alternateFunction(5);
-    spi1::miso::mode(Mode::ALTERNATE);
+    spi1::sck::mode(Mode::ALTERNATE);
     spi1::miso::alternateFunction(5);
-    spi1::mosi::mode(Mode::ALTERNATE);
+    spi1::miso::mode(Mode::ALTERNATE);
     spi1::mosi::alternateFunction(5);
+    spi1::mosi::mode(Mode::ALTERNATE);
 
-    spi2::sck::mode(Mode::ALTERNATE);
     spi2::sck::alternateFunction(5);
-    spi2::miso::mode(Mode::ALTERNATE);
+    spi2::sck::mode(Mode::ALTERNATE);
     spi2::miso::alternateFunction(5);
-    spi2::mosi::mode(Mode::ALTERNATE);
+    spi2::miso::mode(Mode::ALTERNATE);
     spi2::mosi::alternateFunction(5);
+    spi2::mosi::mode(Mode::ALTERNATE);
 
-    uart2::rx::mode(Mode::ALTERNATE);
     uart2::rx::alternateFunction(7);
-    uart2::tx::mode(Mode::ALTERNATE);
+    uart2::rx::mode(Mode::ALTERNATE);
     uart2::tx::alternateFunction(7);
+    uart2::tx::mode(Mode::ALTERNATE);
 
-    uart3::rx::mode(Mode::ALTERNATE);
     uart3::rx::alternateFunction(7);
-    uart3::tx::mode(Mode::ALTERNATE);
+    uart3::rx::mode(Mode::ALTERNATE);
     uart3::tx::alternateFunction(7);
+    uart3::tx::mode(Mode::ALTERNATE);
 
-    uart4::rx::mode(Mode::ALTERNATE);
     uart4::rx::alternateFunction(8);
-    uart4::tx::mode(Mode::ALTERNATE);
+    uart4::rx::mode(Mode::ALTERNATE);
     uart4::tx::alternateFunction(8);
+    uart4::tx::mode(Mode::ALTERNATE);
 
-    can::rx::mode(Mode::ALTERNATE);
     can::rx::alternateFunction(9);
-    can::tx::mode(Mode::ALTERNATE);
+    can::rx::mode(Mode::ALTERNATE);
     can::tx::alternateFunction(9);
+    can::tx::mode(Mode::ALTERNATE);
 
-    timers::tim4ch1::mode(Mode::ALTERNATE);
     timers::tim4ch1::alternateFunction(2);
-    timers::tim8ch2::mode(Mode::ALTERNATE);
+    timers::tim4ch1::mode(Mode::ALTERNATE);
     timers::tim8ch2::alternateFunction(3);
+    timers::tim8ch2::mode(Mode::ALTERNATE);
 
     camMosfet::mode(Mode::OUTPUT);
     camMosfet::low();
diff --git a/src/bsps/stm32f429zi_death_stack_v3/config/miosix_settings.h b/src/bsps/stm32f429zi_death_stack_v3/config/miosix_settings.h
index ee7e8487d9952b6c54a6a1b1be15b262e2731c86..0682125082b7d8e8e95335e98a0001c6197a460b 100644
--- a/src/bsps/stm32f429zi_death_stack_v3/config/miosix_settings.h
+++ b/src/bsps/stm32f429zi_death_stack_v3/config/miosix_settings.h
@@ -27,8 +27,8 @@
 // The PARSING_FROM_IDE is because Netbeans gets confused by this, it is never
 // defined when compiling the code.
 #ifndef PARSING_FROM_IDE
-//#error This error is a reminder that you have not edited miosix_settings.h
-// yet.
+// #error This error is a reminder that you have not edited miosix_settings.h
+//  yet.
 #endif  // PARSING_FROM_IDE
 
 /**
@@ -70,14 +70,14 @@ namespace miosix
 // Uncomment only *one* of those
 
 #define SCHED_TYPE_PRIORITY
-//#define SCHED_TYPE_CONTROL_BASED
-//#define SCHED_TYPE_EDF
+// #define SCHED_TYPE_CONTROL_BASED
+// #define SCHED_TYPE_EDF
 
 /// \def WITH_CPU_TIME_COUNTER
 /// Allows to enable/disable CPUTimeCounter to save code size and remove its
 /// overhead from the scheduling process. By default it is not defined
 /// (CPUTimeCounter is disabled).
-//#define WITH_CPU_TIME_COUNTER
+// #define WITH_CPU_TIME_COUNTER
 
 //
 // Filesystem options
@@ -110,7 +110,7 @@ const unsigned char MAX_OPEN_FILES = 8;
 /// This enables the dynamic loader to load elf programs, the extended system
 /// call service and, if the hardware supports it, the MPU to provide memory
 /// isolation of processes
-//#define WITH_PROCESSES
+// #define WITH_PROCESSES
 
 #if defined(WITH_PROCESSES) && defined(__NO_EXCEPTIONS)
 #error Processes require C++ exception support
@@ -145,7 +145,7 @@ const unsigned char MAX_OPEN_FILES = 8;
 /// \def WITH_DEEP_SLEEP
 /// Adds interfaces and required variables to support deep sleep state switch
 /// automatically when peripherals are not required
-//#define WITH_DEEP_SLEEP
+// #define WITH_DEEP_SLEEP
 
 /**
  * \def JTAG_DISABLE_SLEEP
diff --git a/src/bsps/stm32f429zi_death_stack_v3/interfaces-impl/bsp.cpp b/src/bsps/stm32f429zi_death_stack_v3/interfaces-impl/bsp.cpp
index 94f8eee9ba433c2ae5435d36e62f6875752b25f1..4b7e269feaed9eca630cb7a71f9f53c09cd36080 100644
--- a/src/bsps/stm32f429zi_death_stack_v3/interfaces-impl/bsp.cpp
+++ b/src/bsps/stm32f429zi_death_stack_v3/interfaces-impl/bsp.cpp
@@ -338,65 +338,65 @@ void IRQbspInit()
 
     RCC_SYNC();
 
-    interfaces::spi1::sck::mode(Mode::ALTERNATE);
     interfaces::spi1::sck::alternateFunction(5);
-    interfaces::spi1::miso::mode(Mode::ALTERNATE);
+    interfaces::spi1::sck::mode(Mode::ALTERNATE);
     interfaces::spi1::miso::alternateFunction(5);
-    interfaces::spi1::mosi::mode(Mode::ALTERNATE);
+    interfaces::spi1::miso::mode(Mode::ALTERNATE);
     interfaces::spi1::mosi::alternateFunction(5);
+    interfaces::spi1::mosi::mode(Mode::ALTERNATE);
 
-    interfaces::spi2::sck::mode(Mode::ALTERNATE);
     interfaces::spi2::sck::alternateFunction(5);
-    interfaces::spi2::miso::mode(Mode::ALTERNATE);
+    interfaces::spi2::sck::mode(Mode::ALTERNATE);
     interfaces::spi2::miso::alternateFunction(5);
-    interfaces::spi2::mosi::mode(Mode::ALTERNATE);
+    interfaces::spi2::miso::mode(Mode::ALTERNATE);
     interfaces::spi2::mosi::alternateFunction(5);
+    interfaces::spi2::mosi::mode(Mode::ALTERNATE);
 
-    interfaces::spi4::sck::mode(Mode::ALTERNATE);
     interfaces::spi4::sck::alternateFunction(5);
-    interfaces::spi4::miso::mode(Mode::ALTERNATE);
+    interfaces::spi4::sck::mode(Mode::ALTERNATE);
     interfaces::spi4::miso::alternateFunction(5);
-    interfaces::spi4::mosi::mode(Mode::ALTERNATE);
+    interfaces::spi4::miso::mode(Mode::ALTERNATE);
     interfaces::spi4::mosi::alternateFunction(5);
+    interfaces::spi4::mosi::mode(Mode::ALTERNATE);
 
-    interfaces::spi5::sck::mode(Mode::ALTERNATE);
     interfaces::spi5::sck::alternateFunction(5);
-    interfaces::spi5::miso::mode(Mode::ALTERNATE);
+    interfaces::spi5::sck::mode(Mode::ALTERNATE);
     interfaces::spi5::miso::alternateFunction(5);
-    interfaces::spi5::mosi::mode(Mode::ALTERNATE);
+    interfaces::spi5::miso::mode(Mode::ALTERNATE);
     interfaces::spi5::mosi::alternateFunction(5);
+    interfaces::spi5::mosi::mode(Mode::ALTERNATE);
 
-    interfaces::spi6::sck::mode(Mode::ALTERNATE);
     interfaces::spi6::sck::alternateFunction(5);
-    interfaces::spi6::miso::mode(Mode::ALTERNATE);
+    interfaces::spi6::sck::mode(Mode::ALTERNATE);
     interfaces::spi6::miso::alternateFunction(5);
-    interfaces::spi6::mosi::mode(Mode::ALTERNATE);
+    interfaces::spi6::miso::mode(Mode::ALTERNATE);
     interfaces::spi6::mosi::alternateFunction(5);
+    interfaces::spi6::mosi::mode(Mode::ALTERNATE);
 
-    interfaces::usart1::rx::mode(Mode::ALTERNATE);
     interfaces::usart1::rx::alternateFunction(7);
-    interfaces::usart1::tx::mode(Mode::ALTERNATE);
+    interfaces::usart1::rx::mode(Mode::ALTERNATE);
     interfaces::usart1::tx::alternateFunction(7);
+    interfaces::usart1::tx::mode(Mode::ALTERNATE);
 
-    interfaces::usart2::rx::mode(Mode::ALTERNATE);
     interfaces::usart2::rx::alternateFunction(7);
-    interfaces::usart2::tx::mode(Mode::ALTERNATE);
+    interfaces::usart2::rx::mode(Mode::ALTERNATE);
     interfaces::usart2::tx::alternateFunction(7);
+    interfaces::usart2::tx::mode(Mode::ALTERNATE);
 
-    interfaces::usart3::rx::mode(Mode::ALTERNATE);
     interfaces::usart3::rx::alternateFunction(7);
-    interfaces::usart3::tx::mode(Mode::ALTERNATE);
+    interfaces::usart3::rx::mode(Mode::ALTERNATE);
     interfaces::usart3::tx::alternateFunction(7);
+    interfaces::usart3::tx::mode(Mode::ALTERNATE);
 
-    interfaces::uart4::rx::mode(Mode::ALTERNATE);
     interfaces::uart4::rx::alternateFunction(8);
-    interfaces::uart4::tx::mode(Mode::ALTERNATE);
+    interfaces::uart4::rx::mode(Mode::ALTERNATE);
     interfaces::uart4::tx::alternateFunction(8);
+    interfaces::uart4::tx::mode(Mode::ALTERNATE);
 
-    interfaces::can1::rx::mode(Mode::ALTERNATE);
     interfaces::can1::rx::alternateFunction(9);
-    interfaces::can1::tx::mode(Mode::ALTERNATE);
+    interfaces::can1::rx::mode(Mode::ALTERNATE);
     interfaces::can1::tx::alternateFunction(9);
+    interfaces::can1::tx::mode(Mode::ALTERNATE);
 
     sensors::ads131m04::cs1::mode(Mode::OUTPUT);
     sensors::ads131m04::cs1::high();
@@ -430,8 +430,8 @@ void IRQbspInit()
 
     sensors::launchpad_detach::mode(Mode::INPUT);
 
-    expulsion::servo::mode(Mode::ALTERNATE);
     expulsion::servo::alternateFunction(2);
+    expulsion::servo::mode(Mode::ALTERNATE);
     expulsion::sense::mode(Mode::INPUT_PULL_UP);
     expulsion::nosecone_detach::mode(Mode::INPUT);
 
@@ -441,19 +441,19 @@ void IRQbspInit()
     cutter::enable_backup::low();
     cutter::sense::mode(Mode::INPUT_ANALOG);
 
-    airbrakes::servo::mode(Mode::ALTERNATE);
     airbrakes::servo::alternateFunction(3);
+    airbrakes::servo::mode(Mode::ALTERNATE);
     airbrakes::sensor::mode(Mode::INPUT_ANALOG);
 
     leds::red::mode(Mode::OUTPUT);
     leds::green::mode(Mode::OUTPUT);
     leds::blue::mode(Mode::OUTPUT);
 
-    buzzer::drive::mode(Mode::ALTERNATE);
     buzzer::drive::alternateFunction(3);
+    buzzer::drive::mode(Mode::ALTERNATE);
 
-    aux::servo::mode(Mode::ALTERNATE);
     aux::servo::alternateFunction(3);
+    aux::servo::mode(Mode::ALTERNATE);
     aux::sense_1::mode(Mode::INPUT);
     aux::sense_2::mode(Mode::INPUT);
 
diff --git a/src/bsps/stm32f429zi_nokia/config/miosix_settings.h b/src/bsps/stm32f429zi_nokia/config/miosix_settings.h
index 760430d5c876ece665abec6356665703fbbe03f9..0cecfe04e388e953faf3e2647078ffccc78198fc 100644
--- a/src/bsps/stm32f429zi_nokia/config/miosix_settings.h
+++ b/src/bsps/stm32f429zi_nokia/config/miosix_settings.h
@@ -27,8 +27,8 @@
 // The PARSING_FROM_IDE is because Netbeans gets confused by this, it is never
 // defined when compiling the code.
 #ifndef PARSING_FROM_IDE
-//#error This error is a reminder that you have not edited miosix_settings.h
-// yet.
+// #error This error is a reminder that you have not edited miosix_settings.h
+//  yet.
 #endif  // PARSING_FROM_IDE
 
 /**
@@ -70,14 +70,14 @@ namespace miosix
 // Uncomment only *one* of those
 
 #define SCHED_TYPE_PRIORITY
-//#define SCHED_TYPE_CONTROL_BASED
-//#define SCHED_TYPE_EDF
+// #define SCHED_TYPE_CONTROL_BASED
+// #define SCHED_TYPE_EDF
 
 /// \def WITH_CPU_TIME_COUNTER
 /// Allows to enable/disable CPUTimeCounter to save code size and remove its
 /// overhead from the scheduling process. By default it is not defined
 /// (CPUTimeCounter is disabled).
-//#define WITH_CPU_TIME_COUNTER
+// #define WITH_CPU_TIME_COUNTER
 
 //
 // Filesystem options
@@ -110,7 +110,7 @@ const unsigned char MAX_OPEN_FILES = 8;
 /// This enables the dynamic loader to load elf programs, the extended system
 /// call service and, if the hardware supports it, the MPU to provide memory
 /// isolation of processes
-//#define WITH_PROCESSES
+// #define WITH_PROCESSES
 
 #if defined(WITH_PROCESSES) && defined(__NO_EXCEPTIONS)
 #error Processes require C++ exception support
@@ -145,7 +145,7 @@ const unsigned char MAX_OPEN_FILES = 8;
 /// \def WITH_DEEP_SLEEP
 /// Adds interfaces and required variables to support deep sleep state switch
 /// automatically when peripherals are not required
-//#define WITH_DEEP_SLEEP
+// #define WITH_DEEP_SLEEP
 
 /**
  * \def JTAG_DISABLE_SLEEP
diff --git a/src/bsps/stm32f429zi_nokia/interfaces-impl/bsp.cpp b/src/bsps/stm32f429zi_nokia/interfaces-impl/bsp.cpp
index f79a64ec5a85f845752cb8b2dff3573607c05929..ab9c05cc6c7266f6dd622f8db7bf31a0bc156b6d 100644
--- a/src/bsps/stm32f429zi_nokia/interfaces-impl/bsp.cpp
+++ b/src/bsps/stm32f429zi_nokia/interfaces-impl/bsp.cpp
@@ -201,19 +201,19 @@ void IRQbspInit()
 
     RCC_SYNC();
 
-    interfaces::spi1::sck::mode(Mode::ALTERNATE);
     interfaces::spi1::sck::alternateFunction(5);
-    interfaces::spi1::miso::mode(Mode::ALTERNATE);
+    interfaces::spi1::sck::mode(Mode::ALTERNATE);
     interfaces::spi1::miso::alternateFunction(5);
-    interfaces::spi1::mosi::mode(Mode::ALTERNATE);
+    interfaces::spi1::miso::mode(Mode::ALTERNATE);
     interfaces::spi1::mosi::alternateFunction(5);
+    interfaces::spi1::mosi::mode(Mode::ALTERNATE);
 
-    interfaces::spi4::sck::mode(Mode::ALTERNATE);
     interfaces::spi4::sck::alternateFunction(5);
-    interfaces::spi4::miso::mode(Mode::ALTERNATE);
+    interfaces::spi4::sck::mode(Mode::ALTERNATE);
     interfaces::spi4::miso::alternateFunction(5);
-    interfaces::spi4::mosi::mode(Mode::ALTERNATE);
+    interfaces::spi4::miso::mode(Mode::ALTERNATE);
     interfaces::spi4::mosi::alternateFunction(5);
+    interfaces::spi4::mosi::mode(Mode::ALTERNATE);
 
     peripherals::ra01::pc13::cs::mode(Mode::OUTPUT);
     peripherals::ra01::pc13::dio0::mode(Mode::INPUT);
diff --git a/src/bsps/stm32f429zi_parafoil/config/miosix_settings.h b/src/bsps/stm32f429zi_parafoil/config/miosix_settings.h
index aaee8b547e5996e93ae14c79aa38ea091cab45e6..5e46fc07ae64763ab77e94d351d0452b92fae3aa 100644
--- a/src/bsps/stm32f429zi_parafoil/config/miosix_settings.h
+++ b/src/bsps/stm32f429zi_parafoil/config/miosix_settings.h
@@ -27,8 +27,8 @@
 // The PARSING_FROM_IDE is because Netbeans gets confused by this, it is never
 // defined when compiling the code.
 #ifndef PARSING_FROM_IDE
-//#error This error is a reminder that you have not edited miosix_settings.h
-// yet.
+// #error This error is a reminder that you have not edited miosix_settings.h
+//  yet.
 #endif  // PARSING_FROM_IDE
 
 /**
@@ -70,14 +70,14 @@ namespace miosix
 // Uncomment only *one* of those
 
 #define SCHED_TYPE_PRIORITY
-//#define SCHED_TYPE_CONTROL_BASED
-//#define SCHED_TYPE_EDF
+// #define SCHED_TYPE_CONTROL_BASED
+// #define SCHED_TYPE_EDF
 
 /// \def WITH_CPU_TIME_COUNTER
 /// Allows to enable/disable CPUTimeCounter to save code size and remove its
 /// overhead from the scheduling process. By default it is not defined
 /// (CPUTimeCounter is disabled).
-//#define WITH_CPU_TIME_COUNTER
+// #define WITH_CPU_TIME_COUNTER
 
 //
 // Filesystem options
@@ -110,7 +110,7 @@ const unsigned char MAX_OPEN_FILES = 8;
 /// This enables the dynamic loader to load elf programs, the extended system
 /// call service and, if the hardware supports it, the MPU to provide memory
 /// isolation of processes
-//#define WITH_PROCESSES
+// #define WITH_PROCESSES
 
 #if defined(WITH_PROCESSES) && defined(__NO_EXCEPTIONS)
 #error Processes require C++ exception support
@@ -145,7 +145,7 @@ const unsigned char MAX_OPEN_FILES = 8;
 /// \def WITH_DEEP_SLEEP
 /// Adds interfaces and required variables to support deep sleep state switch
 /// automatically when peripherals are not required
-//#define WITH_DEEP_SLEEP
+// #define WITH_DEEP_SLEEP
 
 /**
  * \def JTAG_DISABLE_SLEEP
diff --git a/src/bsps/stm32f429zi_parafoil/interfaces-impl/bsp.cpp b/src/bsps/stm32f429zi_parafoil/interfaces-impl/bsp.cpp
index 12077a4c421fece90f52f9465fbeaf4f35e6d841..f4304b85ac1b8d38c42e7fb941dd75b0bcdc9527 100644
--- a/src/bsps/stm32f429zi_parafoil/interfaces-impl/bsp.cpp
+++ b/src/bsps/stm32f429zi_parafoil/interfaces-impl/bsp.cpp
@@ -211,34 +211,34 @@ void IRQbspInit()
 
     using namespace interfaces;
 
-    spi1::sck::mode(Mode::ALTERNATE);
     spi1::sck::alternateFunction(5);
-    spi1::miso::mode(Mode::ALTERNATE);
+    spi1::sck::mode(Mode::ALTERNATE);
     spi1::miso::alternateFunction(5);
-    spi1::mosi::mode(Mode::ALTERNATE);
+    spi1::miso::mode(Mode::ALTERNATE);
     spi1::mosi::alternateFunction(5);
+    spi1::mosi::mode(Mode::ALTERNATE);
 
-    spi4::sck::mode(Mode::ALTERNATE);
     spi4::sck::alternateFunction(5);
-    spi4::miso::mode(Mode::ALTERNATE);
+    spi4::sck::mode(Mode::ALTERNATE);
     spi4::miso::alternateFunction(5);
-    spi4::mosi::mode(Mode::ALTERNATE);
+    spi4::miso::mode(Mode::ALTERNATE);
     spi4::mosi::alternateFunction(5);
+    spi4::mosi::mode(Mode::ALTERNATE);
 
-    uart1::rx::mode(Mode::ALTERNATE);
     uart1::rx::alternateFunction(7);
-    uart1::tx::mode(Mode::ALTERNATE);
+    uart1::rx::mode(Mode::ALTERNATE);
     uart1::tx::alternateFunction(7);
+    uart1::tx::mode(Mode::ALTERNATE);
 
-    uart2::rx::mode(Mode::ALTERNATE);
     uart2::rx::alternateFunction(7);
-    uart2::tx::mode(Mode::ALTERNATE);
+    uart2::rx::mode(Mode::ALTERNATE);
     uart2::tx::alternateFunction(7);
+    uart2::tx::mode(Mode::ALTERNATE);
 
-    timers::tim4ch2::mode(Mode::ALTERNATE);
     timers::tim4ch2::alternateFunction(2);
-    timers::tim10ch1::mode(Mode::ALTERNATE);
+    timers::tim4ch2::mode(Mode::ALTERNATE);
     timers::tim10ch1::alternateFunction(3);
+    timers::tim10ch1::mode(Mode::ALTERNATE);
 
     using namespace sensors;
 
diff --git a/src/bsps/stm32f429zi_pyxis_auxiliary/config/miosix_settings.h b/src/bsps/stm32f429zi_pyxis_auxiliary/config/miosix_settings.h
index aaee8b547e5996e93ae14c79aa38ea091cab45e6..5e46fc07ae64763ab77e94d351d0452b92fae3aa 100644
--- a/src/bsps/stm32f429zi_pyxis_auxiliary/config/miosix_settings.h
+++ b/src/bsps/stm32f429zi_pyxis_auxiliary/config/miosix_settings.h
@@ -27,8 +27,8 @@
 // The PARSING_FROM_IDE is because Netbeans gets confused by this, it is never
 // defined when compiling the code.
 #ifndef PARSING_FROM_IDE
-//#error This error is a reminder that you have not edited miosix_settings.h
-// yet.
+// #error This error is a reminder that you have not edited miosix_settings.h
+//  yet.
 #endif  // PARSING_FROM_IDE
 
 /**
@@ -70,14 +70,14 @@ namespace miosix
 // Uncomment only *one* of those
 
 #define SCHED_TYPE_PRIORITY
-//#define SCHED_TYPE_CONTROL_BASED
-//#define SCHED_TYPE_EDF
+// #define SCHED_TYPE_CONTROL_BASED
+// #define SCHED_TYPE_EDF
 
 /// \def WITH_CPU_TIME_COUNTER
 /// Allows to enable/disable CPUTimeCounter to save code size and remove its
 /// overhead from the scheduling process. By default it is not defined
 /// (CPUTimeCounter is disabled).
-//#define WITH_CPU_TIME_COUNTER
+// #define WITH_CPU_TIME_COUNTER
 
 //
 // Filesystem options
@@ -110,7 +110,7 @@ const unsigned char MAX_OPEN_FILES = 8;
 /// This enables the dynamic loader to load elf programs, the extended system
 /// call service and, if the hardware supports it, the MPU to provide memory
 /// isolation of processes
-//#define WITH_PROCESSES
+// #define WITH_PROCESSES
 
 #if defined(WITH_PROCESSES) && defined(__NO_EXCEPTIONS)
 #error Processes require C++ exception support
@@ -145,7 +145,7 @@ const unsigned char MAX_OPEN_FILES = 8;
 /// \def WITH_DEEP_SLEEP
 /// Adds interfaces and required variables to support deep sleep state switch
 /// automatically when peripherals are not required
-//#define WITH_DEEP_SLEEP
+// #define WITH_DEEP_SLEEP
 
 /**
  * \def JTAG_DISABLE_SLEEP
diff --git a/src/bsps/stm32f429zi_pyxis_auxiliary/interfaces-impl/bsp.cpp b/src/bsps/stm32f429zi_pyxis_auxiliary/interfaces-impl/bsp.cpp
index 025840ce89f9f7191dd87089599acb4556eeb325..8a9efa1a4c34a780b73569d5dc0c544077d7568b 100644
--- a/src/bsps/stm32f429zi_pyxis_auxiliary/interfaces-impl/bsp.cpp
+++ b/src/bsps/stm32f429zi_pyxis_auxiliary/interfaces-impl/bsp.cpp
@@ -62,29 +62,29 @@ void IRQbspInit()
 
     using namespace interfaces;
 
-    debug::rx::mode(Mode::ALTERNATE);
     debug::rx::alternateFunction(8);
-    debug::tx::mode(Mode::ALTERNATE);
+    debug::rx::mode(Mode::ALTERNATE);
     debug::tx::alternateFunction(8);
+    debug::tx::mode(Mode::ALTERNATE);
 
-    cam1::rx::mode(Mode::ALTERNATE);
     cam1::rx::alternateFunction(7);
-    cam1::tx::mode(Mode::ALTERNATE);
+    cam1::rx::mode(Mode::ALTERNATE);
     cam1::tx::alternateFunction(7);
+    cam1::tx::mode(Mode::ALTERNATE);
 
-    cam2::tx::mode(Mode::ALTERNATE);
     cam2::tx::alternateFunction(8);
+    cam2::tx::mode(Mode::ALTERNATE);
 
-    cam3::tx::mode(Mode::ALTERNATE);
     cam3::tx::alternateFunction(8);
+    cam3::tx::mode(Mode::ALTERNATE);
 
     camMosfet::mode(Mode::OUTPUT);
     camMosfet::low();
 
-    can1::rx::mode(Mode::ALTERNATE);
     can1::rx::alternateFunction(9);
-    can1::tx::mode(Mode::ALTERNATE);
+    can1::rx::mode(Mode::ALTERNATE);
     can1::tx::alternateFunction(9);
+    can1::tx::mode(Mode::ALTERNATE);
 
     using namespace leds;
 
diff --git a/src/bsps/stm32f429zi_rig/config/miosix_settings.h b/src/bsps/stm32f429zi_rig/config/miosix_settings.h
index 5bb339e02447493b119574e5027f4970721d88bf..fb5d771285246a5b7cfd087bd8bb4b522d06967a 100644
--- a/src/bsps/stm32f429zi_rig/config/miosix_settings.h
+++ b/src/bsps/stm32f429zi_rig/config/miosix_settings.h
@@ -27,8 +27,8 @@
 // The PARSING_FROM_IDE is because Netbeans gets confused by this, it is never
 // defined when compiling the code.
 #ifndef PARSING_FROM_IDE
-//#error This error is a reminder that you have not edited miosix_settings.h
-// yet.
+// #error This error is a reminder that you have not edited miosix_settings.h
+//  yet.
 #endif  // PARSING_FROM_IDE
 
 /**
@@ -70,14 +70,14 @@ namespace miosix
 // Uncomment only *one* of those
 
 #define SCHED_TYPE_PRIORITY
-//#define SCHED_TYPE_CONTROL_BASED
-//#define SCHED_TYPE_EDF
+// #define SCHED_TYPE_CONTROL_BASED
+// #define SCHED_TYPE_EDF
 
 /// \def WITH_CPU_TIME_COUNTER
 /// Allows to enable/disable CPUTimeCounter to save code size and remove its
 /// overhead from the scheduling process. By default it is not defined
 /// (CPUTimeCounter is disabled).
-//#define WITH_CPU_TIME_COUNTER
+// #define WITH_CPU_TIME_COUNTER
 
 //
 // Filesystem options
@@ -110,7 +110,7 @@ const unsigned char MAX_OPEN_FILES = 8;
 /// This enables the dynamic loader to load elf programs, the extended system
 /// call service and, if the hardware supports it, the MPU to provide memory
 /// isolation of processes
-//#define WITH_PROCESSES
+// #define WITH_PROCESSES
 
 #if defined(WITH_PROCESSES) && defined(__NO_EXCEPTIONS)
 #error Processes require C++ exception support
@@ -145,7 +145,7 @@ const unsigned char MAX_OPEN_FILES = 8;
 /// \def WITH_DEEP_SLEEP
 /// Adds interfaces and required variables to support deep sleep state switch
 /// automatically when peripherals are not required
-//#define WITH_DEEP_SLEEP
+// #define WITH_DEEP_SLEEP
 
 /**
  * \def JTAG_DISABLE_SLEEP
diff --git a/src/bsps/stm32f429zi_rig/interfaces-impl/bsp.cpp b/src/bsps/stm32f429zi_rig/interfaces-impl/bsp.cpp
index 2caef6f014c57c8eb40402bd6abb7340fae5d23b..42bd1607aa18eead9f5876fbda7a0283c0c2a2ad 100644
--- a/src/bsps/stm32f429zi_rig/interfaces-impl/bsp.cpp
+++ b/src/bsps/stm32f429zi_rig/interfaces-impl/bsp.cpp
@@ -214,56 +214,50 @@ void IRQbspInit()
 
     using namespace interfaces;
 
-    spi1::sck::mode(Mode::ALTERNATE);
     spi1::sck::alternateFunction(5);
-    spi1::miso::mode(Mode::ALTERNATE);
+    spi1::sck::mode(Mode::ALTERNATE);
     spi1::miso::alternateFunction(5);
-    spi1::mosi::mode(Mode::ALTERNATE);
+    spi1::miso::mode(Mode::ALTERNATE);
     spi1::mosi::alternateFunction(5);
+    spi1::mosi::mode(Mode::ALTERNATE);
 
-    spi2::sck::mode(Mode::ALTERNATE);
     spi2::sck::alternateFunction(5);
-    spi2::miso::mode(Mode::ALTERNATE);
+    spi2::sck::mode(Mode::ALTERNATE);
     spi2::miso::alternateFunction(5);
-    spi2::mosi::mode(Mode::ALTERNATE);
+    spi2::miso::mode(Mode::ALTERNATE);
     spi2::mosi::alternateFunction(5);
+    spi2::mosi::mode(Mode::ALTERNATE);
 
-    spi4::sck::mode(Mode::ALTERNATE);
     spi4::sck::alternateFunction(5);
-    spi4::miso::mode(Mode::ALTERNATE);
+    spi4::sck::mode(Mode::ALTERNATE);
     spi4::miso::alternateFunction(5);
-    spi4::mosi::mode(Mode::ALTERNATE);
+    spi4::miso::mode(Mode::ALTERNATE);
     spi4::mosi::alternateFunction(5);
+    spi4::mosi::mode(Mode::ALTERNATE);
 
-    spi5::sck::mode(Mode::ALTERNATE);
     spi5::sck::alternateFunction(5);
-    spi5::miso::mode(Mode::ALTERNATE);
+    spi5::sck::mode(Mode::ALTERNATE);
     spi5::miso::alternateFunction(5);
-    spi5::mosi::mode(Mode::ALTERNATE);
+    spi5::miso::mode(Mode::ALTERNATE);
     spi5::mosi::alternateFunction(5);
+    spi5::mosi::mode(Mode::ALTERNATE);
 
-    spi6::sck::mode(Mode::ALTERNATE);
     spi6::sck::alternateFunction(5);
-    spi6::miso::mode(Mode::ALTERNATE);
+    spi6::sck::mode(Mode::ALTERNATE);
     spi6::miso::alternateFunction(5);
-    spi6::mosi::mode(Mode::ALTERNATE);
+    spi6::miso::mode(Mode::ALTERNATE);
     spi6::mosi::alternateFunction(5);
+    spi6::mosi::mode(Mode::ALTERNATE);
 
-    uart1::rx::mode(Mode::ALTERNATE);
     uart1::rx::alternateFunction(7);
-    uart1::tx::mode(Mode::ALTERNATE);
+    uart1::rx::mode(Mode::ALTERNATE);
     uart1::tx::alternateFunction(7);
+    uart1::tx::mode(Mode::ALTERNATE);
 
-    can1::rx::mode(Mode::ALTERNATE);
     can1::rx::alternateFunction(9);
-    can1::tx::mode(Mode::ALTERNATE);
+    can1::rx::mode(Mode::ALTERNATE);
     can1::tx::alternateFunction(9);
-
-    timers::tim4ch2::mode(Mode::ALTERNATE);
-    timers::tim11ch1::mode(Mode::ALTERNATE);
-    timers::tim3ch1::mode(Mode::ALTERNATE);
-    timers::tim10ch1::mode(Mode::ALTERNATE);
-    timers::tim8ch1::mode(Mode::ALTERNATE);
+    can1::tx::mode(Mode::ALTERNATE);
 
     timers::tim4ch2::alternateFunction(2);
     timers::tim11ch1::alternateFunction(3);
@@ -271,6 +265,12 @@ void IRQbspInit()
     timers::tim10ch1::alternateFunction(3);
     timers::tim8ch1::alternateFunction(3);
 
+    timers::tim4ch2::mode(Mode::ALTERNATE);
+    timers::tim11ch1::mode(Mode::ALTERNATE);
+    timers::tim3ch1::mode(Mode::ALTERNATE);
+    timers::tim10ch1::mode(Mode::ALTERNATE);
+    timers::tim8ch1::mode(Mode::ALTERNATE);
+
     using namespace sensors;
     ADS131_1::cs::mode(Mode::OUTPUT);
     ADS131_1::cs::high();
diff --git a/src/bsps/stm32f756zg_nucleo/config/miosix_settings.h b/src/bsps/stm32f756zg_nucleo/config/miosix_settings.h
index 924bbc52a40b6a327ce1f3fd61337a017ce87d71..7d337090043e2aa3e40e0fff7fb8b1aaa845b5dd 100644
--- a/src/bsps/stm32f756zg_nucleo/config/miosix_settings.h
+++ b/src/bsps/stm32f756zg_nucleo/config/miosix_settings.h
@@ -27,8 +27,8 @@
 // The PARSING_FROM_IDE is because Netbeans gets confused by this, it is never
 // defined when compiling the code.
 #ifndef PARSING_FROM_IDE
-//#error This error is a reminder that you have not edited miosix_settings.h
-// yet.
+// #error This error is a reminder that you have not edited miosix_settings.h
+//  yet.
 #endif  // PARSING_FROM_IDE
 
 /**
@@ -70,14 +70,14 @@ namespace miosix
 // Uncomment only *one* of those
 
 #define SCHED_TYPE_PRIORITY
-//#define SCHED_TYPE_CONTROL_BASED
-//#define SCHED_TYPE_EDF
+// #define SCHED_TYPE_CONTROL_BASED
+// #define SCHED_TYPE_EDF
 
 /// \def WITH_CPU_TIME_COUNTER
 /// Allows to enable/disable CPUTimeCounter to save code size and remove its
 /// overhead from the scheduling process. By default it is not defined
 /// (CPUTimeCounter is disabled).
-//#define WITH_CPU_TIME_COUNTER
+// #define WITH_CPU_TIME_COUNTER
 
 //
 // Filesystem options
@@ -110,7 +110,7 @@ const unsigned char MAX_OPEN_FILES = 8;
 /// This enables the dynamic loader to load elf programs, the extended system
 /// call service and, if the hardware supports it, the MPU to provide memory
 /// isolation of processes
-//#define WITH_PROCESSES
+// #define WITH_PROCESSES
 
 #if defined(WITH_PROCESSES) && defined(__NO_EXCEPTIONS)
 #error Processes require C++ exception support
@@ -145,7 +145,7 @@ const unsigned char MAX_OPEN_FILES = 8;
 /// \def WITH_DEEP_SLEEP
 /// Adds interfaces and required variables to support deep sleep state switch
 /// automatically when peripherals are not required
-//#define WITH_DEEP_SLEEP
+// #define WITH_DEEP_SLEEP
 
 /**
  * \def JTAG_DISABLE_SLEEP
diff --git a/src/bsps/stm32f756zg_nucleo/interfaces-impl/bsp.cpp b/src/bsps/stm32f756zg_nucleo/interfaces-impl/bsp.cpp
index 2cc3d8230ed05540f7b075e2d178a9e6293534ab..51d37fbedc1f0f635db200e9e5a5f7fb14878a2c 100644
--- a/src/bsps/stm32f756zg_nucleo/interfaces-impl/bsp.cpp
+++ b/src/bsps/stm32f756zg_nucleo/interfaces-impl/bsp.cpp
@@ -77,10 +77,12 @@ void IRQbspInit()
     ledOn();
     delayMs(100);
     ledOff();
-    auto tx = Gpio<GPIOD_BASE, 8>::getPin();
+
     tx.alternateFunction(7);
-    auto rx = Gpio<GPIOD_BASE, 9>::getPin();
+    auto tx = Gpio<GPIOD_BASE, 8>::getPin();
     rx.alternateFunction(7);
+    auto rx = Gpio<GPIOD_BASE, 9>::getPin();
+
     DefaultConsole::instance().IRQset(intrusive_ref_ptr<Device>(
         new STM32Serial(3, defaultSerialSpeed, tx, rx)));
 }
diff --git a/src/bsps/stm32f767zi_automated_antennas/config/miosix_settings.h b/src/bsps/stm32f767zi_automated_antennas/config/miosix_settings.h
index 4df5735cec0075381011304085875d00a309d003..eaeb50131823dd9bb2b3b8d66a6c93b5b170acae 100644
--- a/src/bsps/stm32f767zi_automated_antennas/config/miosix_settings.h
+++ b/src/bsps/stm32f767zi_automated_antennas/config/miosix_settings.h
@@ -27,8 +27,8 @@
 // The PARSING_FROM_IDE is because Netbeans gets confused by this, it is never
 // defined when compiling the code.
 #ifndef PARSING_FROM_IDE
-//#error This error is a reminder that you have not edited miosix_settings.h
-// yet.
+// #error This error is a reminder that you have not edited miosix_settings.h
+//  yet.
 #endif  // PARSING_FROM_IDE
 
 /**
@@ -70,14 +70,14 @@ namespace miosix
 // Uncomment only *one* of those
 
 #define SCHED_TYPE_PRIORITY
-//#define SCHED_TYPE_CONTROL_BASED
-//#define SCHED_TYPE_EDF
+// #define SCHED_TYPE_CONTROL_BASED
+// #define SCHED_TYPE_EDF
 
 /// \def WITH_CPU_TIME_COUNTER
 /// Allows to enable/disable CPUTimeCounter to save code size and remove its
 /// overhead from the scheduling process. By default it is not defined
 /// (CPUTimeCounter is disabled).
-//#define WITH_CPU_TIME_COUNTER
+// #define WITH_CPU_TIME_COUNTER
 
 //
 // Filesystem options
@@ -110,7 +110,7 @@ const unsigned char MAX_OPEN_FILES = 8;
 /// This enables the dynamic loader to load elf programs, the extended system
 /// call service and, if the hardware supports it, the MPU to provide memory
 /// isolation of processes
-//#define WITH_PROCESSES
+// #define WITH_PROCESSES
 
 #if defined(WITH_PROCESSES) && defined(__NO_EXCEPTIONS)
 #error Processes require C++ exception support
@@ -145,7 +145,7 @@ const unsigned char MAX_OPEN_FILES = 8;
 /// \def WITH_DEEP_SLEEP
 /// Adds interfaces and required variables to support deep sleep state switch
 /// automatically when peripherals are not required
-//#define WITH_DEEP_SLEEP
+// #define WITH_DEEP_SLEEP
 
 /**
  * \def JTAG_DISABLE_SLEEP
diff --git a/src/bsps/stm32f767zi_automated_antennas/interfaces-impl/bsp.cpp b/src/bsps/stm32f767zi_automated_antennas/interfaces-impl/bsp.cpp
index 0853b1f8b51a361f67f78683477d2e28fb622b28..c9fb4d970a732f717b830a0aaa617226c35a6584 100644
--- a/src/bsps/stm32f767zi_automated_antennas/interfaces-impl/bsp.cpp
+++ b/src/bsps/stm32f767zi_automated_antennas/interfaces-impl/bsp.cpp
@@ -232,41 +232,41 @@ void IRQbspInit()
     userSwitch::mode(Mode::INPUT);
 
     using namespace interfaces;
-    spi1::sck::mode(Mode::ALTERNATE);
     spi1::sck::alternateFunction(5);
-    spi1::miso::mode(Mode::ALTERNATE);
+    spi1::sck::mode(Mode::ALTERNATE);
     spi1::miso::alternateFunction(5);
-    spi1::mosi::mode(Mode::ALTERNATE);
+    spi1::miso::mode(Mode::ALTERNATE);
     spi1::mosi::alternateFunction(5);
+    spi1::mosi::mode(Mode::ALTERNATE);
 
-    spi3::sck::mode(Mode::ALTERNATE);
     spi3::sck::alternateFunction(6);
-    spi3::miso::mode(Mode::ALTERNATE);
+    spi3::sck::mode(Mode::ALTERNATE);
     spi3::miso::alternateFunction(6);
-    spi3::mosi::mode(Mode::ALTERNATE);
+    spi3::miso::mode(Mode::ALTERNATE);
     spi3::mosi::alternateFunction(5);
+    spi3::mosi::mode(Mode::ALTERNATE);
 
-    spi4::sck::mode(Mode::ALTERNATE);
     spi4::sck::alternateFunction(5);
-    spi4::miso::mode(Mode::ALTERNATE);
+    spi4::sck::mode(Mode::ALTERNATE);
     spi4::miso::alternateFunction(5);
-    spi4::mosi::mode(Mode::ALTERNATE);
+    spi4::miso::mode(Mode::ALTERNATE);
     spi4::mosi::alternateFunction(5);
+    spi4::mosi::mode(Mode::ALTERNATE);
 
-    can2::rx::mode(Mode::ALTERNATE);
     can2::rx::alternateFunction(9);
-    can2::tx::mode(Mode::ALTERNATE);
+    can2::rx::mode(Mode::ALTERNATE);
     can2::tx::alternateFunction(9);
+    can2::tx::mode(Mode::ALTERNATE);
 
-    usart1::tx::mode(Mode::ALTERNATE);
     usart1::tx::alternateFunction(7);
-    usart1::rx::mode(Mode::ALTERNATE);
+    usart1::tx::mode(Mode::ALTERNATE);
     usart1::rx::alternateFunction(7);
+    usart1::rx::mode(Mode::ALTERNATE);
 
-    usart2::tx::mode(Mode::ALTERNATE);
     usart2::tx::alternateFunction(7);
-    usart2::rx::mode(Mode::ALTERNATE);
+    usart2::tx::mode(Mode::ALTERNATE);
     usart2::rx::alternateFunction(7);
+    usart2::rx::mode(Mode::ALTERNATE);
 
     using namespace radio;
     cs::mode(Mode::OUTPUT);
@@ -278,10 +278,10 @@ void IRQbspInit()
     rx_enable::mode(Mode::OUTPUT);
 
     using namespace timers;
-    tim3ch2::mode(Mode::ALTERNATE);
     tim3ch2::alternateFunction(2);
-    tim4ch1::mode(Mode::ALTERNATE);
+    tim3ch2::mode(Mode::ALTERNATE);
     tim4ch1::alternateFunction(2);
+    tim4ch1::mode(Mode::ALTERNATE);
 
     stepper1::enable::mode(Mode::OUTPUT);
     stepper1::direction::mode(Mode::OUTPUT);
diff --git a/src/bsps/stm32f767zi_compute_unit/config/miosix_settings.h b/src/bsps/stm32f767zi_compute_unit/config/miosix_settings.h
index 64b0670cab5f4cdfc3d8e06db7cc06e913deae15..1d02b120519dfa4a8fec6705418221cf4ee433c2 100644
--- a/src/bsps/stm32f767zi_compute_unit/config/miosix_settings.h
+++ b/src/bsps/stm32f767zi_compute_unit/config/miosix_settings.h
@@ -27,8 +27,8 @@
 // The PARSING_FROM_IDE is because Netbeans gets confused by this, it is never
 // defined when compiling the code.
 #ifndef PARSING_FROM_IDE
-//#error This error is a reminder that you have not edited miosix_settings.h
-// yet.
+// #error This error is a reminder that you have not edited miosix_settings.h
+//  yet.
 #endif  // PARSING_FROM_IDE
 
 /**
@@ -70,14 +70,14 @@ namespace miosix
 // Uncomment only *one* of those
 
 #define SCHED_TYPE_PRIORITY
-//#define SCHED_TYPE_CONTROL_BASED
-//#define SCHED_TYPE_EDF
+// #define SCHED_TYPE_CONTROL_BASED
+// #define SCHED_TYPE_EDF
 
 /// \def WITH_CPU_TIME_COUNTER
 /// Allows to enable/disable CPUTimeCounter to save code size and remove its
 /// overhead from the scheduling process. By default it is not defined
 /// (CPUTimeCounter is disabled).
-//#define WITH_CPU_TIME_COUNTER
+// #define WITH_CPU_TIME_COUNTER
 
 //
 // Filesystem options
@@ -110,7 +110,7 @@ const unsigned char MAX_OPEN_FILES = 8;
 /// This enables the dynamic loader to load elf programs, the extended system
 /// call service and, if the hardware supports it, the MPU to provide memory
 /// isolation of processes
-//#define WITH_PROCESSES
+// #define WITH_PROCESSES
 
 #if defined(WITH_PROCESSES) && defined(__NO_EXCEPTIONS)
 #error Processes require C++ exception support
@@ -145,7 +145,7 @@ const unsigned char MAX_OPEN_FILES = 8;
 /// \def WITH_DEEP_SLEEP
 /// Adds interfaces and required variables to support deep sleep state switch
 /// automatically when peripherals are not required
-//#define WITH_DEEP_SLEEP
+// #define WITH_DEEP_SLEEP
 
 /**
  * \def JTAG_DISABLE_SLEEP
diff --git a/src/bsps/stm32f767zi_compute_unit_v2/config/miosix_settings.h b/src/bsps/stm32f767zi_compute_unit_v2/config/miosix_settings.h
index 64b0670cab5f4cdfc3d8e06db7cc06e913deae15..1d02b120519dfa4a8fec6705418221cf4ee433c2 100644
--- a/src/bsps/stm32f767zi_compute_unit_v2/config/miosix_settings.h
+++ b/src/bsps/stm32f767zi_compute_unit_v2/config/miosix_settings.h
@@ -27,8 +27,8 @@
 // The PARSING_FROM_IDE is because Netbeans gets confused by this, it is never
 // defined when compiling the code.
 #ifndef PARSING_FROM_IDE
-//#error This error is a reminder that you have not edited miosix_settings.h
-// yet.
+// #error This error is a reminder that you have not edited miosix_settings.h
+//  yet.
 #endif  // PARSING_FROM_IDE
 
 /**
@@ -70,14 +70,14 @@ namespace miosix
 // Uncomment only *one* of those
 
 #define SCHED_TYPE_PRIORITY
-//#define SCHED_TYPE_CONTROL_BASED
-//#define SCHED_TYPE_EDF
+// #define SCHED_TYPE_CONTROL_BASED
+// #define SCHED_TYPE_EDF
 
 /// \def WITH_CPU_TIME_COUNTER
 /// Allows to enable/disable CPUTimeCounter to save code size and remove its
 /// overhead from the scheduling process. By default it is not defined
 /// (CPUTimeCounter is disabled).
-//#define WITH_CPU_TIME_COUNTER
+// #define WITH_CPU_TIME_COUNTER
 
 //
 // Filesystem options
@@ -110,7 +110,7 @@ const unsigned char MAX_OPEN_FILES = 8;
 /// This enables the dynamic loader to load elf programs, the extended system
 /// call service and, if the hardware supports it, the MPU to provide memory
 /// isolation of processes
-//#define WITH_PROCESSES
+// #define WITH_PROCESSES
 
 #if defined(WITH_PROCESSES) && defined(__NO_EXCEPTIONS)
 #error Processes require C++ exception support
@@ -145,7 +145,7 @@ const unsigned char MAX_OPEN_FILES = 8;
 /// \def WITH_DEEP_SLEEP
 /// Adds interfaces and required variables to support deep sleep state switch
 /// automatically when peripherals are not required
-//#define WITH_DEEP_SLEEP
+// #define WITH_DEEP_SLEEP
 
 /**
  * \def JTAG_DISABLE_SLEEP
diff --git a/src/bsps/stm32f767zi_death_stack_v4/config/miosix_settings.h b/src/bsps/stm32f767zi_death_stack_v4/config/miosix_settings.h
index 5bb339e02447493b119574e5027f4970721d88bf..fb5d771285246a5b7cfd087bd8bb4b522d06967a 100644
--- a/src/bsps/stm32f767zi_death_stack_v4/config/miosix_settings.h
+++ b/src/bsps/stm32f767zi_death_stack_v4/config/miosix_settings.h
@@ -27,8 +27,8 @@
 // The PARSING_FROM_IDE is because Netbeans gets confused by this, it is never
 // defined when compiling the code.
 #ifndef PARSING_FROM_IDE
-//#error This error is a reminder that you have not edited miosix_settings.h
-// yet.
+// #error This error is a reminder that you have not edited miosix_settings.h
+//  yet.
 #endif  // PARSING_FROM_IDE
 
 /**
@@ -70,14 +70,14 @@ namespace miosix
 // Uncomment only *one* of those
 
 #define SCHED_TYPE_PRIORITY
-//#define SCHED_TYPE_CONTROL_BASED
-//#define SCHED_TYPE_EDF
+// #define SCHED_TYPE_CONTROL_BASED
+// #define SCHED_TYPE_EDF
 
 /// \def WITH_CPU_TIME_COUNTER
 /// Allows to enable/disable CPUTimeCounter to save code size and remove its
 /// overhead from the scheduling process. By default it is not defined
 /// (CPUTimeCounter is disabled).
-//#define WITH_CPU_TIME_COUNTER
+// #define WITH_CPU_TIME_COUNTER
 
 //
 // Filesystem options
@@ -110,7 +110,7 @@ const unsigned char MAX_OPEN_FILES = 8;
 /// This enables the dynamic loader to load elf programs, the extended system
 /// call service and, if the hardware supports it, the MPU to provide memory
 /// isolation of processes
-//#define WITH_PROCESSES
+// #define WITH_PROCESSES
 
 #if defined(WITH_PROCESSES) && defined(__NO_EXCEPTIONS)
 #error Processes require C++ exception support
@@ -145,7 +145,7 @@ const unsigned char MAX_OPEN_FILES = 8;
 /// \def WITH_DEEP_SLEEP
 /// Adds interfaces and required variables to support deep sleep state switch
 /// automatically when peripherals are not required
-//#define WITH_DEEP_SLEEP
+// #define WITH_DEEP_SLEEP
 
 /**
  * \def JTAG_DISABLE_SLEEP
diff --git a/src/bsps/stm32f767zi_death_stack_v4/interfaces-impl/bsp.cpp b/src/bsps/stm32f767zi_death_stack_v4/interfaces-impl/bsp.cpp
index 557775f4156e8a38caba214bb1acb568e8f2b154..f839dacd5d40bc16b27ad09052176e3e34c94e3e 100644
--- a/src/bsps/stm32f767zi_death_stack_v4/interfaces-impl/bsp.cpp
+++ b/src/bsps/stm32f767zi_death_stack_v4/interfaces-impl/bsp.cpp
@@ -232,73 +232,73 @@ void IRQbspInit()
     userSwitch::mode(Mode::INPUT);
 
     using namespace interfaces;
-    spi1::sck::mode(Mode::ALTERNATE);
     spi1::sck::alternateFunction(5);
-    spi1::miso::mode(Mode::ALTERNATE);
+    spi1::sck::mode(Mode::ALTERNATE);
     spi1::miso::alternateFunction(5);
-    spi1::mosi::mode(Mode::ALTERNATE);
+    spi1::miso::mode(Mode::ALTERNATE);
     spi1::mosi::alternateFunction(5);
+    spi1::mosi::mode(Mode::ALTERNATE);
 
-    spi3::sck::mode(Mode::ALTERNATE);
     spi3::sck::alternateFunction(6);
-    spi3::miso::mode(Mode::ALTERNATE);
+    spi3::sck::mode(Mode::ALTERNATE);
     spi3::miso::alternateFunction(6);
-    spi3::mosi::mode(Mode::ALTERNATE);
+    spi3::miso::mode(Mode::ALTERNATE);
     spi3::mosi::alternateFunction(5);
+    spi3::mosi::mode(Mode::ALTERNATE);
 
-    spi4::sck::mode(Mode::ALTERNATE);
     spi4::sck::alternateFunction(5);
-    spi4::miso::mode(Mode::ALTERNATE);
+    spi4::sck::mode(Mode::ALTERNATE);
     spi4::miso::alternateFunction(5);
-    spi4::mosi::mode(Mode::ALTERNATE);
+    spi4::miso::mode(Mode::ALTERNATE);
     spi4::mosi::alternateFunction(5);
+    spi4::mosi::mode(Mode::ALTERNATE);
 
-    spi6::sck::mode(Mode::ALTERNATE);
     spi6::sck::alternateFunction(5);
-    spi6::miso::mode(Mode::ALTERNATE);
+    spi6::sck::mode(Mode::ALTERNATE);
     spi6::miso::alternateFunction(5);
-    spi6::mosi::mode(Mode::ALTERNATE);
+    spi6::miso::mode(Mode::ALTERNATE);
     spi6::mosi::alternateFunction(5);
+    spi6::mosi::mode(Mode::ALTERNATE);
 
-    i2c1::sda::mode(Mode::ALTERNATE);
     i2c1::sda::alternateFunction(4);
-    i2c1::scl::mode(Mode::ALTERNATE);
+    i2c1::sda::mode(Mode::ALTERNATE);
     i2c1::scl::alternateFunction(4);
+    i2c1::scl::mode(Mode::ALTERNATE);
 
-    can1::rx::mode(Mode::ALTERNATE);
     can1::rx::alternateFunction(9);
-    can1::tx::mode(Mode::ALTERNATE);
+    can1::rx::mode(Mode::ALTERNATE);
     can1::tx::alternateFunction(9);
+    can1::tx::mode(Mode::ALTERNATE);
 
-    can2::rx::mode(Mode::ALTERNATE);
     can2::rx::alternateFunction(9);
-    can2::tx::mode(Mode::ALTERNATE);
+    can2::rx::mode(Mode::ALTERNATE);
     can2::tx::alternateFunction(9);
+    can2::tx::mode(Mode::ALTERNATE);
 
-    usart1::tx::mode(Mode::ALTERNATE);
     usart1::tx::alternateFunction(7);
-    usart1::rx::mode(Mode::ALTERNATE);
+    usart1::tx::mode(Mode::ALTERNATE);
     usart1::rx::alternateFunction(7);
+    usart1::rx::mode(Mode::ALTERNATE);
 
-    usart2::tx::mode(Mode::ALTERNATE);
     usart2::tx::alternateFunction(7);
-    usart2::rx::mode(Mode::ALTERNATE);
+    usart2::tx::mode(Mode::ALTERNATE);
     usart2::rx::alternateFunction(7);
+    usart2::rx::mode(Mode::ALTERNATE);
 
-    uart4::tx::mode(Mode::ALTERNATE);
     uart4::tx::alternateFunction(8);
-    uart4::rx::mode(Mode::ALTERNATE);
+    uart4::tx::mode(Mode::ALTERNATE);
     uart4::rx::alternateFunction(8);
+    uart4::rx::mode(Mode::ALTERNATE);
 
     using namespace timers;
-    tim3ch1::mode(Mode::ALTERNATE);
     tim3ch1::alternateFunction(2);
-    tim3ch2::mode(Mode::ALTERNATE);
+    tim3ch1::mode(Mode::ALTERNATE);
     tim3ch2::alternateFunction(2);
-    tim1ch1::mode(Mode::ALTERNATE);
+    tim3ch2::mode(Mode::ALTERNATE);
     tim1ch1::alternateFunction(1);
-    tim12ch2::mode(Mode::ALTERNATE);
+    tim1ch1::mode(Mode::ALTERNATE);
     tim12ch2::alternateFunction(9);
+    tim12ch2::mode(Mode::ALTERNATE);
 
     using namespace sensors;
     LSM6DSRX::cs::mode(Mode::OUTPUT);
diff --git a/src/bsps/stm32f767zi_gemini_gs/config/miosix_settings.h b/src/bsps/stm32f767zi_gemini_gs/config/miosix_settings.h
index a83f2a517a69131baa3e820b0754ae58a4eb0b0e..cc85def80c2c9796b87bb8ae0cfe037bdcb5f092 100644
--- a/src/bsps/stm32f767zi_gemini_gs/config/miosix_settings.h
+++ b/src/bsps/stm32f767zi_gemini_gs/config/miosix_settings.h
@@ -27,8 +27,8 @@
 // The PARSING_FROM_IDE is because Netbeans gets confused by this, it is never
 // defined when compiling the code.
 #ifndef PARSING_FROM_IDE
-//#error This error is a reminder that you have not edited miosix_settings.h
-// yet.
+// #error This error is a reminder that you have not edited miosix_settings.h
+//  yet.
 #endif  // PARSING_FROM_IDE
 
 /**
@@ -70,14 +70,14 @@ namespace miosix
 // Uncomment only *one* of those
 
 #define SCHED_TYPE_PRIORITY
-//#define SCHED_TYPE_CONTROL_BASED
-//#define SCHED_TYPE_EDF
+// #define SCHED_TYPE_CONTROL_BASED
+// #define SCHED_TYPE_EDF
 
 /// \def WITH_CPU_TIME_COUNTER
 /// Allows to enable/disable CPUTimeCounter to save code size and remove its
 /// overhead from the scheduling process. By default it is not defined
 /// (CPUTimeCounter is disabled).
-//#define WITH_CPU_TIME_COUNTER
+// #define WITH_CPU_TIME_COUNTER
 
 //
 // Filesystem options
@@ -110,7 +110,7 @@ const unsigned char MAX_OPEN_FILES = 8;
 /// This enables the dynamic loader to load elf programs, the extended system
 /// call service and, if the hardware supports it, the MPU to provide memory
 /// isolation of processes
-//#define WITH_PROCESSES
+// #define WITH_PROCESSES
 
 #if defined(WITH_PROCESSES) && defined(__NO_EXCEPTIONS)
 #error Processes require C++ exception support
@@ -145,7 +145,7 @@ const unsigned char MAX_OPEN_FILES = 8;
 /// \def WITH_DEEP_SLEEP
 /// Adds interfaces and required variables to support deep sleep state switch
 /// automatically when peripherals are not required
-//#define WITH_DEEP_SLEEP
+// #define WITH_DEEP_SLEEP
 
 /**
  * \def JTAG_DISABLE_SLEEP
diff --git a/src/bsps/stm32f767zi_gemini_gs/interfaces-impl/bsp.cpp b/src/bsps/stm32f767zi_gemini_gs/interfaces-impl/bsp.cpp
index f1b9d7daf7e1ef66a426246697b8eccabdb47589..6737470e3aec6358a71542665212528174328e02 100644
--- a/src/bsps/stm32f767zi_gemini_gs/interfaces-impl/bsp.cpp
+++ b/src/bsps/stm32f767zi_gemini_gs/interfaces-impl/bsp.cpp
@@ -231,26 +231,26 @@ void IRQbspInit()
     userLed4::mode(Mode::OUTPUT);
     userSwitch::mode(Mode::INPUT);
 
-    interfaces::spi1::miso::mode(Mode::ALTERNATE);
     interfaces::spi1::miso::alternateFunction(5);
-    interfaces::spi1::mosi::mode(Mode::ALTERNATE);
+    interfaces::spi1::miso::mode(Mode::ALTERNATE);
     interfaces::spi1::mosi::alternateFunction(5);
-    interfaces::spi1::sck::mode(Mode::ALTERNATE);
+    interfaces::spi1::mosi::mode(Mode::ALTERNATE);
     interfaces::spi1::sck::alternateFunction(5);
+    interfaces::spi1::sck::mode(Mode::ALTERNATE);
 
-    interfaces::spi3::miso::mode(Mode::ALTERNATE);
     interfaces::spi3::miso::alternateFunction(6);
-    interfaces::spi3::mosi::mode(Mode::ALTERNATE);
+    interfaces::spi3::miso::mode(Mode::ALTERNATE);
     interfaces::spi3::mosi::alternateFunction(5);
-    interfaces::spi3::sck::mode(Mode::ALTERNATE);
+    interfaces::spi3::mosi::mode(Mode::ALTERNATE);
     interfaces::spi3::sck::alternateFunction(6);
+    interfaces::spi3::sck::mode(Mode::ALTERNATE);
 
-    interfaces::spi4::miso::mode(Mode::ALTERNATE);
     interfaces::spi4::miso::alternateFunction(5);
-    interfaces::spi4::mosi::mode(Mode::ALTERNATE);
+    interfaces::spi4::miso::mode(Mode::ALTERNATE);
     interfaces::spi4::mosi::alternateFunction(5);
-    interfaces::spi4::sck::mode(Mode::ALTERNATE);
+    interfaces::spi4::mosi::mode(Mode::ALTERNATE);
     interfaces::spi4::sck::alternateFunction(5);
+    interfaces::spi4::sck::mode(Mode::ALTERNATE);
 
     radio1::cs::mode(Mode::OUTPUT);
     radio1::cs::high();
diff --git a/src/bsps/stm32f767zi_gemini_motor/config/miosix_settings.h b/src/bsps/stm32f767zi_gemini_motor/config/miosix_settings.h
index 64b0670cab5f4cdfc3d8e06db7cc06e913deae15..1d02b120519dfa4a8fec6705418221cf4ee433c2 100644
--- a/src/bsps/stm32f767zi_gemini_motor/config/miosix_settings.h
+++ b/src/bsps/stm32f767zi_gemini_motor/config/miosix_settings.h
@@ -27,8 +27,8 @@
 // The PARSING_FROM_IDE is because Netbeans gets confused by this, it is never
 // defined when compiling the code.
 #ifndef PARSING_FROM_IDE
-//#error This error is a reminder that you have not edited miosix_settings.h
-// yet.
+// #error This error is a reminder that you have not edited miosix_settings.h
+//  yet.
 #endif  // PARSING_FROM_IDE
 
 /**
@@ -70,14 +70,14 @@ namespace miosix
 // Uncomment only *one* of those
 
 #define SCHED_TYPE_PRIORITY
-//#define SCHED_TYPE_CONTROL_BASED
-//#define SCHED_TYPE_EDF
+// #define SCHED_TYPE_CONTROL_BASED
+// #define SCHED_TYPE_EDF
 
 /// \def WITH_CPU_TIME_COUNTER
 /// Allows to enable/disable CPUTimeCounter to save code size and remove its
 /// overhead from the scheduling process. By default it is not defined
 /// (CPUTimeCounter is disabled).
-//#define WITH_CPU_TIME_COUNTER
+// #define WITH_CPU_TIME_COUNTER
 
 //
 // Filesystem options
@@ -110,7 +110,7 @@ const unsigned char MAX_OPEN_FILES = 8;
 /// This enables the dynamic loader to load elf programs, the extended system
 /// call service and, if the hardware supports it, the MPU to provide memory
 /// isolation of processes
-//#define WITH_PROCESSES
+// #define WITH_PROCESSES
 
 #if defined(WITH_PROCESSES) && defined(__NO_EXCEPTIONS)
 #error Processes require C++ exception support
@@ -145,7 +145,7 @@ const unsigned char MAX_OPEN_FILES = 8;
 /// \def WITH_DEEP_SLEEP
 /// Adds interfaces and required variables to support deep sleep state switch
 /// automatically when peripherals are not required
-//#define WITH_DEEP_SLEEP
+// #define WITH_DEEP_SLEEP
 
 /**
  * \def JTAG_DISABLE_SLEEP
diff --git a/src/bsps/stm32f767zi_gemini_motor/interfaces-impl/bsp.cpp b/src/bsps/stm32f767zi_gemini_motor/interfaces-impl/bsp.cpp
index 12303cae3b797c729cba634123b21caabee0afb1..aba9222316e1f728577aa45dafe0d85d9b8b0489 100644
--- a/src/bsps/stm32f767zi_gemini_motor/interfaces-impl/bsp.cpp
+++ b/src/bsps/stm32f767zi_gemini_motor/interfaces-impl/bsp.cpp
@@ -224,38 +224,38 @@ void IRQbspInit()
     // Enable USART1 pins port
     RCC->AHB1ENR |= RCC_AHB1ENR_GPIOAEN;
 
-    interfaces::spi1::sck::mode(Mode::ALTERNATE);
     interfaces::spi1::sck::alternateFunction(5);
-    interfaces::spi1::miso::mode(Mode::ALTERNATE);
+    interfaces::spi1::sck::mode(Mode::ALTERNATE);
     interfaces::spi1::miso::alternateFunction(5);
-    interfaces::spi1::mosi::mode(Mode::ALTERNATE);
+    interfaces::spi1::miso::mode(Mode::ALTERNATE);
     interfaces::spi1::mosi::alternateFunction(5);
+    interfaces::spi1::mosi::mode(Mode::ALTERNATE);
 
-    interfaces::spi3::sck::mode(Mode::ALTERNATE);
     interfaces::spi3::sck::alternateFunction(6);
-    interfaces::spi3::miso::mode(Mode::ALTERNATE);
+    interfaces::spi3::sck::mode(Mode::ALTERNATE);
     interfaces::spi3::miso::alternateFunction(6);
-    interfaces::spi3::mosi::mode(Mode::ALTERNATE);
+    interfaces::spi3::miso::mode(Mode::ALTERNATE);
     interfaces::spi3::mosi::alternateFunction(5);
+    interfaces::spi3::mosi::mode(Mode::ALTERNATE);
 
-    interfaces::spi4::sck::mode(Mode::ALTERNATE);
     interfaces::spi4::sck::alternateFunction(5);
-    interfaces::spi4::miso::mode(Mode::ALTERNATE);
+    interfaces::spi4::sck::mode(Mode::ALTERNATE);
     interfaces::spi4::miso::alternateFunction(5);
-    interfaces::spi4::mosi::mode(Mode::ALTERNATE);
+    interfaces::spi4::miso::mode(Mode::ALTERNATE);
     interfaces::spi4::mosi::alternateFunction(5);
+    interfaces::spi4::mosi::mode(Mode::ALTERNATE);
 
     // USART1 configured by the miosix serial driver
 
-    interfaces::usart2::tx::mode(Mode::ALTERNATE);
     interfaces::usart2::tx::alternateFunction(7);
-    interfaces::usart2::rx::mode(Mode::ALTERNATE);
+    interfaces::usart2::tx::mode(Mode::ALTERNATE);
     interfaces::usart2::rx::alternateFunction(7);
+    interfaces::usart2::rx::mode(Mode::ALTERNATE);
 
-    interfaces::can2::tx::mode(Mode::ALTERNATE);
     interfaces::can2::tx::alternateFunction(9);
-    interfaces::can2::rx::mode(Mode::ALTERNATE);
+    interfaces::can2::tx::mode(Mode::ALTERNATE);
     interfaces::can2::rx::alternateFunction(9);
+    interfaces::can2::rx::mode(Mode::ALTERNATE);
 
     peripherals::leds::userLed1::mode(Mode::OUTPUT);
     peripherals::leds::userLed2::mode(Mode::OUTPUT);
@@ -287,10 +287,10 @@ void IRQbspInit()
     peripherals::max31856::cs::mode(Mode::OUTPUT);
     peripherals::max31856::cs::high();
 
-    peripherals::servos::servo1::mode(Mode::ALTERNATE);
     peripherals::servos::servo1::alternateFunction(3);
-    peripherals::servos::servo2::mode(Mode::ALTERNATE);
+    peripherals::servos::servo1::mode(Mode::ALTERNATE);
     peripherals::servos::servo2::alternateFunction(3);
+    peripherals::servos::servo2::mode(Mode::ALTERNATE);
 
     peripherals::tank_level::lvl1::mode(Mode::INPUT);
     peripherals::tank_level::lvl2::mode(Mode::INPUT);
diff --git a/src/bsps/stm32f767zi_lyra_biscotto/config/miosix_settings.h b/src/bsps/stm32f767zi_lyra_biscotto/config/miosix_settings.h
index 64b0670cab5f4cdfc3d8e06db7cc06e913deae15..1d02b120519dfa4a8fec6705418221cf4ee433c2 100644
--- a/src/bsps/stm32f767zi_lyra_biscotto/config/miosix_settings.h
+++ b/src/bsps/stm32f767zi_lyra_biscotto/config/miosix_settings.h
@@ -27,8 +27,8 @@
 // The PARSING_FROM_IDE is because Netbeans gets confused by this, it is never
 // defined when compiling the code.
 #ifndef PARSING_FROM_IDE
-//#error This error is a reminder that you have not edited miosix_settings.h
-// yet.
+// #error This error is a reminder that you have not edited miosix_settings.h
+//  yet.
 #endif  // PARSING_FROM_IDE
 
 /**
@@ -70,14 +70,14 @@ namespace miosix
 // Uncomment only *one* of those
 
 #define SCHED_TYPE_PRIORITY
-//#define SCHED_TYPE_CONTROL_BASED
-//#define SCHED_TYPE_EDF
+// #define SCHED_TYPE_CONTROL_BASED
+// #define SCHED_TYPE_EDF
 
 /// \def WITH_CPU_TIME_COUNTER
 /// Allows to enable/disable CPUTimeCounter to save code size and remove its
 /// overhead from the scheduling process. By default it is not defined
 /// (CPUTimeCounter is disabled).
-//#define WITH_CPU_TIME_COUNTER
+// #define WITH_CPU_TIME_COUNTER
 
 //
 // Filesystem options
@@ -110,7 +110,7 @@ const unsigned char MAX_OPEN_FILES = 8;
 /// This enables the dynamic loader to load elf programs, the extended system
 /// call service and, if the hardware supports it, the MPU to provide memory
 /// isolation of processes
-//#define WITH_PROCESSES
+// #define WITH_PROCESSES
 
 #if defined(WITH_PROCESSES) && defined(__NO_EXCEPTIONS)
 #error Processes require C++ exception support
@@ -145,7 +145,7 @@ const unsigned char MAX_OPEN_FILES = 8;
 /// \def WITH_DEEP_SLEEP
 /// Adds interfaces and required variables to support deep sleep state switch
 /// automatically when peripherals are not required
-//#define WITH_DEEP_SLEEP
+// #define WITH_DEEP_SLEEP
 
 /**
  * \def JTAG_DISABLE_SLEEP
diff --git a/src/bsps/stm32f767zi_lyra_biscotto/interfaces-impl/bsp.cpp b/src/bsps/stm32f767zi_lyra_biscotto/interfaces-impl/bsp.cpp
index 133580cc10b6a8f6e9f92f9d20082a3fe40930ce..2ffa98323ed6fab50c59e9dc46f54c2bceaf4b05 100644
--- a/src/bsps/stm32f767zi_lyra_biscotto/interfaces-impl/bsp.cpp
+++ b/src/bsps/stm32f767zi_lyra_biscotto/interfaces-impl/bsp.cpp
@@ -255,59 +255,59 @@ void IRQbspInit()
     userLed3::mode(Mode::OUTPUT);
     userLed4::mode(Mode::OUTPUT);
 
-    interfaces::spi1::sck::mode(Mode::ALTERNATE);
     interfaces::spi1::sck::alternateFunction(5);
-    interfaces::spi1::miso::mode(Mode::ALTERNATE);
+    interfaces::spi1::sck::mode(Mode::ALTERNATE);
     interfaces::spi1::miso::alternateFunction(5);
-    interfaces::spi1::mosi::mode(Mode::ALTERNATE);
+    interfaces::spi1::miso::mode(Mode::ALTERNATE);
     interfaces::spi1::mosi::alternateFunction(5);
+    interfaces::spi1::mosi::mode(Mode::ALTERNATE);
 
-    interfaces::spi3::sck::mode(Mode::ALTERNATE);
     interfaces::spi3::sck::alternateFunction(6);
-    interfaces::spi3::miso::mode(Mode::ALTERNATE);
+    interfaces::spi3::sck::mode(Mode::ALTERNATE);
     interfaces::spi3::miso::alternateFunction(6);
-    interfaces::spi3::mosi::mode(Mode::ALTERNATE);
+    interfaces::spi3::miso::mode(Mode::ALTERNATE);
     interfaces::spi3::mosi::alternateFunction(5);
+    interfaces::spi3::mosi::mode(Mode::ALTERNATE);
 
-    interfaces::spi4::sck::mode(Mode::ALTERNATE);
     interfaces::spi4::sck::alternateFunction(5);
-    interfaces::spi4::miso::mode(Mode::ALTERNATE);
+    interfaces::spi4::sck::mode(Mode::ALTERNATE);
     interfaces::spi4::miso::alternateFunction(5);
-    interfaces::spi4::mosi::mode(Mode::ALTERNATE);
+    interfaces::spi4::miso::mode(Mode::ALTERNATE);
     interfaces::spi4::mosi::alternateFunction(5);
+    interfaces::spi4::mosi::mode(Mode::ALTERNATE);
 
-    interfaces::spi6::sck::mode(Mode::ALTERNATE);
     interfaces::spi6::sck::alternateFunction(5);
-    interfaces::spi6::miso::mode(Mode::ALTERNATE);
+    interfaces::spi6::sck::mode(Mode::ALTERNATE);
     interfaces::spi6::miso::alternateFunction(5);
-    interfaces::spi6::mosi::mode(Mode::ALTERNATE);
+    interfaces::spi6::miso::mode(Mode::ALTERNATE);
     interfaces::spi6::mosi::alternateFunction(5);
+    interfaces::spi6::mosi::mode(Mode::ALTERNATE);
 
     // We do not need to setup the miosix usart
 
-    interfaces::uart4::tx::mode(Mode::ALTERNATE);
     interfaces::uart4::tx::alternateFunction(8);
-    interfaces::uart4::rx::mode(Mode::ALTERNATE);
+    interfaces::uart4::tx::mode(Mode::ALTERNATE);
     interfaces::uart4::rx::alternateFunction(8);
+    interfaces::uart4::rx::mode(Mode::ALTERNATE);
 
-    interfaces::i2c1::sda::mode(Mode::ALTERNATE);
     interfaces::i2c1::sda::alternateFunction(4);
-    interfaces::i2c1::scl::mode(Mode::ALTERNATE);
+    interfaces::i2c1::sda::mode(Mode::ALTERNATE);
     interfaces::i2c1::scl::alternateFunction(4);
+    interfaces::i2c1::scl::mode(Mode::ALTERNATE);
 
-    interfaces::can1::tx::mode(Mode::ALTERNATE);
     interfaces::can1::tx::alternateFunction(9);
-    interfaces::can1::rx::mode(Mode::ALTERNATE);
+    interfaces::can1::tx::mode(Mode::ALTERNATE);
     interfaces::can1::rx::alternateFunction(9);
+    interfaces::can1::rx::mode(Mode::ALTERNATE);
 
-    interfaces::timers::tim1ch1::mode(Mode::ALTERNATE);
     interfaces::timers::tim1ch1::alternateFunction(1);
-    interfaces::timers::tim3ch1::mode(Mode::ALTERNATE);
+    interfaces::timers::tim1ch1::mode(Mode::ALTERNATE);
     interfaces::timers::tim3ch1::alternateFunction(2);
-    interfaces::timers::tim4ch2::mode(Mode::ALTERNATE);
+    interfaces::timers::tim3ch1::mode(Mode::ALTERNATE);
     interfaces::timers::tim4ch2::alternateFunction(2);
-    interfaces::timers::tim9ch1::mode(Mode::ALTERNATE);
+    interfaces::timers::tim4ch2::mode(Mode::ALTERNATE);
     interfaces::timers::tim9ch1::alternateFunction(3);
+    interfaces::timers::tim9ch1::mode(Mode::ALTERNATE);
 
     interfaces::adcs::adc12in8::mode(Mode::INPUT_ANALOG);
     interfaces::adcs::adc12in9::mode(Mode::INPUT_ANALOG);
diff --git a/src/bsps/stm32f767zi_lyra_gs/config/miosix_settings.h b/src/bsps/stm32f767zi_lyra_gs/config/miosix_settings.h
index 64b0670cab5f4cdfc3d8e06db7cc06e913deae15..1d02b120519dfa4a8fec6705418221cf4ee433c2 100644
--- a/src/bsps/stm32f767zi_lyra_gs/config/miosix_settings.h
+++ b/src/bsps/stm32f767zi_lyra_gs/config/miosix_settings.h
@@ -27,8 +27,8 @@
 // The PARSING_FROM_IDE is because Netbeans gets confused by this, it is never
 // defined when compiling the code.
 #ifndef PARSING_FROM_IDE
-//#error This error is a reminder that you have not edited miosix_settings.h
-// yet.
+// #error This error is a reminder that you have not edited miosix_settings.h
+//  yet.
 #endif  // PARSING_FROM_IDE
 
 /**
@@ -70,14 +70,14 @@ namespace miosix
 // Uncomment only *one* of those
 
 #define SCHED_TYPE_PRIORITY
-//#define SCHED_TYPE_CONTROL_BASED
-//#define SCHED_TYPE_EDF
+// #define SCHED_TYPE_CONTROL_BASED
+// #define SCHED_TYPE_EDF
 
 /// \def WITH_CPU_TIME_COUNTER
 /// Allows to enable/disable CPUTimeCounter to save code size and remove its
 /// overhead from the scheduling process. By default it is not defined
 /// (CPUTimeCounter is disabled).
-//#define WITH_CPU_TIME_COUNTER
+// #define WITH_CPU_TIME_COUNTER
 
 //
 // Filesystem options
@@ -110,7 +110,7 @@ const unsigned char MAX_OPEN_FILES = 8;
 /// This enables the dynamic loader to load elf programs, the extended system
 /// call service and, if the hardware supports it, the MPU to provide memory
 /// isolation of processes
-//#define WITH_PROCESSES
+// #define WITH_PROCESSES
 
 #if defined(WITH_PROCESSES) && defined(__NO_EXCEPTIONS)
 #error Processes require C++ exception support
@@ -145,7 +145,7 @@ const unsigned char MAX_OPEN_FILES = 8;
 /// \def WITH_DEEP_SLEEP
 /// Adds interfaces and required variables to support deep sleep state switch
 /// automatically when peripherals are not required
-//#define WITH_DEEP_SLEEP
+// #define WITH_DEEP_SLEEP
 
 /**
  * \def JTAG_DISABLE_SLEEP
diff --git a/src/bsps/stm32f767zi_lyra_gs/interfaces-impl/bsp.cpp b/src/bsps/stm32f767zi_lyra_gs/interfaces-impl/bsp.cpp
index 85215a2362d81af757bcc88bbf37a4077f071316..753e2dbeb668643f09ad73a8d4a167b348de60bd 100644
--- a/src/bsps/stm32f767zi_lyra_gs/interfaces-impl/bsp.cpp
+++ b/src/bsps/stm32f767zi_lyra_gs/interfaces-impl/bsp.cpp
@@ -243,53 +243,53 @@ void IRQbspInit()
 
     // Setting AF, mode for interfaces
 
-    interfaces::spi1::sck::mode(Mode::ALTERNATE);
     interfaces::spi1::sck::alternateFunction(5);
-    interfaces::spi1::miso::mode(Mode::ALTERNATE);
+    interfaces::spi1::sck::mode(Mode::ALTERNATE);
     interfaces::spi1::miso::alternateFunction(5);
-    interfaces::spi1::mosi::mode(Mode::ALTERNATE);
+    interfaces::spi1::miso::mode(Mode::ALTERNATE);
     interfaces::spi1::mosi::alternateFunction(5);
+    interfaces::spi1::mosi::mode(Mode::ALTERNATE);
 
-    interfaces::spi2::sck::mode(Mode::ALTERNATE);
     interfaces::spi2::sck::alternateFunction(5);
-    interfaces::spi2::miso::mode(Mode::ALTERNATE);
+    interfaces::spi2::sck::mode(Mode::ALTERNATE);
     interfaces::spi2::miso::alternateFunction(5);
-    interfaces::spi2::mosi::mode(Mode::ALTERNATE);
+    interfaces::spi2::miso::mode(Mode::ALTERNATE);
     interfaces::spi2::mosi::alternateFunction(5);
+    interfaces::spi2::mosi::mode(Mode::ALTERNATE);
 
-    interfaces::spi4::sck::mode(Mode::ALTERNATE);
     interfaces::spi4::sck::alternateFunction(5);
-    interfaces::spi4::miso::mode(Mode::ALTERNATE);
+    interfaces::spi4::sck::mode(Mode::ALTERNATE);
     interfaces::spi4::miso::alternateFunction(5);
-    interfaces::spi4::mosi::mode(Mode::ALTERNATE);
+    interfaces::spi4::miso::mode(Mode::ALTERNATE);
     interfaces::spi4::mosi::alternateFunction(5);
+    interfaces::spi4::mosi::mode(Mode::ALTERNATE);
 
     // We do not need to setup the miosix usart
 
-    interfaces::usart2::tx::mode(Mode::ALTERNATE_PULL_UP);
     interfaces::usart2::tx::alternateFunction(7);
-    interfaces::usart2::rx::mode(Mode::ALTERNATE_OD_PULL_UP);
+    interfaces::usart2::tx::mode(Mode::ALTERNATE_PULL_UP);
     interfaces::usart2::rx::alternateFunction(7);
+    interfaces::usart2::rx::mode(Mode::ALTERNATE_OD_PULL_UP);
 
-    interfaces::uart4::tx::mode(Mode::ALTERNATE);
     interfaces::uart4::tx::alternateFunction(8);
-    interfaces::uart4::rx::mode(Mode::ALTERNATE);
+    interfaces::uart4::tx::mode(Mode::ALTERNATE);
     interfaces::uart4::rx::alternateFunction(8);
+    interfaces::uart4::rx::mode(Mode::ALTERNATE);
 
-    interfaces::timers::tim1ch1::mode(Mode::ALTERNATE);
     interfaces::timers::tim1ch1::alternateFunction(1);
-    // interfaces::timers::tim2ch1::mode(Mode::ALTERNATE);
+    interfaces::timers::tim1ch1::mode(Mode::ALTERNATE);
     // interfaces::timers::tim2ch1::alternateFunction(1);
-    // interfaces::timers::tim2ch4::mode(Mode::ALTERNATE);
+    // interfaces::timers::tim2ch1::mode(Mode::ALTERNATE);
     // interfaces::timers::tim2ch4::alternateFunction(1);
-    interfaces::timers::tim3ch2::mode(Mode::ALTERNATE);
+    // interfaces::timers::tim2ch4::mode(Mode::ALTERNATE);
     interfaces::timers::tim3ch2::alternateFunction(2);
-    interfaces::timers::tim4ch1::mode(Mode::ALTERNATE);
+    interfaces::timers::tim3ch2::mode(Mode::ALTERNATE);
     interfaces::timers::tim4ch1::alternateFunction(2);
-    interfaces::timers::tim8ch1::mode(Mode::ALTERNATE);
+    interfaces::timers::tim4ch1::mode(Mode::ALTERNATE);
     interfaces::timers::tim8ch1::alternateFunction(3);
-    // interfaces::timers::tim10ch1::mode(Mode::ALTERNATE);
+    interfaces::timers::tim8ch1::mode(Mode::ALTERNATE);
     // interfaces::timers::tim10ch1::alternateFunction(3);
+    // interfaces::timers::tim10ch1::mode(Mode::ALTERNATE);
 
     commBox::ledTimY1::mode(Mode::OUTPUT);
     commBox::ledTimY1::low();
diff --git a/src/bsps/stm32f767zi_lyra_motor/config/miosix_settings.h b/src/bsps/stm32f767zi_lyra_motor/config/miosix_settings.h
index 64b0670cab5f4cdfc3d8e06db7cc06e913deae15..1d02b120519dfa4a8fec6705418221cf4ee433c2 100644
--- a/src/bsps/stm32f767zi_lyra_motor/config/miosix_settings.h
+++ b/src/bsps/stm32f767zi_lyra_motor/config/miosix_settings.h
@@ -27,8 +27,8 @@
 // The PARSING_FROM_IDE is because Netbeans gets confused by this, it is never
 // defined when compiling the code.
 #ifndef PARSING_FROM_IDE
-//#error This error is a reminder that you have not edited miosix_settings.h
-// yet.
+// #error This error is a reminder that you have not edited miosix_settings.h
+//  yet.
 #endif  // PARSING_FROM_IDE
 
 /**
@@ -70,14 +70,14 @@ namespace miosix
 // Uncomment only *one* of those
 
 #define SCHED_TYPE_PRIORITY
-//#define SCHED_TYPE_CONTROL_BASED
-//#define SCHED_TYPE_EDF
+// #define SCHED_TYPE_CONTROL_BASED
+// #define SCHED_TYPE_EDF
 
 /// \def WITH_CPU_TIME_COUNTER
 /// Allows to enable/disable CPUTimeCounter to save code size and remove its
 /// overhead from the scheduling process. By default it is not defined
 /// (CPUTimeCounter is disabled).
-//#define WITH_CPU_TIME_COUNTER
+// #define WITH_CPU_TIME_COUNTER
 
 //
 // Filesystem options
@@ -110,7 +110,7 @@ const unsigned char MAX_OPEN_FILES = 8;
 /// This enables the dynamic loader to load elf programs, the extended system
 /// call service and, if the hardware supports it, the MPU to provide memory
 /// isolation of processes
-//#define WITH_PROCESSES
+// #define WITH_PROCESSES
 
 #if defined(WITH_PROCESSES) && defined(__NO_EXCEPTIONS)
 #error Processes require C++ exception support
@@ -145,7 +145,7 @@ const unsigned char MAX_OPEN_FILES = 8;
 /// \def WITH_DEEP_SLEEP
 /// Adds interfaces and required variables to support deep sleep state switch
 /// automatically when peripherals are not required
-//#define WITH_DEEP_SLEEP
+// #define WITH_DEEP_SLEEP
 
 /**
  * \def JTAG_DISABLE_SLEEP
diff --git a/src/bsps/stm32f767zi_lyra_motor/interfaces-impl/bsp.cpp b/src/bsps/stm32f767zi_lyra_motor/interfaces-impl/bsp.cpp
index ab59a46672f48e29b9a2a75b387eaf8fcf49c0a4..d7daea5cd5f99805d7152ef799e9c1dbb88f137b 100644
--- a/src/bsps/stm32f767zi_lyra_motor/interfaces-impl/bsp.cpp
+++ b/src/bsps/stm32f767zi_lyra_motor/interfaces-impl/bsp.cpp
@@ -255,43 +255,43 @@ void IRQbspInit()
     userLed3::mode(Mode::OUTPUT);
     userLed4::mode(Mode::OUTPUT);
 
-    interfaces::spi1::sck::mode(Mode::ALTERNATE);
     interfaces::spi1::sck::alternateFunction(5);
-    interfaces::spi1::miso::mode(Mode::ALTERNATE);
+    interfaces::spi1::sck::mode(Mode::ALTERNATE);
     interfaces::spi1::miso::alternateFunction(5);
-    interfaces::spi1::mosi::mode(Mode::ALTERNATE);
+    interfaces::spi1::miso::mode(Mode::ALTERNATE);
     interfaces::spi1::mosi::alternateFunction(5);
+    interfaces::spi1::mosi::mode(Mode::ALTERNATE);
 
-    interfaces::spi3::sck::mode(Mode::ALTERNATE);
     interfaces::spi3::sck::alternateFunction(6);
-    interfaces::spi3::miso::mode(Mode::ALTERNATE);
+    interfaces::spi3::sck::mode(Mode::ALTERNATE);
     interfaces::spi3::miso::alternateFunction(6);
-    interfaces::spi3::mosi::mode(Mode::ALTERNATE);
+    interfaces::spi3::miso::mode(Mode::ALTERNATE);
     interfaces::spi3::mosi::alternateFunction(5);
+    interfaces::spi3::mosi::mode(Mode::ALTERNATE);
 
-    interfaces::spi4::sck::mode(Mode::ALTERNATE);
     interfaces::spi4::sck::alternateFunction(5);
-    interfaces::spi4::miso::mode(Mode::ALTERNATE);
+    interfaces::spi4::sck::mode(Mode::ALTERNATE);
     interfaces::spi4::miso::alternateFunction(5);
-    interfaces::spi4::mosi::mode(Mode::ALTERNATE);
+    interfaces::spi4::miso::mode(Mode::ALTERNATE);
     interfaces::spi4::mosi::alternateFunction(5);
+    interfaces::spi4::mosi::mode(Mode::ALTERNATE);
 
     // We do not need to setup the miosix usart
 
-    interfaces::uart4::tx::mode(Mode::ALTERNATE);
     interfaces::uart4::tx::alternateFunction(8);
-    interfaces::uart4::rx::mode(Mode::ALTERNATE);
+    interfaces::uart4::tx::mode(Mode::ALTERNATE);
     interfaces::uart4::rx::alternateFunction(8);
+    interfaces::uart4::rx::mode(Mode::ALTERNATE);
 
-    interfaces::can1::tx::mode(Mode::ALTERNATE);
     interfaces::can1::tx::alternateFunction(9);
-    interfaces::can1::rx::mode(Mode::ALTERNATE);
+    interfaces::can1::tx::mode(Mode::ALTERNATE);
     interfaces::can1::rx::alternateFunction(9);
+    interfaces::can1::rx::mode(Mode::ALTERNATE);
 
-    interfaces::timers::tim1ch1::mode(Mode::ALTERNATE);
     interfaces::timers::tim1ch1::alternateFunction(1);
-    interfaces::timers::tim3ch1::mode(Mode::ALTERNATE);
+    interfaces::timers::tim1ch1::mode(Mode::ALTERNATE);
     interfaces::timers::tim3ch1::alternateFunction(2);
+    interfaces::timers::tim3ch1::mode(Mode::ALTERNATE);
 
     interfaces::adcs::adc12in9::mode(Mode::INPUT_ANALOG);
     interfaces::adcs::adc12in14::mode(Mode::INPUT_ANALOG);
diff --git a/src/bsps/stm32f767zi_rig_v2/config/miosix_settings.h b/src/bsps/stm32f767zi_rig_v2/config/miosix_settings.h
index 64b0670cab5f4cdfc3d8e06db7cc06e913deae15..1d02b120519dfa4a8fec6705418221cf4ee433c2 100644
--- a/src/bsps/stm32f767zi_rig_v2/config/miosix_settings.h
+++ b/src/bsps/stm32f767zi_rig_v2/config/miosix_settings.h
@@ -27,8 +27,8 @@
 // The PARSING_FROM_IDE is because Netbeans gets confused by this, it is never
 // defined when compiling the code.
 #ifndef PARSING_FROM_IDE
-//#error This error is a reminder that you have not edited miosix_settings.h
-// yet.
+// #error This error is a reminder that you have not edited miosix_settings.h
+//  yet.
 #endif  // PARSING_FROM_IDE
 
 /**
@@ -70,14 +70,14 @@ namespace miosix
 // Uncomment only *one* of those
 
 #define SCHED_TYPE_PRIORITY
-//#define SCHED_TYPE_CONTROL_BASED
-//#define SCHED_TYPE_EDF
+// #define SCHED_TYPE_CONTROL_BASED
+// #define SCHED_TYPE_EDF
 
 /// \def WITH_CPU_TIME_COUNTER
 /// Allows to enable/disable CPUTimeCounter to save code size and remove its
 /// overhead from the scheduling process. By default it is not defined
 /// (CPUTimeCounter is disabled).
-//#define WITH_CPU_TIME_COUNTER
+// #define WITH_CPU_TIME_COUNTER
 
 //
 // Filesystem options
@@ -110,7 +110,7 @@ const unsigned char MAX_OPEN_FILES = 8;
 /// This enables the dynamic loader to load elf programs, the extended system
 /// call service and, if the hardware supports it, the MPU to provide memory
 /// isolation of processes
-//#define WITH_PROCESSES
+// #define WITH_PROCESSES
 
 #if defined(WITH_PROCESSES) && defined(__NO_EXCEPTIONS)
 #error Processes require C++ exception support
@@ -145,7 +145,7 @@ const unsigned char MAX_OPEN_FILES = 8;
 /// \def WITH_DEEP_SLEEP
 /// Adds interfaces and required variables to support deep sleep state switch
 /// automatically when peripherals are not required
-//#define WITH_DEEP_SLEEP
+// #define WITH_DEEP_SLEEP
 
 /**
  * \def JTAG_DISABLE_SLEEP
diff --git a/src/bsps/stm32f767zi_rig_v2/interfaces-impl/bsp.cpp b/src/bsps/stm32f767zi_rig_v2/interfaces-impl/bsp.cpp
index 0d0c1bcc3323d459c3785a95611c6e82074cc927..f6ddb1f55dfeb2fcf0e2eee501cac3ec49ccedbf 100644
--- a/src/bsps/stm32f767zi_rig_v2/interfaces-impl/bsp.cpp
+++ b/src/bsps/stm32f767zi_rig_v2/interfaces-impl/bsp.cpp
@@ -257,80 +257,80 @@ void IRQbspInit()
     userLed4::mode(Mode::OUTPUT);
 
     // RIG stuff
-    interfaces::spi1::sck::mode(Mode::ALTERNATE);
     interfaces::spi1::sck::alternateFunction(5);
-    interfaces::spi1::miso::mode(Mode::ALTERNATE);
+    interfaces::spi1::sck::mode(Mode::ALTERNATE);
     interfaces::spi1::miso::alternateFunction(5);
-    interfaces::spi1::mosi::mode(Mode::ALTERNATE);
+    interfaces::spi1::miso::mode(Mode::ALTERNATE);
     interfaces::spi1::mosi::alternateFunction(5);
+    interfaces::spi1::mosi::mode(Mode::ALTERNATE);
 
-    interfaces::spi2::sck::mode(Mode::ALTERNATE);
     interfaces::spi2::sck::alternateFunction(5);
-    interfaces::spi2::miso::mode(Mode::ALTERNATE);
+    interfaces::spi2::sck::mode(Mode::ALTERNATE);
     interfaces::spi2::miso::alternateFunction(5);
-    interfaces::spi2::mosi::mode(Mode::ALTERNATE);
+    interfaces::spi2::miso::mode(Mode::ALTERNATE);
     interfaces::spi2::mosi::alternateFunction(5);
+    interfaces::spi2::mosi::mode(Mode::ALTERNATE);
 
-    interfaces::spi3::sck::mode(Mode::ALTERNATE);
     interfaces::spi3::sck::alternateFunction(6);
-    interfaces::spi3::miso::mode(Mode::ALTERNATE);
+    interfaces::spi3::sck::mode(Mode::ALTERNATE);
     interfaces::spi3::miso::alternateFunction(6);
-    interfaces::spi3::mosi::mode(Mode::ALTERNATE);
+    interfaces::spi3::miso::mode(Mode::ALTERNATE);
     interfaces::spi3::mosi::alternateFunction(5);
+    interfaces::spi3::mosi::mode(Mode::ALTERNATE);
 
     /* Do not enable Flavio's bullshit
-    interfaces::spi4::sck::mode(Mode::ALTERNATE);
     interfaces::spi4::sck::alternateFunction(5);
-    interfaces::spi4::miso::mode(Mode::ALTERNATE);
+    interfaces::spi4::sck::mode(Mode::ALTERNATE);
     interfaces::spi4::miso::alternateFunction(5);
-    interfaces::spi4::mosi::mode(Mode::ALTERNATE);
+    interfaces::spi4::miso::mode(Mode::ALTERNATE);
     interfaces::spi4::mosi::alternateFunction(5);
+    interfaces::spi4::mosi::mode(Mode::ALTERNATE);
     */
 
-    interfaces::spi6::sck::mode(Mode::ALTERNATE);
     interfaces::spi6::sck::alternateFunction(5);
-    interfaces::spi6::miso::mode(Mode::ALTERNATE);
+    interfaces::spi6::sck::mode(Mode::ALTERNATE);
     interfaces::spi6::miso::alternateFunction(5);
-    interfaces::spi6::mosi::mode(Mode::ALTERNATE);
+    interfaces::spi6::miso::mode(Mode::ALTERNATE);
     interfaces::spi6::mosi::alternateFunction(5);
+    interfaces::spi6::mosi::mode(Mode::ALTERNATE);
 
     // We do not need to setup the miosix usart
 
-    interfaces::uart4::tx::mode(Mode::ALTERNATE);
     interfaces::uart4::tx::alternateFunction(8);
-    interfaces::uart4::rx::mode(Mode::ALTERNATE);
+    interfaces::uart4::tx::mode(Mode::ALTERNATE);
     interfaces::uart4::rx::alternateFunction(8);
+    interfaces::uart4::rx::mode(Mode::ALTERNATE);
 
-    interfaces::can1::tx::mode(Mode::ALTERNATE);
     interfaces::can1::tx::alternateFunction(9);
-    interfaces::can1::rx::mode(Mode::ALTERNATE);
+    interfaces::can1::tx::mode(Mode::ALTERNATE);
     interfaces::can1::rx::alternateFunction(9);
+    interfaces::can1::rx::mode(Mode::ALTERNATE);
 
-    interfaces::can2::tx::mode(Mode::ALTERNATE);
     interfaces::can2::tx::alternateFunction(9);
-    interfaces::can2::rx::mode(Mode::ALTERNATE);
+    interfaces::can2::tx::mode(Mode::ALTERNATE);
     interfaces::can2::rx::alternateFunction(9);
+    interfaces::can2::rx::mode(Mode::ALTERNATE);
 
-    interfaces::timers::tim1ch1::mode(Mode::ALTERNATE);
     interfaces::timers::tim1ch1::alternateFunction(1);
-    interfaces::timers::tim3ch3::mode(Mode::ALTERNATE);
+    interfaces::timers::tim1ch1::mode(Mode::ALTERNATE);
     interfaces::timers::tim3ch3::alternateFunction(2);
-    interfaces::timers::tim4ch1::mode(Mode::ALTERNATE);
+    interfaces::timers::tim3ch3::mode(Mode::ALTERNATE);
     interfaces::timers::tim4ch1::alternateFunction(2);
-    interfaces::timers::tim5ch3::mode(Mode::ALTERNATE);
+    interfaces::timers::tim4ch1::mode(Mode::ALTERNATE);
     interfaces::timers::tim5ch3::alternateFunction(2);
-    interfaces::timers::tim8ch1::mode(Mode::ALTERNATE);
+    interfaces::timers::tim5ch3::mode(Mode::ALTERNATE);
     interfaces::timers::tim8ch1::alternateFunction(3);
-    interfaces::timers::tim8ch2::mode(Mode::ALTERNATE);
+    interfaces::timers::tim8ch1::mode(Mode::ALTERNATE);
     interfaces::timers::tim8ch2::alternateFunction(3);
-    interfaces::timers::tim9ch2::mode(Mode::ALTERNATE);
+    interfaces::timers::tim8ch2::mode(Mode::ALTERNATE);
     interfaces::timers::tim9ch2::alternateFunction(3);
-    interfaces::timers::tim10ch1::mode(Mode::ALTERNATE);
+    interfaces::timers::tim9ch2::mode(Mode::ALTERNATE);
     interfaces::timers::tim10ch1::alternateFunction(3);
-    interfaces::timers::tim11ch1::mode(Mode::ALTERNATE);
+    interfaces::timers::tim10ch1::mode(Mode::ALTERNATE);
     interfaces::timers::tim11ch1::alternateFunction(3);
-    interfaces::timers::tim12ch2::mode(Mode::ALTERNATE);
+    interfaces::timers::tim11ch1::mode(Mode::ALTERNATE);
     interfaces::timers::tim12ch2::alternateFunction(9);
+    interfaces::timers::tim12ch2::mode(Mode::ALTERNATE);
 
     interfaces::adcs::adc12in9::mode(Mode::INPUT_ANALOG);
     interfaces::adcs::adc123in11::mode(Mode::INPUT_ANALOG);
diff --git a/src/entrypoints/kernel-testsuite.cpp b/src/entrypoints/kernel-testsuite.cpp
index d78e82416f1bdf4217da52e7f121bc1a2ecc5cbb..2a0275672e7ffa4f586961856d0c454840601272 100644
--- a/src/entrypoints/kernel-testsuite.cpp
+++ b/src/entrypoints/kernel-testsuite.cpp
@@ -2833,8 +2833,8 @@ void __attribute__((noinline)) check32(unsigned int a, unsigned int b)
         fail("swapBytes32");
 }
 
-void __attribute__((noinline))
-check64(unsigned long long a, unsigned long long b)
+void __attribute__((noinline)) check64(unsigned long long a,
+                                       unsigned long long b)
 {
     if (swapBytes64(a) != b)
         fail("swapBytes64");
diff --git a/src/entrypoints/runcam-settings.cpp b/src/entrypoints/runcam-settings.cpp
index d87ac005682aa80bf319a4cec48f8bb96240efca..17ca888b3e437dde47a97fc4dcc7011b244271a0 100644
--- a/src/entrypoints/runcam-settings.cpp
+++ b/src/entrypoints/runcam-settings.cpp
@@ -47,12 +47,12 @@ int main()
     GpioPin tx(GPIOB_BASE, 6);
     GpioPin rx(GPIOB_BASE, 7);
 
-    tx.mode(Mode::ALTERNATE);
-    rx.mode(Mode::ALTERNATE);
-
     tx.alternateFunction(7);
     rx.alternateFunction(7);
 
+    tx.mode(Mode::ALTERNATE);
+    rx.mode(Mode::ALTERNATE);
+
     USART usart1(USART1, 115200);
 
     Runcam test(usart1);
diff --git a/src/entrypoints/sx1278-serial.cpp b/src/entrypoints/sx1278-serial.cpp
index ede273cb243c0f8d76512966177fcbb85aa5698b..073943bdb74b18f8ff75783488795722fbf4e1f8 100644
--- a/src/entrypoints/sx1278-serial.cpp
+++ b/src/entrypoints/sx1278-serial.cpp
@@ -78,8 +78,8 @@ using sck  = radio::sck;
 using miso = radio::miso;
 using mosi = radio::mosi;
 
-using txen                         = radio::txEn;
-using rxen                         = radio::rxEn;
+using txen = radio::txEn;
+using rxen = radio::rxEn;
 
 #define SX1278_SPI SPI4
 
@@ -239,11 +239,11 @@ int main()
 #elif defined SX1278_IS_SKYWARD433
     printf("[sx1278] Confuring Skyward 433 frontend...\n");
     std::unique_ptr<Boardcore::SX1278::ISX1278Frontend> frontend(
-              new Boardcore::Skyward433Frontend());
+        new Boardcore::Skyward433Frontend());
 #else
     printf("[sx1278] Confuring RA01 frontend...\n");
     std::unique_ptr<Boardcore::SX1278::ISX1278Frontend> frontend(
-         new Boardcore::RA01Frontend());
+        new Boardcore::RA01Frontend());
 #endif
 
 #ifdef SX1278_IS_LORA
@@ -273,14 +273,14 @@ int main()
     config.enable_crc = false;
 
     sx1278 = new Boardcore::SX1278Fsk(sx1278_bus, cs::getPin(), dio0::getPin(),
-                                            dio1::getPin(), dio3::getPin(),
-                                            Boardcore::SPI::ClockDivider::DIV_256,
-                                            std::move(frontend));
+                                      dio1::getPin(), dio3::getPin(),
+                                      Boardcore::SPI::ClockDivider::DIV_256,
+                                      std::move(frontend));
 
     printf("\n[sx1278] Configuring sx1278 fsk...\n");
     if ((err = sx1278->init(config)) != Boardcore::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 false;
     }
diff --git a/src/shared/ActiveObject.h b/src/shared/ActiveObject.h
index abecefa32d2ea21381634fa1e7e22d390f0ca1ee..e17ec5bbe8dc6c7a299d62a5c390fb0f76278efc 100644
--- a/src/shared/ActiveObject.h
+++ b/src/shared/ActiveObject.h
@@ -48,7 +48,7 @@ public:
     ActiveObject(unsigned int stacksize    = miosix::STACK_DEFAULT_FOR_PTHREAD,
                  miosix::Priority priority = miosix::MAIN_PRIORITY);
 
-    virtual ~ActiveObject(){};
+    virtual ~ActiveObject() {};
 
     /**
      * @brief Start the thread associated with this active object.
diff --git a/src/shared/algorithms/Follower/FollowerData.h b/src/shared/algorithms/Follower/FollowerData.h
index e30123af769f54afb1f3a8fae8e4b879cf724be2..d8e2c9df072b131ac13424c0b9117c087a813f4d 100644
--- a/src/shared/algorithms/Follower/FollowerData.h
+++ b/src/shared/algorithms/Follower/FollowerData.h
@@ -48,10 +48,10 @@ struct AntennaAngles
 
     AntennaAngles() : timestamp{0}, yaw{0}, pitch{0} {};
     AntennaAngles(uint64_t timestamp, float yaw, float pitch)
-        : timestamp{timestamp}, yaw(yaw), pitch(pitch){};
+        : timestamp{timestamp}, yaw(yaw), pitch(pitch) {};
     AntennaAngles(uint64_t timestamp, float yaw, float pitch,
                   uint32_t nrPropagations)
-        : timestamp{timestamp}, yaw(yaw), pitch(pitch){};
+        : timestamp{timestamp}, yaw(yaw), pitch(pitch) {};
 };
 
 /**
@@ -62,13 +62,13 @@ struct AntennaAnglesLog : public AntennaAngles
     uint32_t nrPropagations =
         0;  //!< Nr of propagations by the propagator (0 if no propagation)
 
-    AntennaAnglesLog() : AntennaAngles(), nrPropagations(0){};
+    AntennaAnglesLog() : AntennaAngles(), nrPropagations(0) {};
     AntennaAnglesLog(uint64_t timestamp, float yaw, float pitch)
         : AntennaAngles(timestamp, yaw, pitch), nrPropagations{0} {};
     AntennaAnglesLog(uint64_t timestamp, float yaw, float pitch,
                      uint32_t nrPropagations)
-        : AntennaAngles(timestamp, yaw, pitch), nrPropagations{
-                                                    nrPropagations} {};
+        : AntennaAngles(timestamp, yaw, pitch),
+          nrPropagations{nrPropagations} {};
     AntennaAnglesLog(AntennaAngles angle, uint32_t nrPropagations)
         : AntennaAngles(angle), nrPropagations{nrPropagations} {};
 
diff --git a/src/shared/algorithms/MEA/MEA.cpp b/src/shared/algorithms/MEA/MEA.cpp
index 0b4108a077b62edf7ec256d0bdcfdf1b1481df17..4ea49dcf2631b1e34ded672b2535fdd8d06ffa78 100644
--- a/src/shared/algorithms/MEA/MEA.cpp
+++ b/src/shared/algorithms/MEA/MEA.cpp
@@ -63,10 +63,9 @@ MEA::MEA(const Config &config)
       baroR{config.baroR}, P{config.P}, x{0, 0, config.initialMass},
       mass{config.initialMass}, accelThresh{config.accelThresh},
       speedThresh{config.speedThresh}, Kt{config.Kt}, alpha{config.alpha},
-      c{config.c}, coeffs{config.coeffs},
-      crossSection{config.crossSection}, ae{config.ae}, p0{config.p0},
-      minMass{config.minMass}, maxMass{config.maxMass},
-      cdCorrectionFactor(config.cdCorrectionFactor)
+      c{config.c}, coeffs{config.coeffs}, crossSection{config.crossSection},
+      ae{config.ae}, p0{config.p0}, minMass{config.minMass},
+      maxMass{config.maxMass}, cdCorrectionFactor(config.cdCorrectionFactor)
 {
     updateState();
 }
diff --git a/src/shared/algorithms/ReferenceValues.h b/src/shared/algorithms/ReferenceValues.h
index 62dcddd507a8e2d35b8818966271976e4f35ae8e..d4141ab6d24fc18776faffb20ce618f626a0aa0c 100644
--- a/src/shared/algorithms/ReferenceValues.h
+++ b/src/shared/algorithms/ReferenceValues.h
@@ -46,7 +46,7 @@ struct ReferenceValues
     float mslPressure    = Constants::MSL_PRESSURE;
     float mslTemperature = Constants::MSL_TEMPERATURE;
 
-    ReferenceValues(){};
+    ReferenceValues() {};
 
     ReferenceValues(float altitude, float pressure, float temperature,
                     float refLatitude    = Constants::B21_LATITUDE,
diff --git a/src/shared/drivers/adc/InternalADC.cpp b/src/shared/drivers/adc/InternalADC.cpp
index f5dbbe0afe40e71c5eebb8f1e92b1d290ae686a7..75f26d3df1d14b1fe060d739c86ea19405865453 100644
--- a/src/shared/drivers/adc/InternalADC.cpp
+++ b/src/shared/drivers/adc/InternalADC.cpp
@@ -39,9 +39,9 @@ static const float CAL_V_DDA    = 3.3f;
 #elif defined(STM32F767xx) || defined(STM32F769xx) || defined(STM32F756xx)
 #define CAL_PT1_VALUE ((uint16_t volatile *)((uint32_t)0x1FF0F44C))
 #define CAL_PT2_VALUE ((uint16_t volatile *)((uint32_t)0x1FF0F44E))
-static const float CAL_PT1_TEMP           = 30;
-static const float CAL_PT2_TEMP           = 110;
-static const float CAL_V_DDA              = 3.3f;
+static const float CAL_PT1_TEMP = 30;
+static const float CAL_PT2_TEMP = 110;
+static const float CAL_V_DDA    = 3.3f;
 #else
 #warning This micro controller does not have a calibrated temperature sensor or is not currently supported by this driver
 #endif
diff --git a/src/shared/events/EventHandler.h b/src/shared/events/EventHandler.h
index eeb30eefc2ed348fbfd07f6a7b8048ef771aecd6..30b0fba72a9485f6ed030b1d556ec742dec70709 100644
--- a/src/shared/events/EventHandler.h
+++ b/src/shared/events/EventHandler.h
@@ -36,7 +36,7 @@ class EventHandlerBase
 public:
     EventHandlerBase() {}
 
-    virtual ~EventHandlerBase(){};
+    virtual ~EventHandlerBase() {};
 
     virtual void postEvent(const Event& ev) = 0;
 };
@@ -67,7 +67,7 @@ inline EventHandler::EventHandler(unsigned int stacksize,
 {
 }
 
-inline EventHandler::~EventHandler(){};
+inline EventHandler::~EventHandler() {};
 
 inline void EventHandler::postEvent(const Event& ev) { eventList.put(ev); }
 
diff --git a/src/shared/events/HSM.h b/src/shared/events/HSM.h
index 59d1b95e834ce02d241a3e8610c17da00162aeae..2e7ae7ae720f88ca629d03046d7ee3a439561359 100644
--- a/src/shared/events/HSM.h
+++ b/src/shared/events/HSM.h
@@ -66,7 +66,7 @@ public:
         temp  = initialState;
     }
 
-    virtual ~HSM(){};
+    virtual ~HSM() {};
 
     bool start() override
     {
diff --git a/src/shared/events/utils/EventCounter.h b/src/shared/events/utils/EventCounter.h
index 9f0914d26e17c0fca31960c706320deb5c5eebed..69c6a692085c280bb412cea7e6c01298f593dec2 100644
--- a/src/shared/events/utils/EventCounter.h
+++ b/src/shared/events/utils/EventCounter.h
@@ -93,7 +93,7 @@ public:
 
 protected:
     // Do nothing
-    void handleEvent(const Event& ev __attribute__((unused))) override{};
+    void handleEvent(const Event& ev __attribute__((unused))) override {};
 
 private:
     EventBroker& broker;
diff --git a/src/shared/sensors/ADS1118/ADS1118.h b/src/shared/sensors/ADS1118/ADS1118.h
index 828cdc9bb08024c3a933e0714ac6f2e505afa24c..2beedb0acff15461d1306c51aa2d08614564a3ca 100644
--- a/src/shared/sensors/ADS1118/ADS1118.h
+++ b/src/shared/sensors/ADS1118/ADS1118.h
@@ -81,7 +81,7 @@ public:
         MUX_AIN1_GND  = 0x5,  ///< AINp is AIN1 and AINn is GND
         MUX_AIN2_GND  = 0x6,  ///< AINp is AIN2 and AINn is GND
         MUX_AIN3_GND  = 0x7   ///< AINp is AIN3 and AINn is GND
-    };                        ///< Multiplexer values
+    };  ///< Multiplexer values
 
     enum ADS1118Pga
     {
@@ -91,13 +91,13 @@ public:
         FSR_1_024 = 0x3,  ///< FSR is ±1.024 V
         FSR_0_512 = 0x4,  ///< FSR is ±0.512 V
         FSR_0_256 = 0x5   ///< FSR is ±0.256 V
-    };                    ///< Programmable gain amplifier values
+    };  ///< Programmable gain amplifier values
 
     enum ADS1118Mode
     {
         CONTINUOUS_CONV_MODE = 0x0,  ///< Continuous-conversion mode
         SINGLE_SHOT_MODE = 0x1  ///< Power-down and single-shot mode (default)
-    };                          ///< Conversion mode values
+    };  ///< Conversion mode values
 
     enum ADS1118DataRate
     {
@@ -109,19 +109,19 @@ public:
         DR_250 = 0x5,  ///< 250 SPS
         DR_475 = 0x6,  ///< 475 SPS
         DR_860 = 0x7   ///< 860 SPS
-    };                 ///< Data rate configuration values
+    };  ///< Data rate configuration values
 
     enum ADS1118TempMode
     {
         ADC_MODE         = 0x0,  ///< ADC mode (default)
         TEMP_SENSOR_MODE = 0x1   ///< Temperature sensor mode
-    };                           ///< Temperature or ADC mode values
+    };  ///< Temperature or ADC mode values
 
     enum ADS1118PullUp
     {
         PULL_UP_DIS = 0x0,  ///< Pullup resistor disabled on DOUT pin
         PULL_UP_EN  = 0x1   ///< Pullup resistor enabled on DOUT pin (default)
-    };                      ///< Pull up enable or disable values
+    };  ///< Pull up enable or disable values
 
     union ADS1118Config
     {
@@ -145,13 +145,13 @@ public:
         } byte;           ///< Includes the msb and lsb bytes
 
         uint16_t word;  ///< Representation in word (16-bits) format
-    };                  ///< Structure of configuration word
+    };  ///< Structure of configuration word
 
     struct ADS1118InputConfig
     {
         ADS1118Mux mux       = MUX_AIN0_AIN1;  ///< Input's mux configuration
         ADS1118DataRate rate = DR_128;  ///< Input's data rate configuration
-    };                                  ///< Driver's input config
+    };  ///< Driver's input config
 
     static constexpr uint8_t VALID_OPERATION =
         0x1;  ///< Indicates a valid configuration
diff --git a/src/shared/sensors/BMP280/BMP280Data.h b/src/shared/sensors/BMP280/BMP280Data.h
index cfd3cecc200fb8be00b137bc725a6a62a2776f45..e036b7febd30cedaae7c3b8b5aaaa7054a67bada 100644
--- a/src/shared/sensors/BMP280/BMP280Data.h
+++ b/src/shared/sensors/BMP280/BMP280Data.h
@@ -33,8 +33,8 @@ struct BMP280Data : public TemperatureData, public PressureData
 
     BMP280Data(uint64_t timestamp, float temperature, float pressure,
                float humidity)
-        : TemperatureData{timestamp, temperature}, PressureData{timestamp,
-                                                                pressure}
+        : TemperatureData{timestamp, temperature},
+          PressureData{timestamp, pressure}
 
     {
     }
diff --git a/src/shared/sensors/H3LIS331DL/H3LIS331DLData.h b/src/shared/sensors/H3LIS331DL/H3LIS331DLData.h
index 054ef30c44965a34f08c18cc27bcc8680d48f3fa..5262e4abd78697e7a430cad6f8939537bda98708 100644
--- a/src/shared/sensors/H3LIS331DL/H3LIS331DLData.h
+++ b/src/shared/sensors/H3LIS331DL/H3LIS331DLData.h
@@ -30,12 +30,12 @@ namespace Boardcore
 struct H3LIS331DLData : public AccelerometerData
 {
 
-    H3LIS331DLData() : AccelerometerData(0, 0, 0, 0){};
+    H3LIS331DLData() : AccelerometerData(0, 0, 0, 0) {};
 
     H3LIS331DLData(uint64_t ts, float aX, float aY, float aZ)
-        : AccelerometerData(ts, aX, aY, aZ){};
+        : AccelerometerData(ts, aX, aY, aZ) {};
 
-    explicit H3LIS331DLData(AccelerometerData acc) : AccelerometerData(acc){};
+    explicit H3LIS331DLData(AccelerometerData acc) : AccelerometerData(acc) {};
 
     static std::string header()
     {
diff --git a/src/shared/sensors/HILSensor.h b/src/shared/sensors/HILSensor.h
index d69bf914910e8ad9fac266b0c8408d20e2c98483..c81dfa27bfe4a290c2e0072b8fb9e06fbaed1baf 100644
--- a/src/shared/sensors/HILSensor.h
+++ b/src/shared/sensors/HILSensor.h
@@ -71,8 +71,8 @@ public:
      * the sensor current sample.
      */
     HILSensor(T&& sensor, bool enableHw, UpdateFn updateData)
-        : T{std::move(sensor)}, enableHw{enableHw}, updateData{
-                                                        std::move(updateData)}
+        : T{std::move(sensor)}, enableHw{enableHw},
+          updateData{std::move(updateData)}
     {
     }
 
diff --git a/src/shared/sensors/LPS22DF/LPS22DFData.h b/src/shared/sensors/LPS22DF/LPS22DFData.h
index 5867f4e52d6d96be68d4ba3b0b7795dc4ae21af0..2f8242c20e3ec0fe990995c9c426513f2e79529a 100644
--- a/src/shared/sensors/LPS22DF/LPS22DFData.h
+++ b/src/shared/sensors/LPS22DF/LPS22DFData.h
@@ -32,8 +32,8 @@ struct LPS22DFData : public PressureData, public TemperatureData
     LPS22DFData() : PressureData{0, 0.0}, TemperatureData{0, 0.0} {}
 
     LPS22DFData(uint64_t timestamp, float pressure, float temperature)
-        : PressureData{timestamp, pressure}, TemperatureData{timestamp,
-                                                             temperature}
+        : PressureData{timestamp, pressure},
+          TemperatureData{timestamp, temperature}
     {
     }
 
diff --git a/src/shared/sensors/LPS331AP/LPS331APData.h b/src/shared/sensors/LPS331AP/LPS331APData.h
index 10bf25b21ede97f7209357367faa25ab6bc5d33d..5eec12ed454d64f5e1a72e289ad26d4665be2bf5 100644
--- a/src/shared/sensors/LPS331AP/LPS331APData.h
+++ b/src/shared/sensors/LPS331AP/LPS331APData.h
@@ -34,9 +34,8 @@ struct LPS331APData : public PressureData, TemperatureData
 
     LPS331APData(uint64_t pressureTimestamp, float pressure,
                  uint64_t temperatureTimestamp, float temperature)
-        : PressureData{pressureTimestamp, pressure}, TemperatureData{
-                                                         temperatureTimestamp,
-                                                         temperature}
+        : PressureData{pressureTimestamp, pressure},
+          TemperatureData{temperatureTimestamp, temperature}
     {
     }
 
diff --git a/src/shared/sensors/MS5803/MS5803Data.h b/src/shared/sensors/MS5803/MS5803Data.h
index 10eb959bd39c60b15e4c1abac74986f517d7ce3d..0ddbf938a7e9eb83ef86aea433e4fe46ad2b9f03 100644
--- a/src/shared/sensors/MS5803/MS5803Data.h
+++ b/src/shared/sensors/MS5803/MS5803Data.h
@@ -47,9 +47,8 @@ struct MS5803Data : public PressureData, TemperatureData
 
     MS5803Data(uint64_t pressureTimestamp, float pressure,
                uint64_t temperatureTimestamp, float temperature)
-        : PressureData{pressureTimestamp, pressure}, TemperatureData{
-                                                         temperatureTimestamp,
-                                                         temperature}
+        : PressureData{pressureTimestamp, pressure},
+          TemperatureData{temperatureTimestamp, temperature}
     {
     }
 
diff --git a/src/shared/sensors/Vectornav/VN100/VN100SerialData.h b/src/shared/sensors/Vectornav/VN100/VN100SerialData.h
index 31e903bdad3955a3caf466bfde899d1edab87573..711212fdd57b31ae34a3ed2ba85750c7ab75d1fc 100644
--- a/src/shared/sensors/Vectornav/VN100/VN100SerialData.h
+++ b/src/shared/sensors/Vectornav/VN100/VN100SerialData.h
@@ -43,8 +43,8 @@ struct VN100SerialData : public QuaternionData,
      */
     // cppcheck-suppress uninitDerivedMemberVar
     VN100SerialData()
-        : QuaternionData{0, 0.0, 0.0, 0.0, 0.0}, MagnetometerData{0, 0.0, 0.0,
-                                                                  0.0},
+        : QuaternionData{0, 0.0, 0.0, 0.0, 0.0},
+          MagnetometerData{0, 0.0, 0.0, 0.0},
           AccelerometerData{0, 0.0, 0.0, 0.0}, GyroscopeData{0, 0.0, 0.0, 0.0},
           TemperatureData{0, 0.0}, PressureData{0, 0.0}
     {
diff --git a/src/shared/sensors/Vectornav/VN100/VN100SpiData.h b/src/shared/sensors/Vectornav/VN100/VN100SpiData.h
index 40376473b76155ea2dab640716cbe00cdd8aed41..156e0ff0ee6a22e2748bd34cbed0c329867b288c 100644
--- a/src/shared/sensors/Vectornav/VN100/VN100SpiData.h
+++ b/src/shared/sensors/Vectornav/VN100/VN100SpiData.h
@@ -42,8 +42,8 @@ struct VN100SpiData : public QuaternionData,
 {
 
     VN100SpiData()
-        : QuaternionData{0, 0.0, 0.0, 0.0, 0.0}, MagnetometerData{0, 0.0, 0.0,
-                                                                  0.0},
+        : QuaternionData{0, 0.0, 0.0, 0.0, 0.0},
+          MagnetometerData{0, 0.0, 0.0, 0.0},
           AccelerometerData{0, 0.0, 0.0, 0.0}, GyroscopeData{0, 0.0, 0.0, 0.0}
     {
     }
diff --git a/src/shared/sensors/Vectornav/VN300/VN300Data.h b/src/shared/sensors/Vectornav/VN300/VN300Data.h
index 5953da14c339b1f849706fa70a792cf338e6625b..46143511e05ddf425ec8c4e412143caa44403b63 100644
--- a/src/shared/sensors/Vectornav/VN300/VN300Data.h
+++ b/src/shared/sensors/Vectornav/VN300/VN300Data.h
@@ -52,8 +52,8 @@ struct VN300Data : public QuaternionData,
 
     // cppcheck-suppress uninitDerivedMemberVar
     VN300Data()
-        : QuaternionData{0, 0.0, 0.0, 0.0, 0.0}, MagnetometerData{0, 0.0, 0.0,
-                                                                  0.0},
+        : QuaternionData{0, 0.0, 0.0, 0.0, 0.0},
+          MagnetometerData{0, 0.0, 0.0, 0.0},
           AccelerometerData{0, 0.0, 0.0, 0.0}, GyroscopeData{0, 0.0, 0.0, 0.0},
           INSData{0, 0, 0, 0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}
     {
diff --git a/src/shared/sensors/analog/TrafagPressureSensor.h b/src/shared/sensors/analog/TrafagPressureSensor.h
index a0539c62faf37c7a70de259c337f2a5c8fa8865e..ba46af98bdb5eb560774ddd5509b0f60220df0ac 100644
--- a/src/shared/sensors/analog/TrafagPressureSensor.h
+++ b/src/shared/sensors/analog/TrafagPressureSensor.h
@@ -49,8 +49,8 @@ public:
                          float shuntResistance, float maxPressure,
                          float minCurrent = 4, float maxCurrent = 20)
         : getVoltage{getVoltage}, shuntResistance{shuntResistance},
-          maxPressure{maxPressure}, minCurrent{minCurrent}, maxCurrent{
-                                                                maxCurrent}
+          maxPressure{maxPressure}, minCurrent{minCurrent},
+          maxCurrent{maxCurrent}
     {
     }
 
diff --git a/src/shared/sensors/analog/TwoPointAnalogLoadCell.h b/src/shared/sensors/analog/TwoPointAnalogLoadCell.h
index fa620b6d1803315d75362ba67e4bb90e9c3c3b5f..5dcde63f84a0c57c8c660ffa36486ee178bffcd0 100644
--- a/src/shared/sensors/analog/TwoPointAnalogLoadCell.h
+++ b/src/shared/sensors/analog/TwoPointAnalogLoadCell.h
@@ -47,8 +47,8 @@ public:
      */
     TwoPointAnalogLoadCell(std::function<ADCData()> getVoltage, float p0Voltage,
                            float p0Mass, float p1Voltage, float p1Mass)
-        : getVoltage{getVoltage}, staticScale{(p1Mass - p0Mass) /
-                                              (p1Voltage - p0Voltage)},
+        : getVoltage{getVoltage},
+          staticScale{(p1Mass - p0Mass) / (p1Voltage - p0Voltage)},
           staticOffset{p0Mass - staticScale * p0Voltage}
     {
     }
diff --git a/src/shared/utils/CSVReader/CSVReader.h b/src/shared/utils/CSVReader/CSVReader.h
index 0db89a16b7b00c7dfa804e6d2679668a47b39ddf..09a3472213123bdac5aa45806a33e46045e59be3 100644
--- a/src/shared/utils/CSVReader/CSVReader.h
+++ b/src/shared/utils/CSVReader/CSVReader.h
@@ -158,8 +158,7 @@ public:
     {
         std::vector<Data> fileData;
 
-        std::for_each(begin(), end(),
-                      [&fileData](const Data& data)
+        std::for_each(begin(), end(), [&fileData](const Data& data)
                       { fileData.push_back(data); });
 
         return fileData;
diff --git a/src/tests/catch/propagator/test-propagator-data.h b/src/tests/catch/propagator/test-propagator-data.h
index 0ce932d05d01c1c9ca2cfb4129960304b944144b..c54e4376a458240b613c61120421fe0b23f6bdcf 100644
--- a/src/tests/catch/propagator/test-propagator-data.h
+++ b/src/tests/catch/propagator/test-propagator-data.h
@@ -89,106 +89,106 @@ namespace TestPropagator1
 std::chrono::milliseconds dt = 20ms;
 int n                        = 100;
 Boardcore::NASState nas[]    = {
-       {1, {0, 42, 0, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {2, {-0.02, 42, 0.02, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {3, {-0.04, 42, 0.04, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {4, {-0.06, 42, 0.06, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {5, {-0.08, 42, 0.08, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {6, {-0.1, 42, 0.1, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {7, {-0.12, 42, 0.12, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {8, {-0.14, 42, 0.14, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {9, {-0.16, 42, 0.16, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {10, {-0.18, 42, 0.18, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {11, {-0.2, 42, 0.2, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {12, {-0.22, 42, 0.22, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {13, {-0.24, 42, 0.24, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {14, {-0.26, 42, 0.26, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {15, {-0.28, 42, 0.28, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {16, {-0.3, 42, 0.3, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {17, {-0.32, 42, 0.32, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {18, {-0.34, 42, 0.34, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {19, {-0.36, 42, 0.36, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {20, {-0.38, 42, 0.38, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {21, {-0.4, 42, 0.4, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {22, {-0.42, 42, 0.42, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {23, {-0.44, 42, 0.44, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {24, {-0.46, 42, 0.46, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {25, {-0.48, 42, 0.48, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {26, {-0.5, 42, 0.5, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {27, {-0.52, 42, 0.52, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {28, {-0.54, 42, 0.54, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {29, {-0.56, 42, 0.56, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {30, {-0.58, 42, 0.58, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {31, {-0.6, 42, 0.6, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {32, {-0.62, 42, 0.62, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {33, {-0.64, 42, 0.64, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {34, {-0.66, 42, 0.66, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {35, {-0.68, 42, 0.68, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {36, {-0.7, 42, 0.7, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {37, {-0.72, 42, 0.72, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {38, {-0.74, 42, 0.74, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {39, {-0.76, 42, 0.76, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {40, {-0.78, 42, 0.78, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {41, {-0.8, 42, 0.8, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {42, {-0.82, 42, 0.82, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {43, {-0.84, 42, 0.84, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {44, {-0.86, 42, 0.86, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {45, {-0.88, 42, 0.88, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {46, {-0.9, 42, 0.9, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {47, {-0.92, 42, 0.92, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {48, {-0.94, 42, 0.94, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {49, {-0.96, 42, 0.96, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {50, {-0.98, 42, 0.98, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {51, {-1, 42, 1, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {52, {-1.02, 42, 1.02, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {53, {-1.04, 42, 1.04, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {54, {-1.06, 42, 1.06, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {55, {-1.08, 42, 1.08, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {56, {-1.1, 42, 1.1, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {57, {-1.12, 42, 1.12, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {58, {-1.14, 42, 1.14, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {59, {-1.16, 42, 1.16, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {60, {-1.18, 42, 1.18, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {61, {-1.2, 42, 1.2, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {62, {-1.22, 42, 1.22, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {63, {-1.24, 42, 1.24, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {64, {-1.26, 42, 1.26, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {65, {-1.28, 42, 1.28, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {66, {-1.3, 42, 1.3, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {67, {-1.32, 42, 1.32, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {68, {-1.34, 42, 1.34, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {69, {-1.36, 42, 1.36, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {70, {-1.38, 42, 1.38, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {71, {-1.4, 42, 1.4, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {72, {-1.42, 42, 1.42, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {73, {-1.44, 42, 1.44, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {74, {-1.46, 42, 1.46, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {75, {-1.48, 42, 1.48, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {76, {-1.5, 42, 1.5, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {77, {-1.52, 42, 1.52, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {78, {-1.54, 42, 1.54, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {79, {-1.56, 42, 1.56, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {80, {-1.58, 42, 1.58, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {81, {-1.6, 42, 1.6, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {82, {-1.62, 42, 1.62, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {83, {-1.64, 42, 1.64, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {84, {-1.66, 42, 1.66, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {85, {-1.68, 42, 1.68, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {86, {-1.7, 42, 1.7, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {87, {-1.72, 42, 1.72, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {88, {-1.74, 42, 1.74, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {89, {-1.76, 42, 1.76, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {90, {-1.78, 42, 1.78, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {91, {-1.8, 42, 1.8, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {92, {-1.82, 42, 1.82, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {93, {-1.84, 42, 1.84, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {94, {-1.86, 42, 1.86, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {95, {-1.88, 42, 1.88, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {96, {-1.9, 42, 1.9, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {97, {-1.92, 42, 1.92, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {98, {-1.94, 42, 1.94, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {99, {-1.96, 42, 1.96, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
-       {100, {-1.98, 42, 1.98, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}}};
+    {1, {0, 42, 0, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {2, {-0.02, 42, 0.02, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {3, {-0.04, 42, 0.04, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {4, {-0.06, 42, 0.06, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {5, {-0.08, 42, 0.08, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {6, {-0.1, 42, 0.1, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {7, {-0.12, 42, 0.12, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {8, {-0.14, 42, 0.14, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {9, {-0.16, 42, 0.16, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {10, {-0.18, 42, 0.18, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {11, {-0.2, 42, 0.2, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {12, {-0.22, 42, 0.22, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {13, {-0.24, 42, 0.24, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {14, {-0.26, 42, 0.26, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {15, {-0.28, 42, 0.28, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {16, {-0.3, 42, 0.3, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {17, {-0.32, 42, 0.32, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {18, {-0.34, 42, 0.34, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {19, {-0.36, 42, 0.36, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {20, {-0.38, 42, 0.38, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {21, {-0.4, 42, 0.4, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {22, {-0.42, 42, 0.42, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {23, {-0.44, 42, 0.44, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {24, {-0.46, 42, 0.46, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {25, {-0.48, 42, 0.48, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {26, {-0.5, 42, 0.5, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {27, {-0.52, 42, 0.52, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {28, {-0.54, 42, 0.54, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {29, {-0.56, 42, 0.56, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {30, {-0.58, 42, 0.58, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {31, {-0.6, 42, 0.6, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {32, {-0.62, 42, 0.62, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {33, {-0.64, 42, 0.64, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {34, {-0.66, 42, 0.66, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {35, {-0.68, 42, 0.68, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {36, {-0.7, 42, 0.7, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {37, {-0.72, 42, 0.72, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {38, {-0.74, 42, 0.74, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {39, {-0.76, 42, 0.76, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {40, {-0.78, 42, 0.78, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {41, {-0.8, 42, 0.8, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {42, {-0.82, 42, 0.82, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {43, {-0.84, 42, 0.84, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {44, {-0.86, 42, 0.86, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {45, {-0.88, 42, 0.88, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {46, {-0.9, 42, 0.9, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {47, {-0.92, 42, 0.92, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {48, {-0.94, 42, 0.94, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {49, {-0.96, 42, 0.96, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {50, {-0.98, 42, 0.98, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {51, {-1, 42, 1, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {52, {-1.02, 42, 1.02, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {53, {-1.04, 42, 1.04, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {54, {-1.06, 42, 1.06, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {55, {-1.08, 42, 1.08, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {56, {-1.1, 42, 1.1, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {57, {-1.12, 42, 1.12, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {58, {-1.14, 42, 1.14, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {59, {-1.16, 42, 1.16, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {60, {-1.18, 42, 1.18, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {61, {-1.2, 42, 1.2, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {62, {-1.22, 42, 1.22, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {63, {-1.24, 42, 1.24, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {64, {-1.26, 42, 1.26, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {65, {-1.28, 42, 1.28, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {66, {-1.3, 42, 1.3, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {67, {-1.32, 42, 1.32, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {68, {-1.34, 42, 1.34, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {69, {-1.36, 42, 1.36, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {70, {-1.38, 42, 1.38, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {71, {-1.4, 42, 1.4, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {72, {-1.42, 42, 1.42, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {73, {-1.44, 42, 1.44, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {74, {-1.46, 42, 1.46, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {75, {-1.48, 42, 1.48, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {76, {-1.5, 42, 1.5, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {77, {-1.52, 42, 1.52, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {78, {-1.54, 42, 1.54, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {79, {-1.56, 42, 1.56, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {80, {-1.58, 42, 1.58, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {81, {-1.6, 42, 1.6, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {82, {-1.62, 42, 1.62, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {83, {-1.64, 42, 1.64, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {84, {-1.66, 42, 1.66, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {85, {-1.68, 42, 1.68, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {86, {-1.7, 42, 1.7, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {87, {-1.72, 42, 1.72, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {88, {-1.74, 42, 1.74, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {89, {-1.76, 42, 1.76, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {90, {-1.78, 42, 1.78, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {91, {-1.8, 42, 1.8, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {92, {-1.82, 42, 1.82, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {93, {-1.84, 42, 1.84, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {94, {-1.86, 42, 1.86, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {95, {-1.88, 42, 1.88, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {96, {-1.9, 42, 1.9, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {97, {-1.92, 42, 1.92, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {98, {-1.94, 42, 1.94, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {99, {-1.96, 42, 1.96, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}},
+    {100, {-1.98, 42, 1.98, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0}}};
 
 Boardcore::PropagatorState STATE0(0, 0, nas[0]);
 
@@ -199,224 +199,224 @@ namespace TestPropagator2
 std::chrono::milliseconds dt = 20ms;
 int n                        = 100;
 Boardcore::NASState nas[]    = {
-       {1, {12, -24, -48, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {2, {11.994, -23.976, -47.932, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {3, {11.988, -23.952, -47.864, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {4, {11.982, -23.928, -47.796, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {5, {11.976, -23.904, -47.728, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {6, {11.97, -23.88, -47.66, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {7, {11.964, -23.856, -47.592, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {8, {11.958, -23.832, -47.524, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {9, {11.952, -23.808, -47.456, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {10, {11.946, -23.784, -47.388, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {11, {11.94, -23.76, -47.32, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {12, {11.934, -23.736, -47.252, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {13, {11.928, -23.712, -47.184, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {14, {11.922, -23.688, -47.116, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {15, {11.916, -23.664, -47.048, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {16, {11.91, -23.64, -46.98, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {17, {11.904, -23.616, -46.912, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {18, {11.898, -23.592, -46.844, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {19, {11.892, -23.568, -46.776, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {20, {11.886, -23.544, -46.708, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {21, {11.88, -23.52, -46.64, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {22, {11.874, -23.496, -46.572, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {23, {11.868, -23.472, -46.504, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {24, {11.862, -23.448, -46.436, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {25,
+    {1, {12, -24, -48, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
+    {2, {11.994, -23.976, -47.932, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
+    {3, {11.988, -23.952, -47.864, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
+    {4, {11.982, -23.928, -47.796, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
+    {5, {11.976, -23.904, -47.728, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
+    {6, {11.97, -23.88, -47.66, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
+    {7, {11.964, -23.856, -47.592, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
+    {8, {11.958, -23.832, -47.524, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
+    {9, {11.952, -23.808, -47.456, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
+    {10, {11.946, -23.784, -47.388, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
+    {11, {11.94, -23.76, -47.32, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
+    {12, {11.934, -23.736, -47.252, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
+    {13, {11.928, -23.712, -47.184, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
+    {14, {11.922, -23.688, -47.116, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
+    {15, {11.916, -23.664, -47.048, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
+    {16, {11.91, -23.64, -46.98, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
+    {17, {11.904, -23.616, -46.912, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
+    {18, {11.898, -23.592, -46.844, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
+    {19, {11.892, -23.568, -46.776, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
+    {20, {11.886, -23.544, -46.708, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
+    {21, {11.88, -23.52, -46.64, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
+    {22, {11.874, -23.496, -46.572, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
+    {23, {11.868, -23.472, -46.504, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
+    {24, {11.862, -23.448, -46.436, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
+    {25,
         {11.856, -23.424, -46.3680000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {26,
+    {26,
         {11.85, -23.4, -46.3000000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {27,
+    {27,
         {11.844, -23.376, -46.2320000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {28,
+    {28,
         {11.838, -23.352, -46.1640000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {29,
+    {29,
         {11.832, -23.328, -46.0960000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {30,
+    {30,
         {11.826, -23.304, -46.0280000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {31,
+    {31,
         {11.82, -23.28, -45.9600000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {32,
+    {32,
         {11.814, -23.256, -45.8920000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {33,
+    {33,
         {11.808, -23.232, -45.8240000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {34,
+    {34,
         {11.802, -23.208, -45.7560000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {35,
+    {35,
         {11.796, -23.184, -45.6880000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {36,
+    {36,
         {11.79, -23.16, -45.6200000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {37,
+    {37,
         {11.784, -23.136, -45.5520000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {38,
+    {38,
         {11.778, -23.112, -45.4840000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {39,
+    {39,
         {11.772, -23.088, -45.4160000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {40,
+    {40,
         {11.766, -23.064, -45.3480000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {41,
+    {41,
         {11.76, -23.04, -45.2800000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {42,
+    {42,
         {11.754, -23.016, -45.2120000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {43,
+    {43,
         {11.748, -22.992, -45.1440000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {44,
+    {44,
         {11.742, -22.968, -45.0760000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {45,
+    {45,
         {11.736, -22.944, -45.0080000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {46,
+    {46,
         {11.73, -22.92, -44.9400000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {47,
+    {47,
         {11.724, -22.896, -44.8720000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {48,
+    {48,
         {11.718, -22.872, -44.8040000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {49,
+    {49,
         {11.712, -22.848, -44.7360000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {50,
+    {50,
         {11.706, -22.824, -44.6680000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {51, {11.7, -22.8, -44.6000000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {52,
+    {51, {11.7, -22.8, -44.6000000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
+    {52,
         {11.694, -22.776, -44.5320000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {53,
+    {53,
         {11.688, -22.752, -44.4640000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {54,
+    {54,
         {11.682, -22.728, -44.3960000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {55,
+    {55,
         {11.676, -22.704, -44.3280000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1, 0, 0, 0}},
-       {56,
+    {56,
         {11.67, -22.6799999999999, -44.2600000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {57,
+    {57,
         {11.664, -22.6559999999999, -44.1920000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {58,
+    {58,
         {11.658, -22.6319999999999, -44.1240000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {59,
+    {59,
         {11.652, -22.6079999999999, -44.0560000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {60,
+    {60,
         {11.646, -22.5839999999999, -43.9880000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {61,
+    {61,
         {11.64, -22.5599999999999, -43.9200000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {62,
+    {62,
         {11.634, -22.5359999999999, -43.8520000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {63,
+    {63,
         {11.628, -22.5119999999999, -43.7840000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {64,
+    {64,
         {11.622, -22.4879999999999, -43.7160000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {65,
+    {65,
         {11.616, -22.4639999999999, -43.6480000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {66,
+    {66,
         {11.61, -22.4399999999999, -43.5800000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {67,
+    {67,
         {11.604, -22.4159999999999, -43.5120000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {68,
+    {68,
         {11.598, -22.3919999999999, -43.4440000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {69,
+    {69,
         {11.592, -22.3679999999999, -43.3760000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {70,
+    {70,
         {11.586, -22.3439999999999, -43.3080000000001, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {71,
+    {71,
         {11.58, -22.3199999999999, -43.2400000000002, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {72,
+    {72,
         {11.574, -22.2959999999999, -43.1720000000002, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {73,
+    {73,
         {11.568, -22.2719999999999, -43.1040000000002, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {74,
+    {74,
         {11.562, -22.2479999999999, -43.0360000000002, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {75,
+    {75,
         {11.556, -22.2239999999999, -42.9680000000002, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {76,
+    {76,
         {11.55, -22.1999999999999, -42.9000000000002, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {77,
+    {77,
         {11.544, -22.1759999999999, -42.8320000000002, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {78,
+    {78,
         {11.538, -22.1519999999999, -42.7640000000002, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {79,
+    {79,
         {11.532, -22.1279999999999, -42.6960000000002, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {80,
+    {80,
         {11.526, -22.1039999999999, -42.6280000000002, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {81,
+    {81,
         {11.52, -22.0799999999999, -42.5600000000002, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {82,
+    {82,
         {11.514, -22.0559999999999, -42.4920000000002, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {83,
+    {83,
         {11.508, -22.0319999999999, -42.4240000000002, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {84,
+    {84,
         {11.502, -22.0079999999999, -42.3560000000002, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {85,
+    {85,
         {11.496, -21.9839999999999, -42.2880000000002, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {86,
+    {86,
         {11.49, -21.9599999999999, -42.2200000000002, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {87,
+    {87,
         {11.484, -21.9359999999999, -42.1520000000002, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {88,
+    {88,
         {11.478, -21.9119999999999, -42.0840000000002, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {89,
+    {89,
         {11.472, -21.8879999999999, -42.0160000000002, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {90,
+    {90,
         {11.466, -21.8639999999999, -41.9480000000002, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {91,
+    {91,
         {11.46, -21.8399999999999, -41.8800000000002, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {92,
+    {92,
         {11.454, -21.8159999999999, -41.8120000000002, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {93,
+    {93,
         {11.448, -21.7919999999999, -41.7440000000002, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {94,
+    {94,
         {11.442, -21.7679999999999, -41.6760000000002, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {95,
+    {95,
         {11.436, -21.7439999999999, -41.6080000000002, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {96,
+    {96,
         {11.43, -21.7199999999999, -41.5400000000002, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {97,
+    {97,
         {11.424, -21.6959999999999, -41.4720000000002, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {98,
+    {98,
         {11.418, -21.6719999999999, -41.4040000000002, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {99,
+    {99,
         {11.412, -21.6479999999999, -41.3360000000002, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}},
-       {100,
+    {100,
         {11.406, -21.6239999999999, -41.2680000000002, -0.3, 1.2, 3.4, 0, 0, 0, 1,
          0, 0, 0}}};
 
@@ -429,271 +429,271 @@ namespace TestPropagator3
 std::chrono::milliseconds dt = 500ms;
 int n                        = 100;
 Boardcore::NASState nas[]    = {
-       {1, {12, -24, -48, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
-       {2, {11.85, -23.4, -46.3, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
-       {3, {11.7, -22.8, -44.6, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
-       {4, {11.55, -22.2, -42.9, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
-       {5, {11.4, -21.6, -41.2, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
-       {6, {11.25, -21, -39.5, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
-       {7, {11.1, -20.4, -37.8, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
-       {8, {10.95, -19.8, -36.1, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
-       {9, {10.8, -19.2, -34.4, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
-       {10, {10.65, -18.6, -32.7, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
-       {11, {10.5, -18, -31, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
-       {12, {10.35, -17.4, -29.3, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
-       {13, {10.2, -16.8, -27.6, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
-       {14, {10.05, -16.2, -25.9, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
-       {15, {9.9, -15.6, -24.2, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
-       {16,
+    {1, {12, -24, -48, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
+    {2, {11.85, -23.4, -46.3, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
+    {3, {11.7, -22.8, -44.6, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
+    {4, {11.55, -22.2, -42.9, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
+    {5, {11.4, -21.6, -41.2, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
+    {6, {11.25, -21, -39.5, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
+    {7, {11.1, -20.4, -37.8, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
+    {8, {10.95, -19.8, -36.1, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
+    {9, {10.8, -19.2, -34.4, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
+    {10, {10.65, -18.6, -32.7, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
+    {11, {10.5, -18, -31, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
+    {12, {10.35, -17.4, -29.3, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
+    {13, {10.2, -16.8, -27.6, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
+    {14, {10.05, -16.2, -25.9, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
+    {15, {9.9, -15.6, -24.2, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
+    {16,
         {9.74999999999999, -15, -22.5, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2,
          3}},
-       {17,
+    {17,
         {9.59999999999999, -14.4, -20.8, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2,
          3}},
-       {18,
+    {18,
         {9.44999999999999, -13.8, -19.1, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2,
          3}},
-       {19,
+    {19,
         {9.29999999999999, -13.2, -17.4, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2,
          3}},
-       {20,
+    {20,
         {9.14999999999999, -12.6, -15.7, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2,
          3}},
-       {21,
+    {21,
         {8.99999999999999, -12, -14, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
-       {22,
+    {22,
         {8.84999999999999, -11.4, -12.3, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2,
          3}},
-       {23,
+    {23,
         {8.69999999999999, -10.8, -10.6, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2,
          3}},
-       {24,
+    {24,
         {8.54999999999999, -10.2, -8.89999999999998, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {25,
+    {25,
         {8.39999999999999, -9.59999999999999, -7.19999999999998, -0.3, 1.2, 3.4,
          0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
-       {26,
+    {26,
         {8.24999999999999, -8.99999999999999, -5.49999999999998, -0.3, 1.2, 3.4,
          0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
-       {27,
+    {27,
         {8.09999999999999, -8.39999999999999, -3.79999999999998, -0.3, 1.2, 3.4,
          0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
-       {28,
+    {28,
         {7.94999999999999, -7.79999999999999, -2.09999999999998, -0.3, 1.2, 3.4,
          0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
-       {29,
+    {29,
         {7.79999999999999, -7.19999999999999, -0.399999999999984, -0.3, 1.2, 3.4,
          0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
-       {30,
+    {30,
         {7.64999999999999, -6.59999999999999, 1.30000000000002, -0.3, 1.2, 3.4,
          0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
-       {31,
+    {31,
         {7.49999999999999, -5.99999999999999, 3.00000000000002, -0.3, 1.2, 3.4,
          0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
-       {32,
+    {32,
         {7.34999999999999, -5.39999999999999, 4.70000000000002, -0.3, 1.2, 3.4,
          0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
-       {33,
+    {33,
         {7.19999999999999, -4.79999999999999, 6.40000000000002, -0.3, 1.2, 3.4,
          0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
-       {34,
+    {34,
         {7.04999999999999, -4.19999999999999, 8.10000000000002, -0.3, 1.2, 3.4,
          0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
-       {35,
+    {35,
         {6.89999999999999, -3.59999999999999, 9.80000000000001, -0.3, 1.2, 3.4,
          0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
-       {36,
+    {36,
         {6.74999999999999, -2.99999999999999, 11.5, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {37,
+    {37,
         {6.59999999999999, -2.39999999999999, 13.2, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {38,
+    {38,
         {6.44999999999999, -1.79999999999999, 14.9, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {39,
+    {39,
         {6.29999999999999, -1.19999999999999, 16.6, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {40,
+    {40,
         {6.14999999999999, -0.599999999999988, 18.3, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {41,
+    {41,
         {5.99999999999999, 1.17683640610267e-14, 20, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {42,
+    {42,
         {5.84999999999999, 0.600000000000012, 21.7, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {43,
+    {43,
         {5.69999999999999, 1.20000000000001, 23.4, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {44,
+    {44,
         {5.54999999999998, 1.80000000000001, 25.1, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {45,
+    {45,
         {5.39999999999998, 2.40000000000001, 26.8, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {46,
+    {46,
         {5.24999999999998, 3.00000000000001, 28.5, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {47,
+    {47,
         {5.09999999999998, 3.60000000000001, 30.2, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {48,
+    {48,
         {4.94999999999998, 4.20000000000001, 31.9, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {49,
+    {49,
         {4.79999999999998, 4.80000000000001, 33.6, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {50,
+    {50,
         {4.64999999999998, 5.40000000000001, 35.3, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {51,
+    {51,
         {4.49999999999998, 6.00000000000001, 37, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {52,
+    {52,
         {4.34999999999998, 6.60000000000001, 38.7, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {53,
+    {53,
         {4.19999999999998, 7.20000000000001, 40.4, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {54,
+    {54,
         {4.04999999999998, 7.80000000000001, 42.1, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {55,
+    {55,
         {3.89999999999998, 8.40000000000001, 43.8, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {56,
+    {56,
         {3.74999999999998, 9.00000000000001, 45.5, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {57,
+    {57,
         {3.59999999999998, 9.60000000000001, 47.2, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {58,
+    {58,
         {3.44999999999998, 10.2, 48.9, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2,
          3}},
-       {59,
+    {59,
         {3.29999999999998, 10.8, 50.6, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2,
          3}},
-       {60,
+    {60,
         {3.14999999999998, 11.4, 52.3, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2,
          3}},
-       {61,
+    {61,
         {2.99999999999998, 12, 54, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
-       {62,
+    {62,
         {2.84999999999998, 12.6, 55.7, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2,
          3}},
-       {63,
+    {63,
         {2.69999999999998, 13.2, 57.4, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2,
          3}},
-       {64,
+    {64,
         {2.54999999999998, 13.8, 59.1000000000001, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {65,
+    {65,
         {2.39999999999998, 14.4, 60.8000000000001, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {66,
+    {66,
         {2.24999999999998, 15, 62.5000000000001, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {67,
+    {67,
         {2.09999999999998, 15.6, 64.2000000000001, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {68,
+    {68,
         {1.94999999999998, 16.2, 65.9000000000001, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {69,
+    {69,
         {1.79999999999998, 16.8, 67.6000000000001, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {70,
+    {70,
         {1.64999999999998, 17.4, 69.3000000000001, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {71,
+    {71,
         {1.49999999999998, 18, 71.0000000000001, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {72,
+    {72,
         {1.34999999999998, 18.6, 72.7000000000001, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {73,
+    {73,
         {1.19999999999998, 19.2, 74.4000000000001, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {74,
+    {74,
         {1.04999999999998, 19.8, 76.1000000000001, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {75,
+    {75,
         {0.899999999999983, 20.4, 77.8000000000001, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {76,
+    {76,
         {0.749999999999983, 21, 79.5000000000001, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {77,
+    {77,
         {0.599999999999983, 21.6, 81.2000000000001, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {78,
+    {78,
         {0.449999999999983, 22.2, 82.9000000000001, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {79,
+    {79,
         {0.299999999999983, 22.8, 84.6000000000001, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {80,
+    {80,
         {0.149999999999983, 23.4, 86.3000000000001, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {81,
+    {81,
         {-1.71529457304587e-14, 24, 88.0000000000001, -0.3, 1.2, 3.4, 0.5, 0.5,
          0.5, 0.5, 1, 2, 3}},
-       {82,
+    {82,
         {-0.150000000000017, 24.6, 89.7000000000001, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {83,
+    {83,
         {-0.300000000000017, 25.2, 91.4000000000001, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {84,
+    {84,
         {-0.450000000000017, 25.8, 93.1000000000001, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {85,
+    {85,
         {-0.600000000000017, 26.4, 94.8000000000001, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {86,
+    {86,
         {-0.750000000000017, 27, 96.5000000000001, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {87,
+    {87,
         {-0.900000000000017, 27.6, 98.2000000000001, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {88,
+    {88,
         {-1.05000000000002, 28.2, 99.9000000000001, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5,
          0.5, 1, 2, 3}},
-       {89,
+    {89,
         {-1.20000000000002, 28.8, 101.6, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2,
          3}},
-       {90,
+    {90,
         {-1.35000000000002, 29.4, 103.3, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2,
          3}},
-       {91,
+    {91,
         {-1.50000000000002, 30, 105, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2, 3}},
-       {92,
+    {92,
         {-1.65000000000002, 30.6, 106.7, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2,
          3}},
-       {93,
+    {93,
         {-1.80000000000002, 31.2, 108.4, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2,
          3}},
-       {94,
+    {94,
         {-1.95000000000002, 31.8, 110.1, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2,
          3}},
-       {95,
+    {95,
         {-2.10000000000002, 32.4, 111.8, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2,
          3}},
-       {96,
+    {96,
         {-2.25000000000002, 33, 113.5, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2,
          3}},
-       {97,
+    {97,
         {-2.40000000000002, 33.6, 115.2, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2,
          3}},
-       {98,
+    {98,
         {-2.55000000000002, 34.2, 116.9, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2,
          3}},
-       {99,
+    {99,
         {-2.70000000000002, 34.8, 118.6, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2,
          3}},
-       {100,
+    {100,
         {-2.85000000000002, 35.4, 120.3, -0.3, 1.2, 3.4, 0.5, 0.5, 0.5, 0.5, 1, 2,
          3}}};
 
diff --git a/src/tests/catch/test-modulemanager.cpp b/src/tests/catch/test-modulemanager.cpp
index 9b0b96f5cbf9f64d090a4607ee7731bf2e57b94b..5b24e70dcf99643a08e3633c17ee9ca8f9337249 100644
--- a/src/tests/catch/test-modulemanager.cpp
+++ b/src/tests/catch/test-modulemanager.cpp
@@ -34,7 +34,7 @@ protected:
 
 public:
     virtual int getDummy() { return dummy; };
-    virtual void toggleDummy(){};
+    virtual void toggleDummy() {};
 };
 
 class HILSensors : public SensorsModule
diff --git a/src/tests/catch/test-sensormanager-catch.cpp b/src/tests/catch/test-sensormanager-catch.cpp
index 01ca815a316e1194964eeb4b8b1d4b98069028f8..78828284ca6a9a70da69d838fff0354de456110a 100644
--- a/src/tests/catch/test-sensormanager-catch.cpp
+++ b/src/tests/catch/test-sensormanager-catch.cpp
@@ -96,40 +96,40 @@ private:
     SensorSampler* samplerSensor5;
 
     TestSensor s1;
-    SensorInfo s1_info{
-        /*ID=*/"s1",
-        /*Period=*/1000,
-        /*Callback=*/[]() { std::cout << "Callback 1!" << std::endl; },
-        /*Enabled=*/true};
+    SensorInfo s1_info{/*ID=*/"s1",
+                       /*Period=*/1000,
+                       /*Callback=*/[]()
+                       { std::cout << "Callback 1!" << std::endl; },
+                       /*Enabled=*/true};
 
     TestSensor s2;
-    SensorInfo s2_info{
-        /*ID=*/"s2",
-        /*Period=*/1000ms,
-        /*Callback=*/[]() { std::cout << "Callback 2!" << std::endl; },
-        /*Enabled=*/false};
+    SensorInfo s2_info{/*ID=*/"s2",
+                       /*Period=*/1000ms,
+                       /*Callback=*/[]()
+                       { std::cout << "Callback 2!" << std::endl; },
+                       /*Enabled=*/false};
 
     TestSensor s3;
-    SensorInfo s3_info{
-        /*ID=*/"s3",
-        /*Period=*/500,
-        /*Callback=*/[]() { std::cout << "Callback 3!" << std::endl; },
-        /*Enabled=*/true};
+    SensorInfo s3_info{/*ID=*/"s3",
+                       /*Period=*/500,
+                       /*Callback=*/[]()
+                       { std::cout << "Callback 3!" << std::endl; },
+                       /*Enabled=*/true};
 
     TestSensor s4;
-    SensorInfo s4_info{
-        /*ID=*/"s4",
-        /*Period=*/1_hz,
-        /*Callback=*/[]() { std::cout << "Callback 4!" << std::endl; },
-        /*Enabled=*/true};
+    SensorInfo s4_info{/*ID=*/"s4",
+                       /*Period=*/1_hz,
+                       /*Callback=*/[]()
+                       { std::cout << "Callback 4!" << std::endl; },
+                       /*Enabled=*/true};
 
     // always failing self-test
     FailingSensorCatch s5;
-    SensorInfo s5_info{
-        /*ID=*/"s5",
-        /*Period=*/2000,
-        /*Callback=*/[]() { std::cout << "Callback 5!" << std::endl; },
-        /*Enabled=*/true};
+    SensorInfo s5_info{/*ID=*/"s5",
+                       /*Period=*/2000,
+                       /*Callback=*/[]()
+                       { std::cout << "Callback 5!" << std::endl; },
+                       /*Enabled=*/true};
 };
 
 TEST_CASE_METHOD(SensorManagerFixture,
diff --git a/src/tests/drivers/canbus/CanDriver/test-can-2way.cpp b/src/tests/drivers/canbus/CanDriver/test-can-2way.cpp
index 27a5f6190cee47a888abebe4659eb9e7df7fe608..446127e97c32de573c59dc0a2c73d58c6dc8e214 100644
--- a/src/tests/drivers/canbus/CanDriver/test-can-2way.cpp
+++ b/src/tests/drivers/canbus/CanDriver/test-can-2way.cpp
@@ -209,11 +209,12 @@ int main()
         CanRX::mode(Mode::ALTERNATE);
         CanTX::mode(Mode::ALTERNATE);
 #else
+        CanRX::alternateFunction(9);
+        CanTX::alternateFunction(9);
+
         CanRX::mode(Mode::ALTERNATE);
         CanTX::mode(Mode::ALTERNATE);
 
-        CanRX::alternateFunction(9);
-        CanTX::alternateFunction(9);
 #endif
     }
 
diff --git a/src/tests/drivers/canbus/CanDriver/test-can-filters.cpp b/src/tests/drivers/canbus/CanDriver/test-can-filters.cpp
index 3be71dbab2e7be6d5ee44ee0d1297e45c5169356..57f8aed738619a7d59d170731fb7af351d9a2204 100644
--- a/src/tests/drivers/canbus/CanDriver/test-can-filters.cpp
+++ b/src/tests/drivers/canbus/CanDriver/test-can-filters.cpp
@@ -63,11 +63,11 @@ int main()
     {
         miosix::FastInterruptDisableLock dLock;
 
-        CanRX::mode(Mode::ALTERNATE);
-        CanTX::mode(Mode::ALTERNATE);
-
         CanRX::alternateFunction(9);
         CanTX::alternateFunction(9);
+
+        CanRX::mode(Mode::ALTERNATE);
+        CanTX::mode(Mode::ALTERNATE);
     }
 
     CanbusDriver::CanbusConfig cfg;
diff --git a/src/tests/drivers/canbus/CanDriver/test-can-loopback.cpp b/src/tests/drivers/canbus/CanDriver/test-can-loopback.cpp
index f8ae585aa82387c48bc7f7fd2843eb3df54813be..0002deca04b27373cf21ff601e9ff2b450a8921b 100644
--- a/src/tests/drivers/canbus/CanDriver/test-can-loopback.cpp
+++ b/src/tests/drivers/canbus/CanDriver/test-can-loopback.cpp
@@ -91,11 +91,11 @@ int main()
     {
         miosix::FastInterruptDisableLock dLock;
 
-        CanRX::mode(Mode::ALTERNATE);
-        CanTX::mode(Mode::ALTERNATE);
-
         CanRX::alternateFunction(9);
         CanTX::alternateFunction(9);
+
+        CanRX::mode(Mode::ALTERNATE);
+        CanTX::mode(Mode::ALTERNATE);
     }
 
     load.start();
diff --git a/src/tests/drivers/test-dsgamma.cpp b/src/tests/drivers/test-dsgamma.cpp
index e454bb5b028c35e4458450b23c4d0a790017aa51..1637402e6bcbd3e939790dae56476ddf03a0553e 100644
--- a/src/tests/drivers/test-dsgamma.cpp
+++ b/src/tests/drivers/test-dsgamma.cpp
@@ -34,7 +34,7 @@ using miosix::Gpio;
 using miosix::Thread;
 
 // Protocol config
-//#define DATA_LEN 16384
+// #define DATA_LEN 16384
 
 /* DISCOVERY F429I*/
 typedef Gpio<GPIOA_BASE, 0> button;
diff --git a/src/tests/drivers/test-wiz5500.cpp b/src/tests/drivers/test-wiz5500.cpp
index 0fb14ebddece5e0f6abefca82e1ed2420bdf4ffd..e1805e4addc35c8819dfed42e28ad2772574de3d 100644
--- a/src/tests/drivers/test-wiz5500.cpp
+++ b/src/tests/drivers/test-wiz5500.cpp
@@ -45,12 +45,13 @@ SPIBus bus(SPI4);
 
 void setupBoard()
 {
-    sck::mode(Mode::ALTERNATE);
     sck::alternateFunction(5);
-    miso::mode(Mode::ALTERNATE);
+    sck::mode(Mode::ALTERNATE);
     miso::alternateFunction(5);
-    mosi::mode(Mode::ALTERNATE);
+    miso::mode(Mode::ALTERNATE);
     mosi::alternateFunction(5);
+    mosi::mode(Mode::ALTERNATE);
+
     cs::mode(Mode::OUTPUT);
     cs::high();
     intn::mode(Mode::INPUT);
diff --git a/src/tests/drivers/timer/test-counted-pwm.cpp b/src/tests/drivers/timer/test-counted-pwm.cpp
index 1338389edad03bcdff5b168b3da0a1195f7af406..0e95c2cc78a2afdbffa7c48f42388622590e1aaa 100644
--- a/src/tests/drivers/timer/test-counted-pwm.cpp
+++ b/src/tests/drivers/timer/test-counted-pwm.cpp
@@ -39,11 +39,11 @@ typedef Gpio<GPIOD_BASE, 12> tim4ch1;  // AF2
 
 int main()
 {
-    tim3ch1::mode(Mode::ALTERNATE);
     tim3ch1::alternateFunction(2);
+    tim3ch1::mode(Mode::ALTERNATE);
 
-    tim4ch1::mode(Mode::ALTERNATE);
     tim4ch1::alternateFunction(2);
+    tim4ch1::mode(Mode::ALTERNATE);
 
     CountedPWM pwm(
         TIM3, TimerUtils::Channel::CHANNEL_1, TimerUtils::TriggerSource::ITR3,
diff --git a/src/tests/drivers/timer/test-pwm.cpp b/src/tests/drivers/timer/test-pwm.cpp
index b6b3b014d584392b05e470dcbcc1450e58c365b6..ba8d05a27019e39a0585f0fb01c8b51ea7e6b49f 100644
--- a/src/tests/drivers/timer/test-pwm.cpp
+++ b/src/tests/drivers/timer/test-pwm.cpp
@@ -33,14 +33,14 @@ typedef Gpio<GPIOB_BASE, 8> ch4;
 
 int main()
 {
-    ch1::mode(Mode::ALTERNATE);
     ch1::alternateFunction(2);
-    ch2::mode(Mode::ALTERNATE);
+    ch1::mode(Mode::ALTERNATE);
     ch2::alternateFunction(2);
-    ch3::mode(Mode::ALTERNATE);
+    ch2::mode(Mode::ALTERNATE);
     ch3::alternateFunction(2);
-    ch4::mode(Mode::ALTERNATE);
+    ch3::mode(Mode::ALTERNATE);
     ch4::alternateFunction(3);
+    ch4::mode(Mode::ALTERNATE);
 
     PWM pwm(TIM3);
     PWM pwm2(TIM10);
diff --git a/src/tests/drivers/xbee/test-xbee-bidir.cpp b/src/tests/drivers/xbee/test-xbee-bidir.cpp
index 2066c9bd9782600f41d414dcc0808c0812e5689e..0aa00c84ac0035db2411e6328221824be7c89c1a 100644
--- a/src/tests/drivers/xbee/test-xbee-bidir.cpp
+++ b/src/tests/drivers/xbee/test-xbee-bidir.cpp
@@ -103,14 +103,15 @@ void configure()
         FastInterruptDisableLock dLock;
 
         // Set SPI pins to correct alternate mode
-        GpioSck::mode(Mode::ALTERNATE);
-        GpioMiso::mode(Mode::ALTERNATE);
-        GpioMosi::mode(Mode::ALTERNATE);
 
         GpioSck::alternateFunction(5);
         GpioMiso::alternateFunction(5);
         GpioMosi::alternateFunction(5);
 
+        GpioSck::mode(Mode::ALTERNATE);
+        GpioMiso::mode(Mode::ALTERNATE);
+        GpioMosi::mode(Mode::ALTERNATE);
+
         GpioATTN::mode(Mode::INPUT);
 
         GpioLedLog::mode(Mode::OUTPUT);
diff --git a/src/tests/drivers/xbee/test-xbee-gui.cpp b/src/tests/drivers/xbee/test-xbee-gui.cpp
index 7a7309ae904cc7beef2a6ba3fa5239a766641ec8..6b3099ff52659cc4907a063bf263d656c8db2ef3 100644
--- a/src/tests/drivers/xbee/test-xbee-gui.cpp
+++ b/src/tests/drivers/xbee/test-xbee-gui.cpp
@@ -324,14 +324,15 @@ void setupXbee(XbeeConfig config)
 void configure()
 {
     // Set SPI pins to correct alternate mode
-    GpioSck::mode(Mode::ALTERNATE);
-    GpioMiso::mode(Mode::ALTERNATE);
-    GpioMosi::mode(Mode::ALTERNATE);
 
     GpioSck::alternateFunction(5);
     GpioMiso::alternateFunction(5);
     GpioMosi::alternateFunction(5);
 
+    GpioSck::mode(Mode::ALTERNATE);
+    GpioMiso::mode(Mode::ALTERNATE);
+    GpioMosi::mode(Mode::ALTERNATE);
+
     GpioATTN::mode(Mode::INPUT_PULL_UP);
 
     GpioLedLog::mode(Mode::OUTPUT);
diff --git a/src/tests/radio/test-mavlinkdriver.cpp b/src/tests/radio/test-mavlinkdriver.cpp
index 812c1566470528c2554e3d6f5e6552c45f4272c1..86bc11da2a326f03ae799f7e5f8ab8bd3d24a2fb 100644
--- a/src/tests/radio/test-mavlinkdriver.cpp
+++ b/src/tests/radio/test-mavlinkdriver.cpp
@@ -47,10 +47,10 @@ void payloadGenerator();
 
 int main()
 {
-    u2rx::mode(Mode::ALTERNATE);
     u2rx::alternateFunction(7);
-    u2tx::mode(Mode::ALTERNATE);
+    u2rx::mode(Mode::ALTERNATE);
     u2tx::alternateFunction(7);
+    u2tx::mode(Mode::ALTERNATE);
 
     TaskScheduler scheduler;
     scheduler.addTask(payloadGenerator, 2000);
diff --git a/src/tests/sensors/test-l3gd20-fifo.cpp b/src/tests/sensors/test-l3gd20-fifo.cpp
index 2800a87e71fcf97cb8e677028d3544a64cd2f8a0..03d6677eb7a3542c2b6e998a8b93a593504ba733 100644
--- a/src/tests/sensors/test-l3gd20-fifo.cpp
+++ b/src/tests/sensors/test-l3gd20-fifo.cpp
@@ -127,14 +127,14 @@ void __attribute__((used)) EXTI2_IRQHandlerImpl()
 
 void configure()
 {
-    GpioSck::mode(Mode::ALTERNATE);
-    GpioMiso::mode(Mode::ALTERNATE);
-    GpioMosi::mode(Mode::ALTERNATE);
-
     GpioSck::alternateFunction(5);
     GpioMiso::alternateFunction(5);
     GpioMosi::alternateFunction(5);
 
+    GpioSck::mode(Mode::ALTERNATE);
+    GpioMiso::mode(Mode::ALTERNATE);
+    GpioMosi::mode(Mode::ALTERNATE);
+
     // Interrupt
     GpioINT2::mode(Mode::INPUT_PULL_DOWN);
 
diff --git a/src/tests/sensors/test-l3gd20.cpp b/src/tests/sensors/test-l3gd20.cpp
index 8e9dad81fd0f8566194db0f320f3607fe8e9fefa..e9deb8b5cc76fd4595d662543d547d769549c68a 100644
--- a/src/tests/sensors/test-l3gd20.cpp
+++ b/src/tests/sensors/test-l3gd20.cpp
@@ -99,14 +99,14 @@ void __attribute__((used)) EXTI2_IRQHandlerImpl()
 void configure()
 {
     // Set SPI pins to correct alternate mode
-    GpioSck::mode(Mode::ALTERNATE);
-    GpioMiso::mode(Mode::ALTERNATE);
-    GpioMosi::mode(Mode::ALTERNATE);
-
     GpioSck::alternateFunction(5);
     GpioMiso::alternateFunction(5);
     GpioMosi::alternateFunction(5);
 
+    GpioSck::mode(Mode::ALTERNATE);
+    GpioMiso::mode(Mode::ALTERNATE);
+    GpioMosi::mode(Mode::ALTERNATE);
+
     // Setup interrupt pin (sensors pulls INT2 up, so we set it to PULL_DOWN
     // to avoid spurious interrupts)
     GpioINT2::mode(Mode::INPUT_PULL_DOWN);