Skip to content

Commit 263808b

Browse files
authored
Merge pull request #3 from sparkfun/release_candidate
Merging release_candidate for v1.0.1
2 parents daba8e1 + f913293 commit 263808b

File tree

6 files changed

+47
-20
lines changed

6 files changed

+47
-20
lines changed

CONTRIBUTING.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# How to Contribute
2+
3+
Thank you so *much* for offering to help out. We truly appreciate it.
4+
5+
If you'd like to contribute, start by searching through the [issues](https://github.com/sparkfun/SparkFun_u-blox_SARA-R5_Arduino_Library/issues) and [pull requests](https://github.com/sparkfun/SparkFun_u-blox_SARA-R5_Arduino_Library/pulls) to see whether someone else has raised a similar idea or question.
6+
Please check the [closed issues](https://github.com/sparkfun/SparkFun_u-blox_SARA-R5_Arduino_Library/issues?q=is%3Aissue+is%3Aclosed)
7+
and [closed pull requests](https://github.com/sparkfun/SparkFun_u-blox_SARA-R5_Arduino_Library/pulls?q=is%3Apr+is%3Aclosed) too - you may find that your issue or feature has already been discussed.
8+
9+
If you decide to add a feature to this library, please create a PR and follow these best practices:
10+
11+
* Change as little as possible. Do not submit a PR that changes 100 lines of whitespace. Break up into multiple PRs if necessary.
12+
* If you've added a new feature document it with a simple example sketch. This serves both as a test of your PR and as a quick way for users to quickly learn how to use your new feature.
13+
* If you add new functions also add them to _keywords.txt_ so that they are properly highlighted in Arduino. [Read more](https://www.arduino.cc/en/Hacking/libraryTutorial).
14+
* **Important:** Please submit your PR using the [release_candidate branch](https://github.com/sparkfun/SparkFun_u-blox_SARA-R5_Arduino_Library/tree/release_candidate). That way, we can merge and test your PR quickly without changing the _master_ branch
15+
16+
![Contributing.JPG](./img/Contributing.JPG)
17+
18+
## Style guide
19+
20+
Please read and follow the [Arduino API style guide](https://www.arduino.cc/en/Reference/APIStyleGuide). Also read and consider the [Arduino style guide](https://www.arduino.cc/en/Reference/StyleGuide).

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,18 @@ SparkFun u-blox SARA-R5 Arduino Library
33

44
An Arduino library for the u-blox SARA-R5 LTE-M / NB-IoT modules with secure cloud, as used on the SparkFun MicroMod Asset Tracker
55

6-
Repository Contents
7-
-------------------
6+
## Repository Contents
87

98
* **/examples** - Example sketches for the library (.ino). Run these from the Arduino IDE.
109
* **/src** - Source files for the library (.cpp, .h).
1110
* **keywords.txt** - Keywords from this library that will be highlighted in the Arduino IDE.
1211
* **library.properties** - General library properties for the Arduino package manager.
1312

14-
Documentation
15-
-------------
13+
## Contributing
14+
15+
If you would like to contribute to this library: please do, we truly appreciate it, but please follow [these guidelines](./CONTRIBUTING.md). Thanks!
16+
17+
## Documentation
1618

1719
* **[Installing an Arduino Library Guide](https://learn.sparkfun.com/tutorials/installing-an-arduino-library)** - Basic information on how to install an Arduino library.
1820
* **[Product Repository](https://github.com/sparkfun/MicroMod_Asset_Tracker)** - MicroMod Asset Tracker repository (including hardware files).

examples/SARA-R5_Example1_GNSS_GPRMC/SARA-R5_Example1_GNSS_GPRMC.ino

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ void setup()
5454

5555
// Wait for user to press key to begin
5656
Serial.println(F("SARA-R5 Example"));
57-
Serial.println(F("Press any key to begin GPS'ing"));
57+
Serial.println(F("Press any key to begin GNSS'ing"));
5858

5959
while (!Serial.available()) // Wait for the user to press a key (send any serial character)
6060
;
@@ -79,12 +79,13 @@ void setup()
7979

8080
// From the u-blox SARA-R5 Positioning Implementation Application Note UBX-20012413 - R01
8181
// To enable the PPS output we need to:
82-
// Configure GPIO6 for TIME_PULSE_OUTPUT: .init does this
83-
// Enable the timing information request with +UTIMEIND=1
84-
// Reset the time offset configuration with +UTIMECFG=0,0
85-
// Request PPS output using GNSS+LTE (Best effort) with +UTIME=1,1
86-
// The bit that doesn't seem to be mentioned in the documentation is that +UTIME=1,1 also
87-
// enables the GPS module and so we don't need to call gpsPower or gpsEnableRmc
82+
// Configure GPIO6 for TIME_PULSE_OUTPUT - .init does this
83+
// Enable the timing information request with +UTIMEIND=1 - setUtimeIndication()
84+
// Reset the time offset configuration with +UTIMECFG=0,0 - setUtimeConfiguration()
85+
// Request PPS output using GNSS+LTE (Best effort) with +UTIME=1,1 - setUtimeMode()
86+
// The bits that don't seem to be mentioned in the documentation are:
87+
// +UTIME=1,1 also enables the GNSS module and so we don't need to call gpsPower.
88+
// +UTIME=1,1 only works when the GNSS module if off. It returns an ERROR if the GNSS is already on.
8889

8990
// Enable the timing information request (URC)
9091
//mySARA.setUtimeIndication(); // Use default (SARA_R5_UTIME_URC_CONFIGURATION_ENABLED)
@@ -94,6 +95,8 @@ void setup()
9495

9596
// Set the UTIME mode to pulse-per-second output using a best effort from GNSS and LTE
9697
mySARA.setUtimeMode(); // Use defaults (mode = SARA_R5_UTIME_MODE_PPS, sensor = SARA_R5_UTIME_SENSOR_GNSS_LTE)
98+
99+
mySARA.gpsEnableRmc(); // Enable GPRMC messages
97100
}
98101

99102
void loop()

img/Contributing.JPG

60.7 KB
Loading

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=SparkFun u-blox SARA-R5 Arduino Library
2-
version=1.0.0
2+
version=1.0.1
33
author=SparkFun Electronics <[email protected]>
44
maintainer=SparkFun Electronics <sparkfun.com>
55
sentence=Library for the u-blox SARA-R5 LTE-M / NB-IoT modules with secure cloud

src/SparkFun_u-blox_SARA-R5_Arduino_Library.cpp

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2847,14 +2847,16 @@ SARA_R5_error_t SARA_R5::gpsEnableRmc(boolean enable)
28472847
SARA_R5_error_t err;
28482848
char *command;
28492849

2850-
if (!isGPSon())
2851-
{
2852-
err = gpsPower(true);
2853-
if (err != SARA_R5_ERROR_SUCCESS)
2854-
{
2855-
return err;
2856-
}
2857-
}
2850+
// ** Don't call gpsPower here. It causes problems for +UTIME and the PPS signal **
2851+
// ** Call isGPSon and gpsPower externally if required **
2852+
// if (!isGPSon())
2853+
// {
2854+
// err = gpsPower(true);
2855+
// if (err != SARA_R5_ERROR_SUCCESS)
2856+
// {
2857+
// return err;
2858+
// }
2859+
// }
28582860

28592861
command = sara_r5_calloc_char(strlen(SARA_R5_GNSS_GPRMC) + 3);
28602862
if (command == NULL)

0 commit comments

Comments
 (0)