From e7f6d321dd41f7281bad39927b5167b1fda0e907 Mon Sep 17 00:00:00 2001 From: Damjan Adamic Date: Thu, 6 Oct 2016 10:31:26 +0200 Subject: [PATCH] Telemetry simulator latitude and longitude were exchanged with each other --- companion/src/simulation/telemetrysimu.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/companion/src/simulation/telemetrysimu.cpp b/companion/src/simulation/telemetrysimu.cpp index f36e95ab3..229d2ab95 100644 --- a/companion/src/simulation/telemetrysimu.cpp +++ b/companion/src/simulation/telemetrysimu.cpp @@ -496,11 +496,11 @@ TelemetrySimulator::GPSEmulator::GPSEmulator() uint32_t TelemetrySimulator::GPSEmulator::encodeLatLon(double latLon, bool isLat) { uint32_t data = (uint32_t)((latLon < 0 ? -latLon : latLon) * 60 * 10000) & 0x3FFFFFFF; - if (isLat == false) { - data |= 0x80000000; + if (isLat) { + data |= (1 << 31); } if (latLon < 0) { - data |= 0x40000000; + data |= (1 << 30); } return data; }