Skip to content
This repository was archived by the owner on Jan 28, 2021. It is now read-only.

Commit 92eb39f

Browse files
author
Nathan Seidle
committed
Update Example19_DynamicModel.ino
1 parent e2cc3b3 commit 92eb39f

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

examples/Example19_DynamicModel/Example19_DynamicModel.ino

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,17 @@ long lastTime = 0; //Simple local timer. Limits amount if I2C traffic to Ublox m
4545
void setup()
4646
{
4747
Serial.begin(115200);
48-
while (!Serial); //Wait for user to open terminal
48+
while (!Serial)
49+
; //Wait for user to open terminal
4950
Serial.println("SparkFun Ublox Example");
5051

5152
Wire.begin();
5253

5354
if (myGPS.begin() == false) //Connect to the Ublox module using Wire port
5455
{
5556
Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing."));
56-
while (1);
57+
while (1)
58+
;
5759
}
5860

5961
//myGPS.enableDebugging(); // Uncomment this line to enable debug messages
@@ -62,16 +64,16 @@ void setup()
6264
// If we are going to change the dynamic platform model, let's do it here.
6365
// Possible values are:
6466
// PORTABLE, STATIONARY, PEDESTRIAN, AUTOMOTIVE, SEA, AIRBORNE1g, AIRBORNE2g, AIRBORNE4g, WRIST, BIKE
65-
66-
if (!myGPS.setDynamicModel(myGPS.PORTABLE)) // Set the dynamic model to PORTABLE
67+
68+
if (myGPS.setDynamicModel(DYN_MODEL_PORTABLE) == false) // Set the dynamic model to PORTABLE
6769
{
6870
Serial.println("***!!! Warning: setDynamicModel failed !!!***");
6971
}
7072
else
7173
{
7274
Serial.println("Dynamic platform model changed successfully!");
7375
}
74-
76+
7577
//myGPS.saveConfiguration(); //Uncomment this line to save the current settings to flash and BBR
7678
}
7779

@@ -82,7 +84,7 @@ void loop()
8284
if (millis() - lastTime > 1000)
8385
{
8486
lastTime = millis(); //Update the timer
85-
87+
8688
long latitude = myGPS.getLatitude();
8789
Serial.print(F("Lat: "));
8890
Serial.print(latitude);

0 commit comments

Comments
 (0)