Merge pull request #105 from sellensr/master

Move declarations to class private
This commit is contained in:
Matt Goodrich 2020-01-07 15:11:02 -05:00 committed by GitHub
commit 5eab9c7e21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 10 deletions

View File

@ -30,18 +30,8 @@
#include <Adafruit_GPS.h>
#define MAXLINELENGTH 120 ///< how long are max NMEA lines to parse?
static boolean strStartsWith(const char* str, const char* prefix);
volatile char line1[MAXLINELENGTH]; ///< We double buffer: read one line in and leave one for the main program
volatile char line2[MAXLINELENGTH]; ///< Second buffer
volatile uint8_t lineidx=0; ///< our index into filling the current line
volatile char *currentline; ///< Pointer to current line buffer
volatile char *lastline; ///< Pointer to previous line buffer
volatile boolean recvdflag; ///< Received flag
volatile boolean inStandbyMode; ///< In standby flag
/**************************************************************************/
/*!
@brief Parse a NMEA string

View File

@ -30,6 +30,8 @@
#define GPS_DEFAULT_I2C_ADDR 0x10 ///< The default address for I2C transport of GPS data
#define GPS_MAX_I2C_TRANSFER 32 ///< The max number of bytes we'll try to read at once
#define GPS_MAX_SPI_TRANSFER 100 ///< The max number of bytes we'll try to read at once
#define MAXLINELENGTH 120 ///< how long are max NMEA lines to parse?
#include "Arduino.h"
#if (defined(__AVR__) || defined(ESP8266)) && defined(USE_SW_SERIAL)
@ -218,6 +220,14 @@ class Adafruit_GPS : public Print{
char _i2cbuffer[GPS_MAX_I2C_TRANSFER];
int8_t _buff_max = -1, _buff_idx = 0;
char last_char = 0;
volatile char line1[MAXLINELENGTH]; ///< We double buffer: read one line in and leave one for the main program
volatile char line2[MAXLINELENGTH]; ///< Second buffer
volatile uint8_t lineidx=0; ///< our index into filling the current line
volatile char *currentline; ///< Pointer to current line buffer
volatile char *lastline; ///< Pointer to previous line buffer
volatile boolean recvdflag; ///< Received flag
volatile boolean inStandbyMode; ///< In standby flag
};
/**************************************************************************/