From 13e6816d5ca51e0a113ede980b392024501ddd44 Mon Sep 17 00:00:00 2001 From: KW <45945080+Kian-Wee@users.noreply.github.com> Date: Fri, 28 Apr 2023 17:55:36 +0800 Subject: [PATCH] Possible UDP bugfix https://github.com/dogmaphobic/mavesp8266/issues/63 --- src/mavesp8266_vehicle.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mavesp8266_vehicle.cpp b/src/mavesp8266_vehicle.cpp index a5adba3..81c4ef8 100644 --- a/src/mavesp8266_vehicle.cpp +++ b/src/mavesp8266_vehicle.cpp @@ -94,7 +94,8 @@ MavESP8266Vehicle::readMessage() //-- Move the pending ones up the queue int left = _queue_count - sent; for(int i = 0; i < left; i++) { - memcpy(&_message[sent+i], &_message[i], sizeof(mavlink_message_t)); + //memcpy(&_message[sent+i], &_message[i], sizeof(mavlink_message_t)); + memcpy(&_message[i], &_message[sent+i], sizeof(mavlink_message_t)); } _queue_count = left; }