Subversion Repositories Projects

Rev

Rev 389 | Rev 497 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
389 cascade 1
/****************************************************************************
2
 *   Copyright (C) 2009 by Claas Anders "CaScAdE" Rathje                    *
3
 *   admiralcascade@gmail.com                                               *
4
 *   Project-URL: http://www.mylifesucks.de/oss/c-osd/                      *
5
 *                                                                          *
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   *
8
 *   the Free Software Foundation; either version 2 of the License.         *
9
 *                                                                          *
10
 *   This program is distributed in the hope that it will be useful,        *
11
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
12
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
13
 *   GNU General Public License for more details.                           *
14
 *                                                                          *
15
 *   You should have received a copy of the GNU General Public License      *
16
 *   along with this program; if not, write to the                          *
17
 *   Free Software Foundation, Inc.,                                        *
18
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.              *
19
 ****************************************************************************/
20
 
21
#include "main.h"
22
 
23
#ifndef ALLCHARSDEBUG
24
#define ALLCHARSDEBUG = 0
25
#endif
26
 
27
#ifndef WRITECHARS
28
#define WRITECHARS = 0
29
#endif
30
 
31
/* ##########################################################################
32
 * compass stuff
33
 * ##########################################################################*/
34
 
35
/**
36
 * convert the <heading> gotton from NC into an index
37
 */
38
uint8_t heading_conv(uint16_t);
39
 
40
/**
41
 * convert the <heading> gotton from NC into a more
42
 * precise index
43
 */
44
uint8_t heading_fine_conv(uint16_t );
45
 
46
/**
47
 * draw a compass rose at <x>/<y> for <heading>
48
 */
49
void draw_compass(uint8_t, uint8_t, uint16_t);
50
 
51
/* ##########################################################################
52
 * battery index
53
 * ##########################################################################*/
54
/**
55
 * draw a battery symbol at <x>/<y> according to <voltage>
56
 */
453 cascade 57
void draw_battery(uint8_t, uint8_t, uint8_t, uint8_t, uint8_t);
389 cascade 58
 
59
/* ##########################################################################
60
 * variometer
61
 * ##########################################################################*/
62
/**
63
 * draw variometer arrows at <x>/<y> according to <variometer>
64
 */
65
void draw_variometer(uint8_t, uint8_t, int16_t);
66
 
67
/**
68
 * draw a bigger vario with middle at <x>/<y> acording to <variometer>
69
 */
70
void draw_big_variometer(uint8_t, uint8_t, int16_t);
71
 
72
/* ##########################################################################
73
 * artificial horizon
74
 * ##########################################################################*/
75
/**
76
 * draw roll und nick indicators (could be enhanced to full artificial horizon)
77
 * from line <firstline> to <listlines> for given <nick> and <roll> values
78
 */
79
void draw_artificial_horizon(uint8_t, uint8_t, int16_t, int16_t);