Closed
Description
In these function definitions, spotToStart
needs to be at least uint16_t:
uint32_t extractLong(ubxPacket *msg, uint8_t spotToStart);
int32_t extractSignedLong(ubxPacket *msg, uint8_t spotToStart);
uint16_t extractInt(ubxPacket *msg, uint8_t spotToStart);
int16_t extractSignedInt(ubxPacket *msg, int8_t spotToStart);
uint8_t extractByte(ubxPacket *msg, uint8_t spotToStart);
int8_t extractSignedChar(ubxPacket *msg, uint8_t spotToStart);
ubxPacket can be > 255 bytes. The UBX-NAV-SAT message contains an array of satellites; once this array size passes 20, corrupted data is returned from processUBXpacket when processing the incoming data using these extract functions, as "spotToStart" has a value > 255.
Can be tested with the CallbackExample7_NAV_SAT.ino - If the satellite list is > 20 satellites, corrupted data is displayed. Changing these function definitions to uint16_t resolves the issue.
Metadata
Metadata
Assignees
Labels
No labels