diff --git a/sufst-controller/wireless.cpp b/sufst-controller/wireless.cpp index d41d4e4239a0e36c25c525e0b370343b240127af..a1b11fed3ffa7bd7c104faba0c1277e9ee4fec12 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); } }