Subversion Repositories NaviCtrl

Rev

Rev 291 | Rev 308 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 291 Rev 295
Line 4... Line 4...
4
#include "ubx.h"
4
#include "ubx.h"
Line 5... Line 5...
5
 
5
 
6
#define POINT_TYPE_INVALID 255
6
#define POINT_TYPE_INVALID 255
7
#define POINT_TYPE_WP   0
7
#define POINT_TYPE_WP   0
8
#define POINT_TYPE_POI  1
-
 
9
#define POINT_TYPE_BOTH 2 // only command 's'
-
 
10
 
-
 
11
extern u8 WPIndex;              // list index of GPS point representig the current WP, can be maximal WPCount
-
 
12
extern u8 POIIndex;     // list index of GPS Point representing the current POI, can be maximal WPCount
-
 
13
extern u8 WPCount;      // number of waypoints
-
 
14
extern u8 PointCount;           // number of wp in the list can be maximal equal to MAX_LIST_LEN
-
 
Line 15... Line 8...
15
extern u8 POICount;
8
#define POINT_TYPE_POI  1
16
 
9
 
17
typedef struct
10
typedef struct
18
{
11
{
Line 26... Line 19...
26
        u8  WP_EventChannelValue;  //
19
        u8  WP_EventChannelValue;  //
27
        u8      AltitudeRate;           // rate to change the setpoint
20
        u8      AltitudeRate;           // rate to change the setpoint
28
        u8  reserve[8];             // reserve
21
        u8  reserve[8];             // reserve
29
} __attribute__((packed)) Point_t;
22
} __attribute__((packed)) Point_t;
Line 30... Line -...
30
 
-
 
31
extern Point_t* GPS_pPoi;                                               // pointer to the actual point of interrest
-
 
32
extern u8 POICount;
-
 
33
 
-
 
34
 
23
 
35
// Init List, return TRUE on success
24
// Init List, return TRUE on success
36
u8 PointList_Init(void);
25
u8 PointList_Init(void);
37
// Clear List, return TRUE on success
26
// Clear List, return TRUE on success
38
u8 PointList_Clear(void);
27
u8 PointList_Clear(void);
39
// Returns number of points in the list
28
// Returns number of points in the list
40
u8 PointList_GetCount(void);
29
u8 PointList_GetCount(void);
41
// return pointer to point at position
30
// return pointer to point at position
42
Point_t* PointList_GetAt(u8 index);
31
Point_t* PointList_GetAt(u8 index);
43
// appends a point to the list, returns TRUE on success
32
// set a point in the list at index, returns its index on success, else 0
44
u8 PointList_Append(Point_t* pwp);
33
u8 PointList_SetAt(Point_t* pPoint);
45
// goto the first WP in the list and return pointer to it
34
// goto the first WP in the list and return pointer to it
46
Point_t* PointList_WPBegin(void);
35
Point_t* PointList_WPBegin(void);
47
// goto the last WP in the list and return pointer to it
36
// goto the last WP in the list and return pointer to it
48
Point_t* PointList_WPEnd(void);
37
Point_t* PointList_WPEnd(void);
49
// goto next WP in the list and return pointer to it
38
// goto next WP in the list and return pointer to it
50
Point_t* PointList_WPNext(void);
39
Point_t* PointList_WPNext(void);
51
// disables waypoint function
40
// enables/disables waypoint function
52
void PointList_WPActive(u8 set);
41
void PointList_WPActive(u8 set);
53
// returns pointer to actual POI
42
// returns pointer to actual POI