From 1d79c3e636e748259b46c4fb65515bf6f77105b9 Mon Sep 17 00:00:00 2001 From: Addy Gallareta Date: Thu, 6 Feb 2020 15:29:19 -0800 Subject: [PATCH] modify sending data format and remove radio defined --- longfi-us915/longfi-us915.ino | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/longfi-us915/longfi-us915.ino b/longfi-us915/longfi-us915.ino index ce5663b..ba54e2e 100644 --- a/longfi-us915/longfi-us915.ino +++ b/longfi-us915/longfi-us915.ino @@ -39,8 +39,6 @@ #define GPSSerial Serial1 -#define CFG_sx1276_radio 1 - // Connect to the GPS on the hardware port Adafruit_GPS GPS(&GPSSerial); @@ -254,14 +252,12 @@ void do_send(osjob_t* j){ if (GPS.fix) { Serial.println(GPS.latitudeDegrees); Serial.println(GPS.longitudeDegrees); - //data = GPS.latitude_fixed * (GPS.lat == 'N' ? 1 : -1) + 90 * 1E7; - data = (int)(GPS.latitudeDegrees * 1E7); + data = (int)(GPS.latitude_fixed * (GPS.lat == 'N' ? 1 : -1) + 90 * 1E7); payload[idx++] = data >> 24; payload[idx++] = data >> 16; payload[idx++] = data >> 8; payload[idx++] = data; - //data = GPS.longitude_fixed * (GPS.lon == 'E' ? 1 : -1) + 180 * 1E7; - data = (int)(GPS.longitudeDegrees * 1E7); + data = (int)(GPS.longitude_fixed * (GPS.lon == 'E' ? 1 : -1) + 180 * 1E7); payload[idx++] = data >> 24; payload[idx++] = data >> 16; payload[idx++] = data >> 8;