Subversion Repositories Projects

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1932 - 1
/*****************************************************************************
2
 *   Copyright (C) 2008 Thomas Kaiser, thomas@ft-fanpage.de                  *
3
 *   Copyright (C) 2009 Peter "woggle" Mack, mac@denich.net                  *
4
 *   Copyright (C) 2011 Christian "Cebra" Brandtner, brandtner@brandtner.net *
5
 *   Copyright (C) 2011 Harald Bongartz                                      *
6
 *                                                                           *
7
 *   This program is free software; you can redistribute it and/or modify    *
8
 *   it under the terms of the GNU General Public License as published by    *
9
 *   the Free Software Foundation; either version 2 of the License.          *
10
 *                                                                           *
11
 *   This program is distributed in the hope that it will be useful,         *
12
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of          *
13
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           *
14
 *   GNU General Public License for more details.                            *
15
 *                                                                           *
16
 *   You should have received a copy of the GNU General Public License       *
17
 *   along with this program; if not, write to the                           *
18
 *   Free Software Foundation, Inc.,                                         *
19
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.               *
20
 *                                                                           *
21
 *                                                                           *
22
 *   Credits to:                                                             *
23
 *   Holger Buss & Ingo Busker from mikrokopter.de for the MK project + SVN  *
24
 *                          http://www.mikrokopter.de                        *
25
 *   Gregor "killagreg" Stobrawa for his version of the MK code              *
26
 *   Thomas Kaiser "thkais" for the original project. See                    *
27
 *                          http://www.ft-fanpage.de/mikrokopter/            *
28
 *                          http://forum.mikrokopter.de/topic-4061-1.html    *
29
 *   Claas Anders "CaScAdE" Rathje for providing the font and his C-OSD code *
30
 *                          http://www.mylifesucks.de/oss/c-osd/             *
31
 *   Harald Bongartz "HaraldB" for providing his Ideas and Code for usibility*
32
 *****************************************************************************/
33
 
34
 
35
#ifndef _OSD_H
36
#define _OSD_H
37
 
38
 
39
#define OSD_SCREEN_REFRESH      0   // Screen: Werte anzeigen
40
#define OSD_SCREEN_REDRAW       1   // Screen: Labels und statischer Elemente neu zeichen, Werte anzeigen
41
 
42
 
43
// Flags
44
#define OSD_FLAG_AH             0  // Altitue Hold
45
#define OSD_FLAG_PH             1  // Position Hold
46
#define OSD_FLAG_CF             2  // Care Free
47
#define OSD_FLAG_CH             3  // Coming Home
48
#define OSD_FLAG_O1             4  // Out1 (LED 1)
49
#define OSD_FLAG_O2             5  // Out2 (LED 2)
50
#define OSD_FLAG_BA             6  // LowBat warning (MK)
51
#define OSD_FLAG_CA             7  // Calibrate
52
#define OSD_FLAG_ST             8  // Start
53
#define OSD_FLAG_MR             9  // Motor Run
54
#define OSD_FLAG_FY        10  // Fly
55
#define OSD_FLAG_EL        11  // Emergency Landing
56
#define OSD_FLAG_FS        12  // RS Failsave Active
57
#define OSD_FLAG_GP        13  // GPS ok
58
#define OSD_FLAG_S0        14  // GPS-Sat not ok (GPS NOT ok)
59
#define OSD_FLAG_TU    15 // Vario Trim Up
60
#define OSD_FLAG_TD        16 // Vario Trim Down
61
#define OSD_FLAG_FR        17 // Free
62
#define OSD_FLAG_RL        18 // Range Limit
63
#define OSD_FLAG_SL        19 // No Serial Link
64
#define OSD_FLAG_TR        20 // Target Reached
65
#define OSD_FLAG_MC        21 // Manual Control
66
 
67
#define OSD_FLAG_COUNT 22
68
 
69
 
70
void osd (uint8_t ShowMode);
71
void vario_beep_output (void);
72
void OSD_Timeout(uint8_t flag);
73
void CheckMKLipo(void);
74
extern volatile uint8_t OSD_active;
75
extern volatile uint8_t error;
76
 
77
void OSD_Element_Flag_Label( uint8_t xC, uint8_t yC, uint8_t item, uint8_t lOn, int8_t xoffs, int8_t yoffs);
78
void OSD_Element_Flag( uint8_t xC, uint8_t yC, uint8_t item, int8_t xoffs, int8_t yoffs);
79
void OSD_Element_AltitudeControl( uint8_t x, uint8_t y );
80
void OSD_Element_Altitude( uint8_t x, uint8_t y, uint8_t nStyle );
81
void OSD_Element_BattLevel2( uint8_t x, uint8_t y, int8_t xoffs, int8_t yoffs );
82
void OSD_Element_BatteryLevel_Bar( uint8_t x, uint8_t y );
83
void OSD_Element_BatteryLevel_Text( uint8_t x, uint8_t y, uint8_t nStyle );
84
void OSD_Element_BatteryLevel( uint8_t x, uint8_t y, uint8_t nStyle );
85
void OSD_Element_Capacity( uint8_t x, uint8_t y );
86
void OSD_Element_CareFree( uint8_t x, uint8_t y );
87
void OSD_Element_CompassDegree( uint8_t x, uint8_t y, uint8_t nStyle );
88
void OSD_Element_CompassDirection( uint8_t x, uint8_t y );
89
void OSD_Element_CompassRose( uint8_t x, uint8_t y );
90
void OSD_Element_Current( uint8_t x, uint8_t y );
91
void OSD_Element_FlyingTime( uint8_t x, uint8_t y );
92
void OSD_Element_GroundSpeed( uint8_t x, uint8_t y );
93
void OSD_Element_HomeCircle( uint8_t x, uint8_t y, uint8_t breite, int8_t rOffset, int8_t xoffs, int8_t yoffs );
94
void OSD_Element_HomeDegree( uint8_t x, uint8_t y );
95
void OSD_Element_HomeDistance( uint8_t x, uint8_t y, uint8_t nStyle );
96
void OSD_Element_LEDOutput( uint8_t x, uint8_t y, uint8_t bitmask );
97
void OSD_Element_LED1Output( uint8_t x, uint8_t y );
98
void OSD_Element_LED2Output( uint8_t x, uint8_t y );
99
void OSD_Element_Manuell( uint8_t x, uint8_t y );
100
void OSD_Element_NaviMode( uint8_t x, uint8_t y );
101
void OSD_Element_RCIntensity( uint8_t x, uint8_t y );
102
void OSD_Element_SatsInUse( uint8_t x, uint8_t y, uint8_t  nStyle );
103
void OSD_Element_StatusFlags( uint8_t x, uint8_t y );
104
void OSD_Element_Variometer( uint8_t x, uint8_t y );
105
void OSD_Element_Target( uint8_t x, uint8_t y, uint8_t nStyle );
106
void OSD_Element_VarioWert( uint8_t x, uint8_t y );
107
void OSD_Element_WayPoint( uint8_t x, uint8_t y );
108
void OSD_Element_TargetDegree( uint8_t x, uint8_t y );
109
void OSD_Element_UpDown( uint8_t x, uint8_t y, int8_t xoffs, int8_t yoffs);
110
 
111
#endif