Change maximum_payload_size to uint16_t. Avoids compiler warning on Nano 33

This commit is contained in:
PaulZC
2021-05-08 06:15:14 +01:00
parent 36f696fa57
commit 7a98242f10
+1 -1
View File
@@ -1458,7 +1458,7 @@ void SFE_UBLOX_GNSS::processUBX(uint8_t incoming, ubxPacket *incomingUBX, uint8_
//If incomingUBX is a user-defined custom packet, then the payload size could be different to packetCfgPayloadSize.
//TO DO: update this to prevent an overrun when receiving an automatic message
// and the incomingUBX payload size is smaller than packetCfgPayloadSize.
size_t maximum_payload_size;
uint16_t maximum_payload_size;
if (activePacketBuffer == SFE_UBLOX_PACKET_PACKETCFG)
maximum_payload_size = packetCfgPayloadSize;
else if (activePacketBuffer == SFE_UBLOX_PACKET_PACKETAUTO)