Skip to content
This repository was archived by the owner on Jan 28, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
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
Change default setVal to RAM+BBR+Flash. Expanding key set.
When a user wants to make a module configuration change they probably want the change to take effect immediately. The previous default of BBR didn't do a lot of good. I am also experimenting with generating key groups using defines.
  • Loading branch information
nseidle committed Oct 23, 2020
commit 6efce21799e739ed47c08ff98cd8da125d24a76e
10 changes: 5 additions & 5 deletions src/SparkFun_Ublox_Arduino_Library.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1662,7 +1662,7 @@ uint8_t SFE_UBLOX_GPS::getVal8(uint16_t group, uint16_t id, uint8_t size, uint8_

//Given a key, return its value
//This function takes a full 32-bit key
//Default layer is BBR
//Default layer is RAM
//Configuration of modern Ublox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P
uint8_t SFE_UBLOX_GPS::getVal8(uint32_t key, uint8_t layer, uint16_t maxWait)
{
Expand Down Expand Up @@ -1724,7 +1724,7 @@ uint8_t SFE_UBLOX_GPS::getVal8(uint32_t key, uint8_t layer, uint16_t maxWait)

//Given a key, set a 16-bit value
//This function takes a full 32-bit key
//Default layer is BBR
//Default layer is all: RAM+BBR+Flash
//Configuration of modern Ublox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P
uint8_t SFE_UBLOX_GPS::setVal(uint32_t key, uint16_t value, uint8_t layer, uint16_t maxWait)
{
Expand All @@ -1733,7 +1733,7 @@ uint8_t SFE_UBLOX_GPS::setVal(uint32_t key, uint16_t value, uint8_t layer, uint1

//Given a key, set a 16-bit value
//This function takes a full 32-bit key
//Default layer is BBR
//Default layer is all: RAM+BBR+Flash
//Configuration of modern Ublox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P
uint8_t SFE_UBLOX_GPS::setVal16(uint32_t key, uint16_t value, uint8_t layer, uint16_t maxWait)
{
Expand Down Expand Up @@ -1765,7 +1765,7 @@ uint8_t SFE_UBLOX_GPS::setVal16(uint32_t key, uint16_t value, uint8_t layer, uin

//Given a key, set an 8-bit value
//This function takes a full 32-bit key
//Default layer is BBR
//Default layer is all: RAM+BBR+Flash
//Configuration of modern Ublox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P
uint8_t SFE_UBLOX_GPS::setVal8(uint32_t key, uint8_t value, uint8_t layer, uint16_t maxWait)
{
Expand Down Expand Up @@ -1796,7 +1796,7 @@ uint8_t SFE_UBLOX_GPS::setVal8(uint32_t key, uint8_t value, uint8_t layer, uint1

//Given a key, set a 32-bit value
//This function takes a full 32-bit key
//Default layer is BBR
//Default layer is all: RAM+BBR+Flash
//Configuration of modern Ublox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P
uint8_t SFE_UBLOX_GPS::setVal32(uint32_t key, uint32_t value, uint8_t layer, uint16_t maxWait)
{
Expand Down
39 changes: 25 additions & 14 deletions src/SparkFun_Ublox_Arduino_Library.h
Original file line number Diff line number Diff line change
Expand Up @@ -353,21 +353,32 @@ const uint8_t VAL_SIZE_64 = 0x05; //Eight bytes
const uint8_t VAL_LAYER_RAM = (1 << 0);
const uint8_t VAL_LAYER_BBR = (1 << 1);
const uint8_t VAL_LAYER_FLASH = (1 << 2);
const uint8_t VAL_LAYER_ALL = VAL_LAYER_RAM | VAL_LAYER_BBR | VAL_LAYER_FLASH; //Not valid with getVal()

//Below are various Groups, IDs, and sizes for various settings
//These can be used to call getVal/setVal/delVal
const uint8_t VAL_GROUP_I2COUTPROT = 0x72;
const uint8_t VAL_GROUP_I2COUTPROT_SIZE = VAL_SIZE_1; //All fields in I2C group are currently 1 bit

const uint8_t VAL_ID_I2COUTPROT_UBX = 0x01;
const uint8_t VAL_ID_I2COUTPROT_NMEA = 0x02;
const uint8_t VAL_ID_I2COUTPROT_RTCM3 = 0x03;
const uint8_t VAL_ID_PROT_UBX = 0x01;
const uint8_t VAL_ID_PROT_NMEA = 0x02;
const uint8_t VAL_ID_PROT_RTCM3 = 0x04;

const uint8_t VAL_GROUP_I2COUTPROT = 0x72;
const uint8_t VAL_GROUP_UART1INPROT = 0x73;
const uint8_t VAL_GROUP_UART1OUTPROT = 0x74;
const uint8_t VAL_GROUP_I2C = 0x51;
const uint8_t VAL_GROUP_I2C_SIZE = VAL_SIZE_8; //All fields in I2C group are currently 1 byte

const uint8_t VAL_GROUP_UART_SIZE = VAL_SIZE_1; //All fields in UART group are currently 1 bit
const uint8_t VAL_GROUP_I2C_SIZE = VAL_SIZE_8; //All fields in I2C group are currently 1 byte

const uint8_t VAL_ID_I2C_ADDRESS = 0x01;

const uint32_t UBLOX_CFG_UART1INPROT_UBX = ((VAL_GROUP_UART_SIZE << 4) << (8 * 3)) | (VAL_GROUP_UART1INPROT << (8 * 2)) | (0x00 << (8 * 1)) | (VAL_ID_PROT_UBX << (8 * 0)); //0x10730001
const uint32_t UBLOX_CFG_UART1INPROT_NMEA = ((VAL_GROUP_UART_SIZE << 4) << (8 * 3)) | (VAL_GROUP_UART1INPROT << (8 * 2)) | (0x00 << (8 * 1)) | (VAL_ID_PROT_NMEA << (8 * 0));
const uint32_t UBLOX_CFG_UART1INPROT_RTCM3X = ((VAL_GROUP_UART_SIZE << 4) << (8 * 3)) | (VAL_GROUP_UART1INPROT << (8 * 2)) | (0x00 << (8 * 1)) | (VAL_ID_PROT_RTCM3 << (8 * 0));

const uint32_t UBLOX_CFG_UART1OUTPROT_UBX = ((VAL_GROUP_UART_SIZE << 4) << (8 * 3)) | (VAL_GROUP_UART1OUTPROT << (8 * 2)) | (0x00 << (8 * 1)) | (VAL_ID_PROT_UBX << (8 * 0));
const uint32_t UBLOX_CFG_UART1OUTPROT_NMEA = ((VAL_GROUP_UART_SIZE << 4) << (8 * 3)) | (VAL_GROUP_UART1OUTPROT << (8 * 2)) | (0x00 << (8 * 1)) | (VAL_ID_PROT_NMEA << (8 * 0));
const uint32_t UBLOX_CFG_UART1OUTPROT_RTCM3X = ((VAL_GROUP_UART_SIZE << 4) << (8 * 3)) | (VAL_GROUP_UART1OUTPROT << (8 * 2)) | (0x00 << (8 * 1)) | (VAL_ID_PROT_RTCM3 << (8 * 0));

// Configuration Sub-Section mask definitions for saveConfigSelective (UBX-CFG-CFG)
const uint32_t VAL_CFG_SUBSEC_IOPORT = 0x00000001; // ioPort - communications port settings (causes IO system reset!)
const uint32_t VAL_CFG_SUBSEC_MSGCONF = 0x00000002; // msgConf - message configuration
Expand Down Expand Up @@ -461,7 +472,7 @@ class SFE_UBLOX_GPS
//Control the size of the internal I2C transaction amount
void setI2CTransactionSize(uint8_t bufferSize);
uint8_t getI2CTransactionSize(void);

//Set the max number of bytes set in a given I2C transaction
uint8_t i2cTransactionSize = 32; //Default to ATmega328 limit

Expand Down Expand Up @@ -579,12 +590,12 @@ class SFE_UBLOX_GPS
//General configuration (used only on protocol v27 and higher - ie, ZED-F9P)
//It is probably safe to assume that users of the ZED-F9P will be using I2C / Qwiic.
//If they are using Serial then the higher baud rate will also help. So let's leave maxWait set to 250ms.
uint8_t getVal8(uint16_t group, uint16_t id, uint8_t size, uint8_t layer = VAL_LAYER_BBR, uint16_t maxWait = 250); //Returns the value at a given group/id/size location
uint8_t getVal8(uint32_t keyID, uint8_t layer = VAL_LAYER_BBR, uint16_t maxWait = 250); //Returns the value at a given group/id/size location
uint8_t setVal(uint32_t keyID, uint16_t value, uint8_t layer = VAL_LAYER_BBR, uint16_t maxWait = 250); //Sets the 16-bit value at a given group/id/size location
uint8_t setVal8(uint32_t keyID, uint8_t value, uint8_t layer = VAL_LAYER_BBR, uint16_t maxWait = 250); //Sets the 8-bit value at a given group/id/size location
uint8_t setVal16(uint32_t keyID, uint16_t value, uint8_t layer = VAL_LAYER_BBR, uint16_t maxWait = 250); //Sets the 16-bit value at a given group/id/size location
uint8_t setVal32(uint32_t keyID, uint32_t value, uint8_t layer = VAL_LAYER_BBR, uint16_t maxWait = 250); //Sets the 32-bit value at a given group/id/size location
uint8_t getVal8(uint16_t group, uint16_t id, uint8_t size, uint8_t layer = VAL_LAYER_RAM, uint16_t maxWait = 250); //Returns the value at a given group/id/size location
uint8_t getVal8(uint32_t keyID, uint8_t layer = VAL_LAYER_RAM, uint16_t maxWait = 250); //Returns the value at a given group/id/size location
uint8_t setVal(uint32_t keyID, uint16_t value, uint8_t layer = VAL_LAYER_ALL, uint16_t maxWait = 250); //Sets the 16-bit value at a given group/id/size location
uint8_t setVal8(uint32_t keyID, uint8_t value, uint8_t layer = VAL_LAYER_ALL, uint16_t maxWait = 250); //Sets the 8-bit value at a given group/id/size location
uint8_t setVal16(uint32_t keyID, uint16_t value, uint8_t layer = VAL_LAYER_ALL, uint16_t maxWait = 250); //Sets the 16-bit value at a given group/id/size location
uint8_t setVal32(uint32_t keyID, uint32_t value, uint8_t layer = VAL_LAYER_ALL, uint16_t maxWait = 250); //Sets the 32-bit value at a given group/id/size location
uint8_t newCfgValset8(uint32_t keyID, uint8_t value, uint8_t layer = VAL_LAYER_BBR); //Define a new UBX-CFG-VALSET with the given KeyID and 8-bit value
uint8_t newCfgValset16(uint32_t keyID, uint16_t value, uint8_t layer = VAL_LAYER_BBR); //Define a new UBX-CFG-VALSET with the given KeyID and 16-bit value
uint8_t newCfgValset32(uint32_t keyID, uint32_t value, uint8_t layer = VAL_LAYER_BBR); //Define a new UBX-CFG-VALSET with the given KeyID and 32-bit value
Expand Down