Skip to content

Merging release_candidate for v1.0.1 #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# How to Contribute

Thank you so *much* for offering to help out. We truly appreciate it.

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.
Please check the [closed issues](https://github.com/sparkfun/SparkFun_u-blox_SARA-R5_Arduino_Library/issues?q=is%3Aissue+is%3Aclosed)
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.

If you decide to add a feature to this library, please create a PR and follow these best practices:

* Change as little as possible. Do not submit a PR that changes 100 lines of whitespace. Break up into multiple PRs if necessary.
* 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.
* 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).
* **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

![Contributing.JPG](./img/Contributing.JPG)

## Style guide

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).
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,18 @@ SparkFun u-blox SARA-R5 Arduino Library

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

Repository Contents
-------------------
## Repository Contents

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

Documentation
-------------
## Contributing

If you would like to contribute to this library: please do, we truly appreciate it, but please follow [these guidelines](./CONTRIBUTING.md). Thanks!

## Documentation

* **[Installing an Arduino Library Guide](https://learn.sparkfun.com/tutorials/installing-an-arduino-library)** - Basic information on how to install an Arduino library.
* **[Product Repository](https://github.com/sparkfun/MicroMod_Asset_Tracker)** - MicroMod Asset Tracker repository (including hardware files).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ void setup()

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

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

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

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

// Set the UTIME mode to pulse-per-second output using a best effort from GNSS and LTE
mySARA.setUtimeMode(); // Use defaults (mode = SARA_R5_UTIME_MODE_PPS, sensor = SARA_R5_UTIME_SENSOR_GNSS_LTE)

mySARA.gpsEnableRmc(); // Enable GPRMC messages
}

void loop()
Expand Down
Binary file added img/Contributing.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=SparkFun u-blox SARA-R5 Arduino Library
version=1.0.0
version=1.0.1
author=SparkFun Electronics <techsupport@sparkfun.com>
maintainer=SparkFun Electronics <sparkfun.com>
sentence=Library for the u-blox SARA-R5 LTE-M / NB-IoT modules with secure cloud
Expand Down
18 changes: 10 additions & 8 deletions src/SparkFun_u-blox_SARA-R5_Arduino_Library.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2847,14 +2847,16 @@ SARA_R5_error_t SARA_R5::gpsEnableRmc(boolean enable)
SARA_R5_error_t err;
char *command;

if (!isGPSon())
{
err = gpsPower(true);
if (err != SARA_R5_ERROR_SUCCESS)
{
return err;
}
}
// ** Don't call gpsPower here. It causes problems for +UTIME and the PPS signal **
// ** Call isGPSon and gpsPower externally if required **
// if (!isGPSon())
// {
// err = gpsPower(true);
// if (err != SARA_R5_ERROR_SUCCESS)
// {
// return err;
// }
// }

command = sara_r5_calloc_char(strlen(SARA_R5_GNSS_GPRMC) + 3);
if (command == NULL)
Expand Down