Rev 4 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4 | Rev 9 | ||
---|---|---|---|
Line 7... | Line 7... | ||
7 | 7 | ||
8 | #ifndef INC_NMEA_H_ |
8 | #ifndef INC_NMEA_H_ |
9 | #define INC_NMEA_H_ |
9 | #define INC_NMEA_H_ |
10 | #include <ctype.h> |
10 | #include <ctype.h> |
11 | 11 | ||
- | 12 | ||
- | 13 | #if !defined (__cplusplus) |
|
12 | #if !defined true |
14 | #if !defined true |
13 | #define true 1 |
15 | #define true 1 |
14 | #define false !(true) |
16 | #define false !(true) |
15 | #endif |
17 | #endif |
16 | 18 | ||
17 | typedef unsigned char bool; |
19 | typedef unsigned char bool; |
- | 20 | #endif |
|
- | 21 | #ifdef __cplusplus |
|
- | 22 | extern "C" { |
|
- | 23 | #endif |
|
- | 24 | ||
18 | 25 | ||
19 | typedef struct |
26 | typedef struct |
20 | { |
27 | { |
21 | char valid; |
28 | char valid; |
- | 29 | char time[6]; |
|
- | 30 | bool good; |
|
22 | char ew; |
31 | char ew; |
23 | char ns; |
32 | char ns; |
24 | float lat; |
33 | float lat; |
25 | float lon; |
34 | float lon; |
26 | float heading; |
35 | float heading; |
27 | float speed; |
36 | float speed; |
28 | } Location; |
37 | } Location; |
29 | 38 | ||
30 | extern uint8_t |
39 | extern bool |
31 | updateLocation (Location *loc); |
40 | updateLocation (Location *loc); |
- | 41 | ||
- | 42 | #ifdef __cplusplus |
|
- | 43 | } |
|
- | 44 | #endif |
|
- | 45 | ||
32 | #endif /* INC_NMEA_H_ */ |
46 | #endif /* INC_NMEA_H_ */ |