@@ -151,18 +151,22 @@ void gnssReadTask(void *e)
151
151
while (serialGNSS.available ())
152
152
{
153
153
// Read the data from UART1
154
- incomingData = serialGNSS.read ();
154
+ uint8_t incomingData[500 ];
155
+ int bytesIncoming = serialGNSS.read (incomingData, sizeof (incomingData));
155
156
156
- // Save the data byte
157
- parse.buffer [parse.length ++] = incomingData;
158
- parse.length %= PARSE_BUFFER_LENGTH;
157
+ for (int x = 0 ; x < bytesIncoming; x++)
158
+ {
159
+ // Save the data byte
160
+ parse.buffer [parse.length ++] = incomingData[x];
161
+ parse.length %= PARSE_BUFFER_LENGTH;
159
162
160
- // Compute the CRC value for the message
161
- if (parse.computeCrc )
162
- parse.crc = COMPUTE_CRC24Q (&parse, incomingData);
163
+ // Compute the CRC value for the message
164
+ if (parse.computeCrc )
165
+ parse.crc = COMPUTE_CRC24Q (&parse, incomingData[x] );
163
166
164
- // Update the parser state based on the incoming byte
165
- parse.state (&parse, incomingData);
167
+ // Update the parser state based on the incoming byte
168
+ parse.state (&parse, incomingData[x]);
169
+ }
166
170
}
167
171
}
168
172
else // SPI GNSS
@@ -663,8 +667,8 @@ void ButtonCheckTask(void *e)
663
667
if (millis () - lastRockerSwitchChange < 500 )
664
668
{
665
669
if (systemState == STATE_ROVER_NOT_STARTED && online.display == true ) // Catch during Power On
666
- requestChangeState (STATE_TEST); // If RTK Surveyor, with display attached, during Rover not
667
- // started, then enter test mode
670
+ requestChangeState (STATE_TEST); // If RTK Surveyor, with display attached, during Rover not
671
+ // started, then enter test mode
668
672
else
669
673
requestChangeState (STATE_WIFI_CONFIG_NOT_STARTED);
670
674
}
0 commit comments