Skip to content

Commit eb8bc0a

Browse files
committed
Avoid compiler warnings
1 parent 7a98242 commit eb8bc0a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/SparkFun_u-blox_GNSS_Arduino_Library.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1435,7 +1435,7 @@ void SFE_UBLOX_GNSS::processRTCMframe(uint8_t incoming)
14351435
//This function is called for each byte of an RTCM frame
14361436
//Ths user can overwrite this function and process the RTCM frame as they please
14371437
//Bytes can be piped to Serial or other interface. The consumer could be a radio or the internet (Ntrip broadcaster)
1438-
void SFE_UBLOX_GNSS::processRTCM(uint8_t incoming)
1438+
void SFE_UBLOX_GNSS::processRTCM(uint8_t incoming) // IGNORE COMPILER WARNING unused parameter 'incoming'
14391439
{
14401440
//Radio.sendReliable((String)incoming); //An example of passing this byte to a radio
14411441

@@ -2404,7 +2404,7 @@ void SFE_UBLOX_GNSS::processUBXpacket(ubxPacket *msg)
24042404
packetUBXESFMEAS->data.timeTag = extractLong(msg, 0);
24052405
packetUBXESFMEAS->data.flags.all = extractInt(msg, 4);
24062406
packetUBXESFMEAS->data.id = extractInt(msg, 6);
2407-
for (int i = 0; (i < DEF_NUM_SENS) && (i < packetUBXESFMEAS->data.flags.bits.numMeas)
2407+
for (uint16_t i = 0; (i < DEF_NUM_SENS) && (i < packetUBXESFMEAS->data.flags.bits.numMeas)
24082408
&& ((i * 4) < (msg->len - 8)); i++)
24092409
{
24102410
packetUBXESFMEAS->data.data[i].data.all = extractLong(msg, 8 + (i * 4));
@@ -2435,7 +2435,7 @@ void SFE_UBLOX_GNSS::processUBXpacket(ubxPacket *msg)
24352435
//Parse various byte fields into storage - but only if we have memory allocated for it
24362436
if (packetUBXESFRAW != NULL)
24372437
{
2438-
for (int i = 0; (i < DEF_NUM_SENS) && ((i * 8) < (msg->len - 4)); i++)
2438+
for (uint16_t i = 0; (i < DEF_NUM_SENS) && ((i * 8) < (msg->len - 4)); i++)
24392439
{
24402440
packetUBXESFRAW->data.data[i].data.all = extractLong(msg, 4 + (i * 8));
24412441
packetUBXESFRAW->data.data[i].sTag = extractLong(msg, 8 + (i * 8));
@@ -2468,7 +2468,7 @@ void SFE_UBLOX_GNSS::processUBXpacket(ubxPacket *msg)
24682468
packetUBXESFSTATUS->data.version = extractByte(msg, 4);
24692469
packetUBXESFSTATUS->data.fusionMode = extractByte(msg, 12);
24702470
packetUBXESFSTATUS->data.numSens = extractByte(msg, 15);
2471-
for (int i = 0; (i < DEF_NUM_SENS) && (i < packetUBXESFSTATUS->data.numSens)
2471+
for (uint16_t i = 0; (i < DEF_NUM_SENS) && (i < packetUBXESFSTATUS->data.numSens)
24722472
&& ((i * 4) < (msg->len - 16)); i++)
24732473
{
24742474
packetUBXESFSTATUS->data.status[i].sensStatus1.all = extractByte(msg, 16 + (i * 4) + 0);
@@ -2771,7 +2771,7 @@ void SFE_UBLOX_GNSS::sendSerialCommand(ubxPacket *outgoingUBX)
27712771
_serialPort->write(outgoingUBX->len >> 8); //MSB
27722772

27732773
//Write payload.
2774-
for (int i = 0; i < outgoingUBX->len; i++)
2774+
for (uint16_t i = 0; i < outgoingUBX->len; i++)
27752775
{
27762776
_serialPort->write(outgoingUBX->payload[i]);
27772777
}
@@ -2823,7 +2823,7 @@ void SFE_UBLOX_GNSS::printPacket(ubxPacket *packet, boolean alwaysPrintPayload)
28232823
{
28242824
_debugSerial->print(F(" Payload:"));
28252825

2826-
for (int x = 0; x < packet->len; x++)
2826+
for (uint16_t x = 0; x < packet->len; x++)
28272827
{
28282828
_debugSerial->print(F(" "));
28292829
_debugSerial->print(packet->payload[x], HEX);
@@ -10143,7 +10143,7 @@ uint16_t SFE_UBLOX_GNSS::getMagAcc(uint16_t maxWait)
1014310143
}
1014410144

1014510145
// getGeoidSeparation is currently redundant. The geoid separation seems to only be provided in NMEA GGA and GNS messages.
10146-
int32_t SFE_UBLOX_GNSS::getGeoidSeparation(uint16_t maxWait)
10146+
int32_t SFE_UBLOX_GNSS::getGeoidSeparation(uint16_t maxWait) // IGNORE COMPILER WARNING unused parameter 'maxWait'
1014710147
{
1014810148
return (0);
1014910149
}

0 commit comments

Comments
 (0)