Amir Chaudhary / Mbed OS MTDOT-BOX-EVB-Factory-Firmware

Dependencies:   NCP5623B GpsParser ISL29011 libmDot-mbed5 MTS-Serial MMA845x DOGS102 MPL3115A2

Revision:
12:05435282f899
Parent:
7:a31236c2e75c
--- a/Layout/LayoutSurveyGps.cpp	Thu Nov 10 22:10:58 2016 +0000
+++ b/Layout/LayoutSurveyGps.cpp	Tue Oct 09 13:49:30 2018 -0500
@@ -58,7 +58,7 @@
     writeLabel(_lPower);
     writeLabel(_lPadding);
      
-    if (_band == mDot::FB_US915 || _band == mDot::FB_AU915) {
+    if (lora::ChannelPlan::IsPlanFixed(_band)) {
         writeLabel(_lFSB);
     }
     if(success) {
@@ -80,7 +80,7 @@
     size = snprintf(buf, sizeof(buf), "%d", power);
     writeField(_fPower, buf, size, true);
     
-    if (_band == mDot::FB_US915 || _band == mDot::FB_AU915) {
+    if (lora::ChannelPlan::IsPlanFixed(_band)) {
         memset(buf, 0, sizeof(buf));
         size = snprintf(buf, sizeof(buf), "%d", fsb);
         writeField(_fFSB, buf, size, true);
@@ -131,19 +131,19 @@
 
     if(GPS) {
         size = snprintf(buf, sizeof(buf), "%d %d %d.%03d %c",
-                        abs(lon.degrees),
-                        lon.minutes,
-                        (lon.seconds * 6) / 1000,
-                        (lon.seconds * 6) % 1000,
+                        (int) abs(lon.degrees),
+                        (int)lon.minutes,
+                       (int)(lon.seconds * 6) / 1000,
+                        (int)(lon.seconds * 6) % 1000,
                         (lon.degrees > 0) ? 'E' : 'W');
         writeField(_fGpsLon, buf, size, true);
 
         memset(buf, 0, sizeof(buf));
         size = snprintf(buf, sizeof(buf), "%d %d %d.%03d %c",
-                        abs(lat.degrees),
-                        lat.minutes,
-                        (lat.seconds * 6) / 1000,
-                        (lat.seconds * 6) % 1000,
+                        (int)abs(lat.degrees),
+                        (int)lat.minutes,
+                        (int)(lat.seconds * 6) / 1000,
+                        (int)(lat.seconds * 6) % 1000,
                         (lat.degrees > 0) ? 'N' : 'S');
         writeField(_fGpsLat, buf, size, true);