Skip to content

Commit 0e6e0a6

Browse files
committed
Correctly return uint16
1 parent ddea771 commit 0e6e0a6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/SparkFun_u-blox_GNSS_Arduino_Library.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8236,7 +8236,10 @@ uint16_t SFE_UBLOX_GNSS::getNAV5PositionAccuracy(uint16_t maxWait)
82368236
if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are expecting data and an ACK
82378237
return 0;
82388238

8239-
return (payloadCfg[18]);
8239+
8240+
uint16_t pAcc = ((uint16_t)payloadCfg[19]) << 8;
8241+
pAcc |= payloadCfg[18];
8242+
return (pAcc);
82408243
}
82418244

82428245

0 commit comments

Comments
 (0)