Skip to content

Commit ef2ae8b

Browse files
committed
Add comments to examples and add GPS_MODE_SHIELD which maps to UART mode
1 parent 1479fb6 commit ef2ae8b

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

examples/GPSLocation/GPSLocation.ino

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
77
Circuit:
88
- MKR board
9-
- MKR GPS shield attached
9+
- MKR GPS attached via I2C cable
1010
1111
This example code is in the public domain.
1212
*/
@@ -20,6 +20,8 @@ void setup() {
2020
; // wait for serial port to connect. Needed for native USB port only
2121
}
2222

23+
// If you are using the MKR GPS as shield, change the next line to pass
24+
// the GPS_MODE_SHIELD parameter to the GPS.begin(...)
2325
if (!GPS.begin()) {
2426
Serial.println("Failed to initialize GPS!");
2527
while (1);

examples/GPSLocationStandy/GPSLocationStandy.ino

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
99
Circuit:
1010
- MKR board
11-
- MKR GPS shield attached
11+
- MKR GPS attached via I2C cable
1212
1313
This example code is in the public domain.
1414
*/
@@ -22,6 +22,8 @@ void setup() {
2222
; // wait for serial port to connect. Needed for native USB port only
2323
}
2424

25+
// If you are using the MKR GPS as shield, change the next line to pass
26+
// the GPS_MODE_SHIELD parameter to the GPS.begin(...)
2527
if (!GPS.begin()) {
2628
Serial.println("Failed to initialize GPS!");
2729
while (1);

keywords.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,4 @@ wakeup KEYWORD2
3434

3535
GPS_MODE_UART LITERAL1
3636
GPS_MODE_I2C LITERAL1
37+
GPS_MODE_SHIELD LITERAL1

src/GPS.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ enum
2828
{
2929
GPS_MODE_UART,
3030
GPS_MODE_I2C,
31+
GPS_MODE_SHIELD = GPS_MODE_UART
3132
};
3233

3334
class GPSClass {

0 commit comments

Comments
 (0)