Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions library.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
"maintainer": true
}
],
"frameworks": "arduino",
"platforms": "*"
"frameworks": "*",
"platforms": "*",
"build": {
"includeDir": "src"
}
}
24 changes: 24 additions & 0 deletions src/TinyGPS++.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,30 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define _RMCterm "RMC"
#define _GGAterm "GGA"

#ifndef ARDUINO
// Enable use of this library on non-Arduino targets by defining symbols that are
// normally provided by the Arduino standard headers (Arduino.h/WProgram.h).

typedef uint8_t byte;


#define _USE_MATH_DEFINES
#include <cmath>

#define PI (M_PI)
#define HALF_PI (M_PI / 2.0)
#define TWO_PI (M_PI * 2.0)
#define DEG_TO_RAD (M_PI / 180.0)
#define RAD_TO_DEG (180.0 / M_PI)

#define radians(deg) ((deg)*DEG_TO_RAD)
#define degrees(rad) ((rad)*RAD_TO_DEG)
#define sq(x) ((x)*(x))


#include <chrono>
#endif // !ARDUINO

#if !defined(ARDUINO) && !defined(__AVR__)
// Alternate implementation of millis() that relies on std
unsigned long millis()
Expand Down
11 changes: 10 additions & 1 deletion src/TinyGPS++.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,17 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#ifndef __TinyGPSPlus_h
#define __TinyGPSPlus_h

#include <inttypes.h>
#if defined (ARDUINO)
#if ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif // ARDUINO >= 100
#else
#include <cstdint>

unsigned long millis();
#endif // ARDUINO
#include <limits.h>

#define _GPS_VERSION "1.1.0" // software version of this library
Expand Down