@@ -151,18 +151,22 @@ void gnssReadTask(void *e)
151151 while (serialGNSS.available ())
152152 {
153153 // Read the data from UART1
154- incomingData = serialGNSS.read ();
154+ uint8_t incomingData[500 ];
155+ int bytesIncoming = serialGNSS.read (incomingData, sizeof (incomingData));
155156
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;
159162
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] );
163166
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+ }
166170 }
167171 }
168172 else // SPI GNSS
@@ -663,8 +667,8 @@ void ButtonCheckTask(void *e)
663667 if (millis () - lastRockerSwitchChange < 500 )
664668 {
665669 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
668672 else
669673 requestChangeState (STATE_WIFI_CONFIG_NOT_STARTED);
670674 }
0 commit comments