Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
39f3911
feat: allow compilation without ARDUINO
close2 Jul 27, 2017
813f8be
feat: extract functionality into Arduino compat. libs
close2 Jul 27, 2017
31fc161
feat: continue Arduino compat declarations
close2 Jul 27, 2017
852821b
feat: add str_P to Platform.h
close2 Aug 7, 2017
e9706e3
feat[Platforms]: adapt DMS.h DMS.cpp Location.h
close2 Aug 7, 2017
491cf1d
feat: introduce templates for arduino classes
close2 Aug 19, 2017
44153e6
feat: continue converting to template functions
close2 Aug 19, 2017
c714716
feat: continue work for a linux example
close2 Aug 20, 2017
cfe0977
feat: add (hopefully) working linux serial example.
close2 Aug 20, 2017
9058e01
feat: minor tweaks to get linux version to compile
close2 Aug 20, 2017
a8b7fbe
feat: NeoGPS finally outputs something
close2 Aug 21, 2017
e9f328f
feat: add some files to gitignore
close2 Aug 25, 2017
b584def
feat: introduced NEO_GPS_{STREAM,PORT,SYSTEM}
close2 Aug 30, 2017
482cfde
feat: implement LINUX platform shims
close2 Aug 30, 2017
7728a72
feat: remove linux serial.*
close2 Aug 31, 2017
b096364
feat: linux code
close2 Sep 1, 2017
5586207
Merge branch 'master' into platform
close2 Sep 13, 2017
71fa713
feat: add deprecated when using default impl
close2 Sep 19, 2017
5c2dd11
feat: add ctype for isdigit. switch to ms in fakegps
close2 Sep 19, 2017
aff5dd9
fix: use correct initial time for next tv in fakegps
close2 Sep 19, 2017
b8082fc
fix: revert NMEAGPS_cfg.h to upstream
close2 Sep 19, 2017
5facb6c
fix: cast uint_t to int before printing (<<)
close2 Sep 19, 2017
d6ae9ad
feat: integrate latest changes from NMEA.ino into tests/NMEA.cpp
close2 Sep 19, 2017
18c8488
fix: remove a.out
close2 Sep 19, 2017
92d1ed7
feat: add + in front of all number prints
close2 Sep 20, 2017
d3f96eb
Revert "doc: fix minor documentation mistakes"
close2 Sep 20, 2017
43fb3e3
Revert "Revert "doc: fix minor documentation mistakes""
close2 Sep 20, 2017
a41ab20
Revert "feat: add some files to gitignore"
close2 Sep 20, 2017
20971ba
Revert "feat: NeoGPS finally outputs something"
close2 Sep 20, 2017
745ad6e
Revert "feat: minor tweaks to get linux version to compile"
close2 Sep 20, 2017
518e218
Revert "feat: add (hopefully) working linux serial example."
close2 Sep 20, 2017
7ff96cb
Revert "feat: continue work for a linux example"
close2 Sep 20, 2017
0722cf9
Revert "feat: continue converting to template functions"
close2 Sep 20, 2017
0b2e59f
Revert "feat: introduce templates for arduino classes"
close2 Sep 20, 2017
f2fbf1f
Revert "feat[Platforms]: adapt DMS.h DMS.cpp Location.h"
close2 Sep 20, 2017
0b62572
Revert "feat: add str_P to Platform.h"
close2 Sep 20, 2017
7908a38
Revert "feat: continue Arduino compat declarations"
close2 Sep 20, 2017
2b7d62a
Revert "feat: extract functionality into Arduino compat. libs"
close2 Sep 20, 2017
7e6a90f
Revert "feat: allow compilation without ARDUINO"
close2 Sep 20, 2017
ca93743
Merge branch 'master' into split
close2 Sep 20, 2017
a4c84c1
Merge branch 'platform' into split
close2 Sep 20, 2017
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
18 changes: 17 additions & 1 deletion src/CosaCompat.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,22 @@
#endif

typedef PGM_P str_P;

#define __PROGMEM PROGMEM

#endif
#ifndef ARDUINO
#include <stdint.h>
#define PROGMEM

#define pgm_read_byte(x) (*(x))
#define __FlashStringHelper char
#define F(x) (x)

#include <math.h>
constexpr double pi() { return std::atan(1)*4; }

#define PI pi()
#define TWO_PI pi() * 2
#endif

#endif
8 changes: 6 additions & 2 deletions src/DMS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@

#include "DMS.h"

#include <Print.h>
#ifdef ARDUINO
#include <Print.h>
#endif

//----------------------------------------------------------------
// Note that no division is used, and shifts are on byte boundaries. Fast!
Expand Down Expand Up @@ -66,6 +68,7 @@ void DMS_t::From( int32_t deg_1E7 )
} // From

//----------------------------------------------------------------
#ifdef ARDUINO

Print & operator << ( Print & outs, const DMS_t & dms )
{
Expand Down Expand Up @@ -119,4 +122,5 @@ void DMS_t::printDDDMMmmmm( Print & outs ) const
if (mmmm < 10)
outs.print( '0' );
outs.print( mmmm );
}
}
#endif
10 changes: 7 additions & 3 deletions src/DMS.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@

#include "NeoGPS_cfg.h"
#include <stdint.h>
class Print;
#ifdef ARDUINO
class Print;
#endif

enum Hemisphere_t { NORTH_H = 0, SOUTH_H = 1, EAST_H = 0, WEST_H = 1 };

Expand Down Expand Up @@ -51,6 +53,8 @@ class DMS_t

} NEOGPS_PACKED;

extern Print & operator << ( Print & outs, const DMS_t & );
#ifdef ARDUINO
extern Print & operator << ( Print & outs, const DMS_t & );
#endif

#endif
#endif
2 changes: 1 addition & 1 deletion src/Location.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,4 @@ void Location_t::OffsetBy( float distR, float bearingR )
_lat = (newLat / (RAD_PER_DEG * LOC_SCALE));
_lon += (dLon / (RAD_PER_DEG * LOC_SCALE));

} // OffsetBy
} // OffsetBy
8 changes: 6 additions & 2 deletions src/Location.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#ifndef NEOGPS_LOCATION_H
#define NEOGPS_LOCATION_H

#include <Arduino.h>
#ifdef ARDUINO
#include <Arduino.h>
#else
#include "CosaCompat.h"
#endif

#include "NeoGPS_cfg.h"

Expand Down Expand Up @@ -126,4 +130,4 @@ class Location_t

} // NeoGPS

#endif
#endif
Loading