]> git.tnoah.ca Git - lora-radio.git/commitdiff
Cleanup
authorMark Qvist <mark@unsigned.io>
Fri, 11 Oct 2024 12:46:03 +0000 (14:46 +0200)
committerMark Qvist <mark@unsigned.io>
Fri, 11 Oct 2024 12:46:03 +0000 (14:46 +0200)
Utilities.h

index 6cc69c3efc2b9c5a1d3442739dbec343cd9ac43a..29523cf997a22f10173153df199f9756fedb33f5 100644 (file)
@@ -668,19 +668,17 @@ void serial_write(uint8_t byte) {
                        Serial.write(byte);
                } else {
                        SerialBT.write(byte);
-
-            #if MCU_VARIANT == MCU_NRF52 && HAS_BLE
-            // This ensures that the TX buffer is flushed after a frame is queued in serial.
-            // serial_in_frame is used to ensure that the flush only happens at the end of the frame
-            if (serial_in_frame && byte == FEND) {
-                SerialBT.flushTXD();
-                serial_in_frame = false;
-            }
-            else if (!serial_in_frame && byte == FEND) {
-                serial_in_frame = true;
-            }
-            #endif
-
+      #if MCU_VARIANT == MCU_NRF52 && HAS_BLE
+             // This ensures that the TX buffer is flushed after a frame is queued in serial.
+             // serial_in_frame is used to ensure that the flush only happens at the end of the frame
+             if (serial_in_frame && byte == FEND) {
+                 SerialBT.flushTXD();
+                 serial_in_frame = false;
+             }
+             else if (!serial_in_frame && byte == FEND) {
+                 serial_in_frame = true;
+             }
+      #endif
                }
        #else
                Serial.write(byte);