Skip to content

Commit e6fd94e

Browse files
committed
Clarify the message lengths
1 parent 9503bb7 commit e6fd94e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/u-blox_GNSS.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8952,7 +8952,7 @@ bool DevUBLOXGNSS::getUniqueChipId(UBX_SEC_UNIQID_data_t *data, uint16_t maxWait
89528952
data->uniqueId[i] = extractByte(&packetCfg, i + 4);
89538953

89548954
// The ID is five bytes on the F9 and M9 (version 1) but six bytes on the M10 (version 2)
8955-
if ((data->version == 2) && (packetCfg.len == 10))
8955+
if ((data->version == 2) && (packetCfg.len == UBX_SEC_UNIQID_LEN_VERSION2))
89568956
data->uniqueId[5] = extractByte(&packetCfg, 9);
89578957
else
89588958
data->uniqueId[5] = 0;

src/u-blox_structs.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2035,7 +2035,8 @@ typedef struct
20352035

20362036
// UBX-SEC-UNIQID (0x27 0x03): Unique chip ID
20372037
// The ID is five bytes on the F9 and M9 (version 1) but six bytes on the M10 (version 2)
2038-
const uint16_t UBX_SEC_UNIQID_LEN = 9;
2038+
const uint16_t UBX_SEC_UNIQID_LEN_VERSION1 = 9;
2039+
const uint16_t UBX_SEC_UNIQID_LEN_VERSION2 = 10;
20392040

20402041
typedef struct
20412042
{

0 commit comments

Comments
 (0)