From 5a07b8eea50eabcab0a55a7354da2e167a4dd031 Mon Sep 17 00:00:00 2001
From: dogmaphobic <mavlink@grubba.com>
Date: Sat, 30 Apr 2016 17:40:46 -0400
Subject: [PATCH] Windows can be such a pain in the butt...

---
 src/AutoPilotPlugins/Common/ESP8266ComponentController.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/AutoPilotPlugins/Common/ESP8266ComponentController.cc b/src/AutoPilotPlugins/Common/ESP8266ComponentController.cc
index 5bc49fbd5..36028db08 100644
--- a/src/AutoPilotPlugins/Common/ESP8266ComponentController.cc
+++ b/src/AutoPilotPlugins/Common/ESP8266ComponentController.cc
@@ -31,6 +31,7 @@
 #include "UAS.h"
 
 #include <QHostAddress>
+#include <QtEndian>
 
 QGC_LOGGING_CATEGORY(ESP8266ComponentControllerLog, "ESP8266ComponentControllerLog")
 
@@ -82,7 +83,7 @@ ESP8266ComponentController::wifiIPAddress()
 {
     if(_ipAddress.isEmpty()) {
         if(parameterExists(MAV_COMP_ID_UDP_BRIDGE, "WIFI_IPADDRESS")) {
-            QHostAddress address(ntohl(getParameterFact(MAV_COMP_ID_UDP_BRIDGE, "WIFI_IPADDRESS")->rawValue().toUInt()));
+            QHostAddress address(qFromBigEndian(getParameterFact(MAV_COMP_ID_UDP_BRIDGE, "WIFI_IPADDRESS")->rawValue().toUInt()));
             _ipAddress = address.toString();
         } else {
             _ipAddress = "192.168.4.1";
-- 
2.22.0