Skip to content

Commit 006dcb4

Browse files
authored
Merge pull request #62 from sparkfun/release_candidate
v2.0.14 - correct #61 - thank you @Valrakk
2 parents 9f301c8 + 1aef0bb commit 006dcb4

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

Diff for: library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=SparkFun u-blox GNSS Arduino Library
2-
version=2.0.13
2+
version=2.0.14
33
author=SparkFun Electronics <[email protected]>
44
maintainer=SparkFun Electronics <sparkfun.com>
55
sentence=Library for I2C and Serial Communication with u-blox GNSS modules<br/><br/>

Diff for: src/SparkFun_u-blox_GNSS_Arduino_Library.cpp

+6-5
Original file line numberDiff line numberDiff line change
@@ -2933,29 +2933,30 @@ sfe_ublox_status_e SFE_UBLOX_GNSS::sendI2cCommand(ubxPacket *outgoingUBX, uint16
29332933
len = i2cTransactionSize;
29342934

29352935
_i2cPort->beginTransmission((uint8_t)_gpsI2Caddress);
2936-
//_i2cPort->write(outgoingUBX->payload, len); //Write a portion of the payload to the bus
29372936

29382937
for (uint16_t x = 0; x < len; x++)
29392938
_i2cPort->write(outgoingUBX->payload[startSpot + x]); //Write a portion of the payload to the bus
29402939

29412940
if (_i2cPort->endTransmission(false) != 0) //Don't release bus
29422941
return (SFE_UBLOX_STATUS_I2C_COMM_FAILURE); //Sensor did not ACK
29432942

2944-
//*outgoingUBX->payload += len; //Move the pointer forward
29452943
startSpot += len; //Move the pointer forward
29462944
bytesToSend -= len;
29472945
}
29482946

2949-
//Write checksum
29502947
_i2cPort->beginTransmission((uint8_t)_gpsI2Caddress);
2951-
if (bytesToSend == 1)
2952-
_i2cPort->write(outgoingUBX->payload, 1);
2948+
2949+
if (bytesToSend == 1) //Send the single remaining byte if there is one
2950+
_i2cPort->write(outgoingUBX->payload[startSpot], 1); // Thank you @Valrakk #61
2951+
2952+
//Write checksum
29532953
_i2cPort->write(outgoingUBX->checksumA);
29542954
_i2cPort->write(outgoingUBX->checksumB);
29552955

29562956
//All done transmitting bytes. Release bus.
29572957
if (_i2cPort->endTransmission() != 0)
29582958
return (SFE_UBLOX_STATUS_I2C_COMM_FAILURE); //Sensor did not ACK
2959+
29592960
return (SFE_UBLOX_STATUS_SUCCESS);
29602961
}
29612962

0 commit comments

Comments
 (0)