Skip to content
This repository was archived by the owner on Jan 28, 2021. It is now read-only.
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
8895c9b
Change Ublox to u-blox
nseidle Oct 23, 2020
6efce21
Change default setVal to RAM+BBR+Flash. Expanding key set.
nseidle Oct 23, 2020
55bb4a2
Move keys to separate file
nseidle Oct 23, 2020
79679f8
Add getVal8/16/32. Add a bunch of keys.
nseidle Oct 23, 2020
583f528
Add getVal8/16/32 support for group/id/size combos.
nseidle Oct 23, 2020
0fb2fcf
Update Example1_GetSetPortSettings.ino
nseidle Oct 23, 2020
872520b
Update library.properties
nseidle Oct 23, 2020
8638c35
Add support for TMOD3 fixed position.
nseidle Oct 23, 2020
7114584
Merge pull request #133 from sparkfun/UBloxTextChange
PaulZC Oct 26, 2020
30bff51
Merge branch 'release_candidate' into Expand-getVal-setVal
PaulZC Oct 26, 2020
32f8583
Change function call vars to be more clear. Fix example with correct …
nseidle Oct 26, 2020
d4975d4
Resort and rename get/setVal examples in one chunk.
nseidle Oct 26, 2020
03a91e5
Remove duplicate define
nseidle Oct 26, 2020
5102d9f
Add MSGOUT keys. Update examples to use defined keys.
nseidle Oct 26, 2020
6239fc2
Adding header guard
nseidle Oct 26, 2020
50086e4
Merge pull request #135 from sparkfun/setStaticPosition
nseidle Oct 26, 2020
8be456c
Merge pull request #134 from sparkfun/Expand-getVal-setVal
nseidle Oct 26, 2020
5e5dcce
Update library.properties
nseidle Oct 26, 2020
5672e91
Merge pull request #136 from sparkfun/increaseLibVersion
nseidle Oct 26, 2020
9f72926
autoHPPOSLLH functions added - work in progress
PaulZC Oct 27, 2020
9bc3a2d
autoHPPOSLLH - almost ready
PaulZC Oct 27, 2020
1075c2e
Removing two incorrect inversions. These were preventing OVERWRITTEN …
PaulZC Oct 27, 2020
47c83da
Adding autoHPPOSLLH. Tested on the ZED-F9P.
PaulZC Oct 27, 2020
722afc4
Merge pull request #139 from sparkfun/autoHPPOSLLH
PaulZC Oct 27, 2020
f3af4a4
Fix typo. Convert keys to const uint32_ts.
Oct 27, 2020
3b30b92
Update Example11_autoHPPOSLLH.ino
PaulZC Oct 27, 2020
8b27b3e
Merge pull request #140 from sparkfun/autoHPPOSLLH
PaulZC Oct 27, 2020
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update Example1_GetSetPortSettings.ino
  • Loading branch information
nseidle committed Oct 23, 2020
commit 0fb2fcf4da2e53bc5f571af5521e5705c3d6c992
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
License: MIT. See license file for more information but you can
basically do whatever you want with this code.

This example shows how to query a u-blox module for its UART1 settings and
This example shows how to query a Ublox module for its UART1 settings and
then change them if the settings aren't what we want.

Note: getVal/setVal/delVal are only support in u-blox protocol versions 27 and higher.
Expand All @@ -33,17 +33,19 @@ void setup()
Serial.begin(115200);
while (!Serial)
; //Wait for user to open terminal
Serial.println("SparkFun u-blox Example");
Serial.println("SparkFun Ublox Example");

Wire.begin();

if (myGPS.begin() == false) //Connect to the Ublox module using Wire port
{
Serial.println(F("u-blox GPS not detected at default I2C address. Please check wiring. Freezing."));
Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing."));
while (1)
;
}

bool response = true;

//Read the settings from RAM (what the module is running right now, not BBR, Flash, or default)
uint8_t currentUART1Setting_ubx = myGPS.getVal8(UBLOX_CFG_UART1INPROT_UBX);
uint8_t currentUART1Setting_nmea = myGPS.getVal8(UBLOX_CFG_UART1INPROT_NMEA);
Expand All @@ -62,7 +64,6 @@ void setup()
Serial.println("Updating UART1 configuration");

//setVal sets the values for RAM, BBR, and Flash automatically so no .saveConfiguration() is needed
bool response = true;
response &= myGPS.setVal8(UBLOX_CFG_UART1INPROT_UBX, 1); //Enable UBX on UART1 Input
response &= myGPS.setVal8(UBLOX_CFG_UART1INPROT_NMEA, 1); //Enable NMEA on UART1 Input
response &= myGPS.setVal8(UBLOX_CFG_UART1INPROT_RTCM3X, 0); //Disable RTCM on UART1 Input
Expand All @@ -73,7 +74,23 @@ void setup()
Serial.println("SetVal succeeded");
}
else
Serial.println("Nothing to change");
Serial.println("No port change needed");

//Change speed of UART2
uint32_t currentUART2Baud = myGPS.getVal32(UBLOX_CFG_UART2_BAUDRATE);
Serial.print("currentUART2Baud: ");
Serial.println(currentUART2Baud);

if (currentUART2Baud != 57600)
{
response &= myGPS.setVal32(UBLOX_CFG_UART2_BAUDRATE, 57600);
if (response == false)
Serial.println("SetVal failed");
else
Serial.println("SetVal succeeded");
}
else
Serial.println("No baud change needed");

Serial.println("Done");
}
Expand Down