@@ -62,7 +62,7 @@ const int ringBufferConsumerEntries = sizeof(ringBufferConsumer) / sizeof(ringBu
6262// Locals
6363// ----------------------------------------
6464
65- volatile static uint16_t dataHead; // Head advances as data comes in from GNSS's UART
65+ volatile static RING_BUFFER_OFFSET dataHead; // Head advances as data comes in from GNSS's UART
6666volatile int32_t availableHandlerSpace; // settings.gnssHandlerBufferSize - usedSpace
6767volatile const char *slowConsumer;
6868
@@ -339,12 +339,12 @@ void gnssReadTask(void *e)
339339}
340340
341341// Process a complete message incoming from parser
342- // If we get a complete NMEA/UBX/RTCM sentence, pass on to SD/BT/TCP interfaces
342+ // If we get a complete NMEA/UBX/RTCM sentence, pass on to SD/BT/PVT interfaces
343343void processUart1Message (PARSE_STATE *parse, uint8_t type)
344344{
345345 int32_t bytesToCopy;
346346 const char *consumer;
347- uint16_t remainingBytes;
347+ RING_BUFFER_OFFSET remainingBytes;
348348 int32_t space;
349349 int32_t use;
350350
@@ -424,7 +424,7 @@ void processUart1Message(PARSE_STATE *parse, uint8_t type)
424424}
425425
426426// If new data is in the ringBuffer, dole it out to appropriate interface
427- // Send data out Bluetooth, record to SD, or send over TCP
427+ // Send data out Bluetooth, record to SD, or send to network clients
428428// Each device (Bluetooth, SD and network client) gets its own tail. If the
429429// device is running too slowly then data for that device is dropped.
430430// The usedSpace variable tracks the total space in use in the buffer.
@@ -438,16 +438,14 @@ void handleGnssDataTask(void *e)
438438 uint32_t startMillis;
439439 int32_t usedSpace;
440440
441- static uint16_t btTail; // BT Tail advances as it is sent over BT
442- static uint16_t tcpTailEthernet; // TCP client tail
443- static uint16_t sdTail; // SD Tail advances as it is recorded to SD
441+ static RING_BUFFER_OFFSET btTail; // BT Tail advances as it is sent over BT
442+ static RING_BUFFER_OFFSET sdTail; // SD Tail advances as it is recorded to SD
444443
445444 // Initialize the tails
446445 btTail = 0 ;
447446 pvtClientZeroTail ();
448447 pvtServerZeroTail ();
449448 sdTail = 0 ;
450- tcpTailEthernet = 0 ;
451449
452450 while (true )
453451 {
@@ -530,7 +528,7 @@ void handleGnssDataTask(void *e)
530528 }
531529
532530 // ----------------------------------------------------------------------
533- // Send data to the WiFi TCP clients
531+ // Send data to the network clients
534532 // ----------------------------------------------------------------------
535533
536534 startMillis = millis ();
@@ -1377,7 +1375,7 @@ bool tasksStartUART2()
13771375 &gnssReadTaskHandle, // Task handle
13781376 settings.gnssReadTaskCore ); // Core where task should run, 0=core, 1=Arduino
13791377
1380- // Reads data from circular buffer and sends data to SD, SPP, or TCP
1378+ // Reads data from circular buffer and sends data to SD, SPP, or network clients
13811379 if (handleGnssDataTaskHandle == nullptr )
13821380 xTaskCreatePinnedToCore (handleGnssDataTask, // Function to call
13831381 " handleGNSSData" , // Just for humans
0 commit comments