From b4a129ed831d38866c5e0b175fffd28db98c0277 Mon Sep 17 00:00:00 2001
From: nrs1g15 <nrs1g15@soton.ac.uk>
Date: Thu, 1 Aug 2019 23:16:22 +0100
Subject: [PATCH] updated

---
 sufst-controller/wireless.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sufst-controller/wireless.cpp b/sufst-controller/wireless.cpp
index d41d4e4..a1b11fe 100644
--- a/sufst-controller/wireless.cpp
+++ b/sufst-controller/wireless.cpp
@@ -37,11 +37,11 @@ void wirelessProcess()
         if (XBEE_SERIAL.availableForWrite() >= WIRELESS_PAYLOAD_LEN) {
             static uint8_t payload[WIRELESS_PAYLOAD_LEN];
 
+            cirBufferReadBytes(&wirelessTxCirBuffer, payload, WIRELESS_PAYLOAD_LEN);
+
             tx64Request.setPayload(payload);
             tx64Request.setPayloadLength(WIRELESS_PAYLOAD_LEN);
 
-            cirBufferReadBytes(&wirelessTxCirBuffer, payload, WIRELESS_PAYLOAD_LEN);
-
             xbee.send(tx64Request);
         }
     }
-- 
GitLab