Subversion Repositories Projects

Rev

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

Rev 2569 Rev 2598
Line 1... Line 1...
1
/****************************************************************************
1
/****************************************************************************
2
 *   Copyright (C) 2009-2016 by Claas Anders "CaScAdE" Rathje               *
2
 *   Copyright (C) 2009-2017 by Claas Anders "CaScAdE" Rathje               *
3
 *   admiralcascade@gmail.com                                               *
3
 *   admiralcascade@gmail.com                                               *
4
 *   Project-URL: http://www.mylifesucks.de/oss/c-osd/                      *
4
 *   Project-URL: http://www.mylifesucks.de/oss/c-osd/                      *
5
 *                                                                          *
5
 *                                                                          *
6
 *   This program is free software; you can redistribute it and/or modify   *
6
 *   This program is free software; you can redistribute it and/or modify   *
7
 *   it under the terms of the GNU General Public License as published by   *
7
 *   it under the terms of the GNU General Public License as published by   *
Line 83... Line 83...
83
#define SIMULATION      0x03
83
#define SIMULATION      0x03
84
 
84
 
85
/*
85
/*
86
 * NaviCtrl OSD Structs
86
 * NaviCtrl OSD Structs
87
 * portions taken and adapted from
87
 * portions taken and adapted from
88
 * http://svn.mikrokopter.de/filedetails.php?repname=NaviCtrl&path=/tags/V2.16a/uart1.h
88
 * http://svn.mikrokopter.de/filedetails.php?repname=NaviCtrl&path=/tags/V2.18a/uart1.h
89
 */
89
 */
90
typedef struct {
90
typedef struct {
91
    u16 Distance; // distance to target in dm
91
    u16 Distance; // distance to target in dm
92
    s16 Bearing; // course to target in deg
92
    s16 Bearing; // course to target in deg
93
} __attribute__((packed)) GPS_PosDev_t;
93
} __attribute__((packed)) GPS_PosDev_t;
94
 
94
 
-
 
95
 
95
#define NAVIDATA_VERSION 5
96
#define NAVIDATA_VERSION 5
96
 
97
 
-
 
98
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
 
99
//+ old protocol
-
 
100
//+ start abbo communication with: 'O' + Interval [10ms] 
-
 
101
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
97
typedef struct   // 84 Bytes    (note: this is the old protocol)
102
typedef struct   // 84 Bytes    (note: this is the old protocol)
98
{
103
{
99
        u8 Version;                                             // version of the data structure = 5 
104
        u8 Version;                                             // version of the data structure = 5 
100
        GPS_Pos_t CurrentPosition;              // see gpspos.h for details
105
        GPS_Pos_t CurrentPosition;              // see gpspos.h for details
101
        GPS_Pos_t TargetPosition;
106
        GPS_Pos_t TargetPosition;
Line 127... Line 132...
127
        u16 Current;                                    // actual current in 0.1A steps
132
        u16 Current;                                    // actual current in 0.1A steps
128
        u16 UsedCapacity;                               // used capacity in mAh
133
        u16 UsedCapacity;                               // used capacity in mAh
129
        u8 reserve1;                                    // to fit into 84 bytes (must be divisible by 3) 
134
        u8 reserve1;                                    // to fit into 84 bytes (must be divisible by 3) 
130
        u8 reserve2;                                    // to fit into 84 bytes (must be divisible by 3)
135
        u8 reserve2;                                    // to fit into 84 bytes (must be divisible by 3)
131
} __attribute__((packed)) NaviData_t;
136
} __attribute__((packed)) NaviData_t;
132
extern NaviData_t NaviData;
-
 
133
 
137
 
134
/*
138
/*
135
 * NaviCtrl & FCFlags Flags
139
 * NaviCtrl & FCFlags Flags
136
 * portions taken and adapted from
140
 * portions taken and adapted from
137
 * http://svn.mikrokopter.de/filedetails.php?repname=NaviCtrl&path=/tags/V2.12a/main.h
141
 * http://svn.mikrokopter.de/filedetails.php?repname=NaviCtrl&path=/tags/V2.12a/main.h
Line 197... Line 201...
197
 * MikroKopter config struct
201
 * MikroKopter config struct
198
 * portions taken and adapted from
202
 * portions taken and adapted from
199
 * http://svn.mikrokopter.de/filedetails.php?repname=FlightCtrl&path=/tags/V2.16a/eeprom.h
203
 * http://svn.mikrokopter.de/filedetails.php?repname=FlightCtrl&path=/tags/V2.16a/eeprom.h
200
 */
204
 */
201
 
205
 
202
#define EEPARAM_REVISION        109 // !!!Update NC also!!! is count up, if paramater stucture has changed (compatibility)
206
#define EEPARAM_REVISION        110 // !!!Update NC also!!! is count up, if paramater stucture has changed (compatibility)
203
#define EEMIXER_REVISION        1       // is count up, if mixer stucture has changed (compatibility)
207
#define EEMIXER_REVISION        1       // is count up, if mixer stucture has changed (compatibility)
204
#define EE_BACKWARD_COMP        1   // change if the eepropm parameters are not backwards compatible
208
#define EE_BACKWARD_COMP        1   // change if the eepropm parameters are not backwards compatible
205
 
209
 
206
 
210
 
207
 
211