Subversion Repositories Projects

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2136 - 1
/*****************************************************************************
2
 *   Copyright (C) 2008 Thomas Kaiser, thomas@ft-fanpage.de                  *
3
 *   Copyright (C) 2009 Peter "woggle" Mack, mac@denich.net                  *
4
 *   Copyright (C) 2012 Christian "Cebra" Brandtner, brandtner@brandtner.net *
5
 *   Copyright (C) 2012 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
//# HISTORY  pkt.h
36
//#
37
//# 25.06.2014 OG
38
//# - add: PKT_AskX()
39
//#
40
//# 24.06.2014 OG
41
//# - add: PKT_Gauge_Begin(), PKT_Gauge_End(), PKT_Gauge_Next()
42
//#
43
//# 15.06.2014 OG
44
//# - add: PKT_Progress_Init(), PKT_Progress_Next()
45
//#
46
//# 14.06.2014 OG
47
//# - add: PKT_TitlePKTlipo() fuer optionale Anzeige der LiPo-Spannung
48
//#
49
//# 13.06.2014 OG
50
//# - add: PKT_Ask_Restart()
51
//#
52
//# 12.06.2014 OG
53
//# - add: PKT_Reset_EEprom()
54
//# - add: PKT_Ask(), PKT_Ask_P()
55
//#
56
//# 11.06.2014 OG
57
//# - add: PKT_Title(), PKT_Title_P()
58
//#
59
//# 04.06.2014 OG
60
//# - add: PKT_Message_Datenverlust()
61
//#
62
//# 31.05.2014 OG
63
//# - add: PKT_KeylineUpDown()
64
//#
65
//# 23.05.2014 OG
66
//# - add: PKT_TitleFromMenuItem()
67
//#
68
//# 06.05.2014 OG
69
//# - add: PKT_Popup(), PKT_Popup_P()
70
//#
71
//# 04.04.2014 OG
72
//# - fix: define ESC umbenannt zu PKTESC da es einen Namenskonflikt mit enum
73
//#        STR in messages.h gab
74
//#
75
//# 21.02.2014 OG
76
//# - chg: PKT_TitlePKTVersion()
77
//#
78
//# 17.02.2014 OG
79
//# - add: PKT_Message(), PKT_Message_P()
80
//#
81
//# 13.02.2014 OG
82
//# - add: PKT_print_PKT_center()
83
//#
84
//# 03.02.2014 OG
85
//# - add: PKT_ShowTitlePKTVersion()
86
//#
87
//# 13.06.2013 OG
88
//# - del: PC_Fast_Connect() - ersetzt durch Menu_PKTTools() in menu.c
89
//#
90
//# 19.05.2013 OG
91
//# - Ausgliederungen aus verschiedenen anderen Sourcen
92
//############################################################################
93
 
94
#ifndef _PKT_H
95
#define _PKT_H
96
 
97
#define PKTESC       27         // Parameter für PKT-Updatetool
98
#define PKTUPDATE    'u'        // starte Update
99
#define PKTVERSION   'v'        // sende PKT EEpromversion
100
#define PKTSENDCONF  'e'        // sende PKT Konfigdaten
101
 
102
#define ASK_YES_NO      1
103
#define ASK_NO_YES      2
104
#define ASK_CANCEL_OK   3
105
#define ASK_END_OK      4
106
#define ASK_END_START   5
107
 
108
 
109
extern volatile uint8_t Gauge_active;
110
 
111
 
112
void PKT_Title( const char *text, uint8_t lShowLipo, uint8_t clearscreen );
113
void PKT_Title_P( const char *text, uint8_t lShowLipo, uint8_t clearscreen );
114
void PKT_TitlePKT( void );
115
void PKT_TitlePKTlipo( uint8_t lShowLipo );
116
void PKT_TitleFromMenuItem( uint8_t lShowLipo );
117
 
118
void PKT_KeylineUpDown( uint8_t xUp, uint8_t xDown,  uint8_t xoffs, uint8_t yoffs);
119
 
120
void PKT_Progress_Init( uint8_t max, int8_t yoffs, uint8_t width, uint8_t height);
121
uint8_t PKT_Progress_Next( void );
122
 
123
void PKT_Gauge_Begin( uint8_t py);
124
void PKT_Gauge_End( void );
125
void PKT_Gauge_Next( void );
126
 
127
void PKT_Message( const char *text, uint8_t error, uint16_t timeout, uint8_t beep, uint8_t clearscreen );
128
void PKT_Message_P( const char *text, uint8_t error, uint16_t timeout, uint8_t beep, uint8_t clearscreen );
129
 
130
void PKT_Message_Datenverlust( uint16_t timeout, uint8_t beep );
131
 
132
void PKT_Popup( uint16_t timeout, const char *text1, const char *text2, const char *text3, const char *text4 );
133
void PKT_Popup_P( uint16_t timeout, const char *text1, const char *text2, const char *text3, const char *text4 );
134
 
135
uint8_t PKT_Ask( uint8_t asktype, const char *text1, const char *text2, const char *headline, const char *title );
136
uint8_t PKT_Ask_P( uint8_t asktype, const char *text1, const char *text2, const char *headline, const char *title );
137
uint8_t PKT_AskX( uint8_t asktype, const char *text1, const char *text2, uint8_t text_progmem, const char *headline, uint8_t headline_progmem, const char *title, uint8_t title_progmem );
138
 
139
uint8_t PKT_CtrlHook(void);
140
uint8_t PKT_CheckUpdate(void);  // prüft im Hauptmenü ob das Updatetool ein Update machen will
141
 
142
void PKT_Reset_EEprom( void );
143
void PKT_Update(void);
144
void PKT_SwitchOff(void);
145
void PKT_Info(void);
146
void PKT_Ask_Restart( const char *title );
147
 
148
#endif  // end: #ifndef _PKT_H