Skip to content

Commit c8d6314

Browse files
committed
Add setVal function
1 parent 1fa44b0 commit c8d6314

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/SparkFun_u-blox_GNSS_Arduino_Library.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,7 @@ enum sfe_ublox_ls_src_e
488488

489489
#ifndef MAX_PAYLOAD_SIZE
490490
// v2.0: keep this for backwards-compatibility, but this is largely superseded by setPacketCfgPayloadSize
491+
#define MAX_PAYLOAD_SIZE 256 //We need ~220 bytes for getProtocolVersion on most ublox modules
491492
//#define MAX_PAYLOAD_SIZE 768 //Worst case: UBX_CFG_VALSET packet with 64 keyIDs each with 64 bit values
492493
#endif
493494

@@ -754,6 +755,7 @@ class SFE_UBLOX_GNSS
754755
uint16_t getVal16(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
755756
uint32_t getVal32(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
756757
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
758+
uint8_t setVal(uint8_t *values, uint16_t len, uint8_t layer = VAL_LAYER_RAM, uint16_t maxWait = 250); //Send an array of keys and values
757759
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
758760
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
759761
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

0 commit comments

Comments
 (0)