Rev 2200 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2200 | Rev 2212 | ||
---|---|---|---|
1 | /***************************************************************************** |
1 | /***************************************************************************** |
2 | * Copyright (C) 2008 Thomas Kaiser, thomas@ft-fanpage.de * |
2 | * Copyright (C) 2008 Thomas Kaiser, thomas@ft-fanpage.de * |
3 | * Copyright (C) 2009 Peter "woggle" Mack, mac@denich.net * |
3 | * Copyright (C) 2009 Peter "woggle" Mack, mac@denich.net * |
4 | * Copyright (C) 2011 Christian "Cebra" Brandtner, brandtner@brandtner.net * |
4 | * Copyright (C) 2011 Christian "Cebra" Brandtner, brandtner@brandtner.net * |
5 | * Copyright (C) 2011 Harald Bongartz * |
5 | * Copyright (C) 2011 Harald Bongartz * |
6 | * * |
6 | * * |
7 | * This program is free software; you can redistribute it and/or modify * |
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 * |
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. * |
9 | * the Free Software Foundation; either version 2 of the License. * |
10 | * * |
10 | * * |
11 | * This program is distributed in the hope that it will be useful, * |
11 | * This program is distributed in the hope that it will be useful, * |
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
14 | * GNU General Public License for more details. * |
14 | * GNU General Public License for more details. * |
15 | * * |
15 | * * |
16 | * You should have received a copy of the GNU General Public License * |
16 | * You should have received a copy of the GNU General Public License * |
17 | * along with this program; if not, write to the * |
17 | * along with this program; if not, write to the * |
18 | * Free Software Foundation, Inc., * |
18 | * Free Software Foundation, Inc., * |
19 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
19 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
20 | * * |
20 | * * |
21 | * * |
21 | * * |
22 | * Credits to: * |
22 | * Credits to: * |
23 | * Holger Buss & Ingo Busker from mikrokopter.de for the MK project + SVN * |
23 | * Holger Buss & Ingo Busker from mikrokopter.de for the MK project + SVN * |
24 | * http://www.mikrokopter.de * |
24 | * http://www.mikrokopter.de * |
25 | * Gregor "killagreg" Stobrawa for his version of the MK code * |
25 | * Gregor "killagreg" Stobrawa for his version of the MK code * |
26 | * Thomas Kaiser "thkais" for the original project. See * |
26 | * Thomas Kaiser "thkais" for the original project. See * |
27 | * http://www.ft-fanpage.de/mikrokopter/ * |
27 | * http://www.ft-fanpage.de/mikrokopter/ * |
28 | * http://forum.mikrokopter.de/topic-4061-1.html * |
28 | * http://forum.mikrokopter.de/topic-4061-1.html * |
29 | * Claas Anders "CaScAdE" Rathje for providing the font and his C-OSD code * |
29 | * Claas Anders "CaScAdE" Rathje for providing the font and his C-OSD code * |
30 | * http://www.mylifesucks.de/oss/c-osd/ * |
30 | * http://www.mylifesucks.de/oss/c-osd/ * |
31 | * Harald Bongartz "HaraldB" for providing his Ideas and Code for usibility* |
31 | * Harald Bongartz "HaraldB" for providing his Ideas and Code for usibility* |
32 | *****************************************************************************/ |
32 | *****************************************************************************/ |
33 | 33 | ||
34 | //############################################################################ |
34 | //############################################################################ |
35 | //# HISTORY setup.c |
35 | //# HISTORY setup.c |
36 | //# |
36 | //# |
37 | //# |
37 | //# |
38 | //# 03.08.2015 CB |
38 | //# 03.08.2015 CB |
39 | //# - add: FollowMe Setup um Distance und Azimuth erweitert |
39 | //# - add: FollowMe Setup um Distance und Azimuth erweitert |
40 | //# |
40 | //# |
41 | //# 27.06.2014 OG |
41 | //# 27.06.2014 OG |
42 | //# - chg: Setup_MAIN() - Reihenfolge von GPS-Maus/FollowMe/Tracking geaendert |
42 | //# - chg: Setup_MAIN() - Reihenfolge von GPS-Maus/FollowMe/Tracking geaendert |
43 | //# |
43 | //# |
44 | //# 25.06.2014 OG |
44 | //# 25.06.2014 OG |
45 | //# - chg: Text von GPS_SHOWDEV |
45 | //# - chg: Text von GPS_SHOWDEV |
46 | //# - chg: Setup_FollowMe() - deaktiviert/auskommentiert: FME_REFRESH |
46 | //# - chg: Setup_FollowMe() - deaktiviert/auskommentiert: FME_REFRESH |
47 | //# - chg: Setup_GPSMouse() - deaktiviert/auskommentiert: GPS_TYPE, GPS_ACTIVE |
47 | //# - chg: Setup_GPSMouse() - deaktiviert/auskommentiert: GPS_TYPE, GPS_ACTIVE |
48 | //# |
48 | //# |
49 | //# 24.06.2014 OG |
49 | //# 24.06.2014 OG |
50 | //# - chg: Setup_GPSMouse() angepasst auf geaendertes GPSMouse_ShowData() |
50 | //# - chg: Setup_GPSMouse() angepasst auf geaendertes GPSMouse_ShowData() |
51 | //# |
51 | //# |
52 | //# 22.06.2014 OG |
52 | //# 22.06.2014 OG |
53 | //# - del: verschiedene weitere Modul-Variablen entfernt weil nicht benoetigt |
53 | //# - del: verschiedene weitere Modul-Variablen entfernt weil nicht benoetigt |
54 | //# - del: Variable CheckGPS |
54 | //# - del: Variable CheckGPS |
55 | //# - del: BT_ShowGPSData() - ist jetzt als GPSMouse_ShowData() in gps/gpsmouse.c |
55 | //# - del: BT_ShowGPSData() - ist jetzt als GPSMouse_ShowData() in gps/gpsmouse.c |
56 | //# - chg: BT_ShowGPSData() - Parameter und Rueckgabe |
56 | //# - chg: BT_ShowGPSData() - Parameter und Rueckgabe |
57 | //# - del: BT_ShowGPSData_OLD |
57 | //# - del: BT_ShowGPSData_OLD |
58 | //# |
58 | //# |
59 | //# 21.06.2014 CB |
59 | //# 21.06.2014 CB |
60 | //# - chg: BT_SearchDevices - Timeoutanzeige bei Devicesuche |
60 | //# - chg: BT_SearchDevices - Timeoutanzeige bei Devicesuche |
61 | //# |
61 | //# |
62 | //# 16.06.2014 OG |
62 | //# 16.06.2014 OG |
63 | //# - chg: BT_ShowGPSData() - neues Layout und Anzeige fuer "XCnt" (=RX-Count) |
63 | //# - chg: BT_ShowGPSData() - neues Layout und Anzeige fuer "XCnt" (=RX-Count) |
64 | //# hinzugefuegt; XCnt zeigt die Anzahl empfangener GPS-Datenpakete an |
64 | //# hinzugefuegt; XCnt zeigt die Anzahl empfangener GPS-Datenpakete an |
65 | //# und ist ein Indikator wie schnell die BT-GPS Maus Daten sendet |
65 | //# und ist ein Indikator wie schnell die BT-GPS Maus Daten sendet |
66 | //# |
66 | //# |
67 | //# 13.06.2014 OG |
67 | //# 13.06.2014 OG |
68 | //# - chg: Setup_PKTGeneric() - neue Einstellung "PKT aus nach" |
68 | //# - chg: Setup_PKTGeneric() - neue Einstellung "PKT aus nach" |
69 | //# - del: ChangeWi_SV2() |
69 | //# - del: ChangeWi_SV2() |
70 | //# |
70 | //# |
71 | //# 12.06.2014 OG |
71 | //# 12.06.2014 OG |
72 | //# - del: Reset_EEprom() - ist jetzt als PKT_Reset_EEprom() in pkt.c |
72 | //# - del: Reset_EEprom() - ist jetzt als PKT_Reset_EEprom() in pkt.c |
73 | //# |
73 | //# |
74 | //# 11.06.2014 OG |
74 | //# 11.06.2014 OG |
75 | //# - fix: Edit_generic() funktioniert jetzt auch, wenn kein vorgelagertes |
75 | //# - fix: Edit_generic() funktioniert jetzt auch, wenn kein vorgelagertes |
76 | //# Menue vorhanden ist (ggf. muss das Label angepasst werden) |
76 | //# Menue vorhanden ist (ggf. muss das Label angepasst werden) |
77 | //# |
77 | //# |
78 | //# 10.06.2014 OG |
78 | //# 10.06.2014 OG |
79 | //# - chg: verschiedene Funktionen umgestellt auf Wi232_Initalize() |
79 | //# - chg: verschiedene Funktionen umgestellt auf Wi232_Initalize() |
80 | //# |
80 | //# |
81 | //# 08.06.2014 OG |
81 | //# 08.06.2014 OG |
82 | //# - add: Setup_MKConnection() - hier ist auch das setzen der Baudrate Wi232/BT |
82 | //# - add: Setup_MKConnection() - hier ist auch das setzen der Baudrate Wi232/BT |
83 | //# hin verschoben worden (war vorher im Wi.232 Bereicch) |
83 | //# hin verschoben worden (war vorher im Wi.232 Bereicch) |
84 | //# |
84 | //# |
85 | //# 06.06.2014 OG |
85 | //# 06.06.2014 OG |
86 | //# - chg: Setup_WI232_MenuCreate()... Eintraege geloescht... |
86 | //# - chg: Setup_WI232_MenuCreate()... Eintraege geloescht... |
87 | //# |
87 | //# |
88 | //# 04.06.2014 OG |
88 | //# 04.06.2014 OG |
89 | //# - chg: Setup_PKTGeneric() eine Menue-Trennlinie hinter Sommerzeit eingefuegt |
89 | //# - chg: Setup_PKTGeneric() eine Menue-Trennlinie hinter Sommerzeit eingefuegt |
90 | //# |
90 | //# |
91 | //# 01.06.2014 OG |
91 | //# 01.06.2014 OG |
92 | //# - chg: Edit_LED_Form() Parameter 'Text' entfernt und auf strGetOSDOLD() |
92 | //# - chg: Edit_LED_Form() Parameter 'Text' entfernt und auf strGetOSDOLD() |
93 | //# umgestellt |
93 | //# umgestellt |
94 | //# - add: include "../osd/osdold_messages.h" |
94 | //# - add: include "../osd/osdold_messages.h" |
95 | //# |
95 | //# |
96 | //# 31.05.2014 OG |
96 | //# 31.05.2014 OG |
97 | //# - chg: Edit_String() - Parameter 'Text' entfernt; angepasst auf neue |
97 | //# - chg: Edit_String() - Parameter 'Text' entfernt; angepasst auf neue |
98 | //# Titelzeile; PKT_CtrlHook integriert; PKT Lipo-Anzeige; |
98 | //# Titelzeile; PKT_CtrlHook integriert; PKT Lipo-Anzeige; |
99 | //# auf 'redraw' umgestellt |
99 | //# auf 'redraw' umgestellt |
100 | //# |
100 | //# |
101 | //# 30.05.2014 OG |
101 | //# 30.05.2014 OG |
102 | //# - chg: Edit_LipoOffset() - umgeschrieben auf neues Layout, Code optimiert, |
102 | //# - chg: Edit_LipoOffset() - umgeschrieben auf neues Layout, Code optimiert, |
103 | //# Increment jetzt +/-50 (statt vorher 20), Offset bis 15000 (statt 10000) |
103 | //# Increment jetzt +/-50 (statt vorher 20), Offset bis 15000 (statt 10000) |
104 | //# - chg: Edit_LipoOffset() - keine Parameter mehr, keine Rueckgabe |
104 | //# - chg: Edit_LipoOffset() - keine Parameter mehr, keine Rueckgabe |
105 | //# |
105 | //# |
106 | //# 29.05.2014 OG |
106 | //# 29.05.2014 OG |
107 | //# - chg: Setup_OSD() umgestellt auf Menuetexte statt strGet() mit Textaenderung |
107 | //# - chg: Setup_OSD() umgestellt auf Menuetexte statt strGet() mit Textaenderung |
108 | //# |
108 | //# |
109 | //# 28.05.2014 OG |
109 | //# 28.05.2014 OG |
110 | //# - chg: Setup's auf das neue Edit_generic() umgestellt |
110 | //# - chg: Setup's auf das neue Edit_generic() umgestellt |
111 | //# - chg: Edit_generic() - geaenderte Aufrufparameter |
111 | //# - chg: Edit_generic() - geaenderte Aufrufparameter |
112 | //# (Text enfernt da vom Menue geerbt; optionale Hilfstexte moeglich) |
112 | //# (Text enfernt da vom Menue geerbt; optionale Hilfstexte moeglich) |
113 | //# |
113 | //# |
114 | //# 27.05.2014 OG |
114 | //# 27.05.2014 OG |
115 | //# - del: Edit_generic_int(), Edit_printout_int() - nicht mehr benoetigt da |
115 | //# - del: Edit_generic_int(), Edit_printout_int() - nicht mehr benoetigt da |
116 | //# anhaengende Werte umgemappt auf Edit_generic() |
116 | //# anhaengende Werte umgemappt auf Edit_generic() |
117 | //# |
117 | //# |
118 | //# 26.05.2014 OG |
118 | //# 26.05.2014 OG |
119 | //# - chg: Menuetext TIME_ZONE ergaenzt um "UTC" |
119 | //# - chg: Menuetext TIME_ZONE ergaenzt um "UTC" |
120 | //# - chg: Setup_MAIN() - neue Anordnung der Menueeintraege mit Trennlinien |
120 | //# - chg: Setup_MAIN() - neue Anordnung der Menueeintraege mit Trennlinien |
121 | //# - chg: Setup_OSDScreens() - OSDSCREEN_WAYPOINTS hinzugefuegt |
121 | //# - chg: Setup_OSDScreens() - OSDSCREEN_WAYPOINTS hinzugefuegt |
122 | //# - chg: Text "LCD aus nach..." nach "LCD aus nach" |
122 | //# - chg: Text "LCD aus nach..." nach "LCD aus nach" |
123 | //# - chg: Text "PKT allgemein" geaendert auf "PKT Allgemein" |
123 | //# - chg: Text "PKT allgemein" geaendert auf "PKT Allgemein" |
124 | //# - del: PKT_LCDINVERS inkl. Sprachen |
124 | //# - del: PKT_LCDINVERS inkl. Sprachen |
125 | //# - chg: Setup_PKTGeneric() - PKT_LCDINVERS (Config.LCD_DisplayMode) entfernt, |
125 | //# - chg: Setup_PKTGeneric() - PKT_LCDINVERS (Config.LCD_DisplayMode) entfernt, |
126 | //# nicht mehr unterstuetzt |
126 | //# nicht mehr unterstuetzt |
127 | //# - chg: Edit_printout() - Hilfstexte CHANGENORMREV1 und 2 fuer NormRev entfernt |
127 | //# - chg: Edit_printout() - Hilfstexte CHANGENORMREV1 und 2 fuer NormRev entfernt |
128 | //# |
128 | //# |
129 | //# 23.05.2014 OG |
129 | //# 23.05.2014 OG |
130 | //# - add: Edit_generic() - Anzeige Titel mit PKT_TitleFromMenuItem() |
130 | //# - add: Edit_generic() - Anzeige Titel mit PKT_TitleFromMenuItem() |
131 | //# - fix: Setup_PKTGeneric() - PKT_LCDINVERS (Config.LCD_DisplayMode) |
131 | //# - fix: Setup_PKTGeneric() - PKT_LCDINVERS (Config.LCD_DisplayMode) |
132 | //# Edit-Range umgestellt von 0,4 auf 0,1 |
132 | //# Edit-Range umgestellt von 0,4 auf 0,1 |
133 | //# |
133 | //# |
134 | //# 11.05.2014 OG |
134 | //# 11.05.2014 OG |
135 | //# - chg: die Setup-Menues umgestellt auf MenuCtrl_SetTitleFromParentItem() |
135 | //# - chg: die Setup-Menues umgestellt auf MenuCtrl_SetTitleFromParentItem() |
136 | //# -> die Menues 'erben' damit ihren Titel vom aufrufenden Menuepunkt |
136 | //# -> die Menues 'erben' damit ihren Titel vom aufrufenden Menuepunkt |
137 | //# - chg: ein paar Menuetexte fuer Setup_MAIN() |
137 | //# - chg: ein paar Menuetexte fuer Setup_MAIN() |
138 | //# |
138 | //# |
139 | //# 18.04.2014 OG |
139 | //# 18.04.2014 OG |
140 | //# - chg: Setup_PKTGeneric() - PKT_BRIGHTNESS rausgenommen da es aktuell auch |
140 | //# - chg: Setup_PKTGeneric() - PKT_BRIGHTNESS rausgenommen da es aktuell auch |
141 | //# nicht mehr mit PKT 3.9m Hardware geht (spart ca. 650 Bytes) |
141 | //# nicht mehr mit PKT 3.9m Hardware geht (spart ca. 650 Bytes) |
142 | //# - chg: Text von "Tracking Servos" gekuerzt auf "Tracking" |
142 | //# - chg: Text von "Tracking Servos" gekuerzt auf "Tracking" |
143 | //# |
143 | //# |
144 | //# 09.04.2014 OG |
144 | //# 09.04.2014 OG |
145 | //# - chg: Edit_printout() Text von WlanMode 'Nein' auf 'Aus' geaendert |
145 | //# - chg: Edit_printout() Text von WlanMode 'Nein' auf 'Aus' geaendert |
146 | //# |
146 | //# |
147 | //# 04.04.2014 OG |
147 | //# 04.04.2014 OG |
148 | //# - chg: Edit_String() auf ShowTitle_P() umgestellt |
148 | //# - chg: Edit_String() auf ShowTitle_P() umgestellt |
149 | //# - del: Edit_ShowTitle_P() |
149 | //# - del: Edit_ShowTitle_P() |
150 | //# - chg: in versch. Funktionen Titel-Strings fuer Edit_String() gekuerzt |
150 | //# - chg: in versch. Funktionen Titel-Strings fuer Edit_String() gekuerzt |
151 | //# - chg: Edit_String() auf Edit_ShowTitle_P() umgestellt |
151 | //# - chg: Edit_String() auf Edit_ShowTitle_P() umgestellt |
152 | //# |
152 | //# |
153 | //# 02.04.2014 OG |
153 | //# 02.04.2014 OG |
154 | //# - add: Edit_ShowTitle_P() |
154 | //# - add: Edit_ShowTitle_P() |
155 | //# - add: Edit_printout(): WlanMode (Aus, AP-Mode, AdHoc) |
155 | //# - add: Edit_printout(): WlanMode (Aus, AP-Mode, AdHoc) |
156 | //# - chg: Edit_printout(): Code-Optimierung |
156 | //# - chg: Edit_printout(): Code-Optimierung |
157 | //# |
157 | //# |
158 | //# 01.04.2014 OG |
158 | //# 01.04.2014 OG |
159 | //# - add: Unterstuetzung fuer BLE (Bluetooth 4 Low Energy Zusatzmodul an SV2) |
159 | //# - add: Unterstuetzung fuer BLE (Bluetooth 4 Low Energy Zusatzmodul an SV2) |
160 | //# - chg: PCB_WiFlyPatch umbenannt zu PCB_SV2RxTxPatch |
160 | //# - chg: PCB_WiFlyPatch umbenannt zu PCB_SV2RxTxPatch |
161 | //# |
161 | //# |
162 | //# 30.03.2014 OG |
162 | //# 30.03.2014 OG |
163 | //# - chg: Sprache Hollaendisch vollstaendig entfernt |
163 | //# - chg: Sprache Hollaendisch vollstaendig entfernt |
164 | //# - chg: MenuCtrl_PushML_P() umgestellt auf MenuCtrl_PushML2_P() |
164 | //# - chg: MenuCtrl_PushML_P() umgestellt auf MenuCtrl_PushML2_P() |
165 | //# |
165 | //# |
166 | //# 27.03.2014 OG |
166 | //# 27.03.2014 OG |
167 | //# - chg: Setup_PKTGeneric(), Edit_printout() Sprache "Niederländisch" nicht mehr waehlbar |
167 | //# - chg: Setup_PKTGeneric(), Edit_printout() Sprache "Niederländisch" nicht mehr waehlbar |
168 | //# |
168 | //# |
169 | //# 04.02.2014 OG |
169 | //# 04.02.2014 OG |
170 | //# - chg: kleine Layoutaenderung von 'PKT_Akku' in Edit_printout() |
170 | //# - chg: kleine Layoutaenderung von 'PKT_Akku' in Edit_printout() |
171 | //# - add: PKT_CtrlHook() in Edit_generic(), Edit_generic_int(), Edit_LipoOffset() eingebaut |
171 | //# - add: PKT_CtrlHook() in Edit_generic(), Edit_generic_int(), Edit_LipoOffset() eingebaut |
172 | //# - add: kleiner Hilfetext in Edit_printout() bei Aenderung von Einstellung |
172 | //# - add: kleiner Hilfetext in Edit_printout() bei Aenderung von Einstellung |
173 | //# "LCD Normal/Invers" bzgl. PKT neu starten nach Aenderung |
173 | //# "LCD Normal/Invers" bzgl. PKT neu starten nach Aenderung |
174 | //# - chg: Anzeige von Edit_LipoOffset() geaendert und fix vom springen der |
174 | //# - chg: Anzeige von Edit_LipoOffset() geaendert und fix vom springen der |
175 | //# Eingabe wenn Wert geaendert wird |
175 | //# Eingabe wenn Wert geaendert wird |
176 | //# |
176 | //# |
177 | //# 03.02.2014 OG |
177 | //# 03.02.2014 OG |
178 | //# - add: SHOWCELLU in Setup_OSD() ("zeige Zellensp.") |
178 | //# - add: SHOWCELLU in Setup_OSD() ("zeige Zellensp.") |
179 | //# |
179 | //# |
180 | //# 30.01.2014 OG |
180 | //# 30.01.2014 OG |
181 | //# - add: Unterstuetzung fuer USE_BLUETOOTH |
181 | //# - add: Unterstuetzung fuer USE_BLUETOOTH |
182 | //# |
182 | //# |
183 | //# 29.07.2013 Cebra |
183 | //# 29.07.2013 Cebra |
184 | //# - chg: Fehler in Setup_WI232_MenuCreate, MenuCtrl_Push_P( WI_INSTALLED.. war auskommentiert, dadurch Fehler im Menu bei nicht |
184 | //# - chg: Fehler in Setup_WI232_MenuCreate, MenuCtrl_Push_P( WI_INSTALLED.. war auskommentiert, dadurch Fehler im Menu bei nicht |
185 | //# aktivem Wi232 |
185 | //# aktivem Wi232 |
186 | //# |
186 | //# |
187 | //# 18.07.2013 Cebra |
187 | //# 18.07.2013 Cebra |
188 | //# - chg: Edit_PKT_Accu entfernt, Edit_generic erweitert |
188 | //# - chg: Edit_PKT_Accu entfernt, Edit_generic erweitert |
189 | //# |
189 | //# |
190 | //# 15.07.2013 Cebra |
190 | //# 15.07.2013 Cebra |
191 | //# - add: Edit_Printout um Wlan Security erweitert |
191 | //# - add: Edit_Printout um Wlan Security erweitert |
192 | //# |
192 | //# |
193 | //# 07.07.2013 OG |
193 | //# 07.07.2013 OG |
194 | //# - add: Setup_OSDScreens(), Mark_OSDScreen(), Edit_OSDScreen() |
194 | //# - add: Setup_OSDScreens(), Mark_OSDScreen(), Edit_OSDScreen() |
195 | //# |
195 | //# |
196 | //# 04.07.2013 Cebra |
196 | //# 04.07.2013 Cebra |
197 | //# - chg: Setupmenü um Wlan erweitert |
197 | //# - chg: Setupmenü um Wlan erweitert |
198 | //# |
198 | //# |
199 | //# 02.07.2013 Cebra |
199 | //# 02.07.2013 Cebra |
200 | //# - chg: Edit_String, geändert für die Nutzung von SSID und Wlan Passwort |
200 | //# - chg: Edit_String, geändert für die Nutzung von SSID und Wlan Passwort |
201 | //# |
201 | //# |
202 | //# 30.06.2013 OG |
202 | //# 30.06.2013 OG |
203 | //# - del: Setup_OSD(): OSDS_HOMEVIEW |
203 | //# - del: Setup_OSD(): OSDS_HOMEVIEW |
204 | //# |
204 | //# |
205 | //# 26.06.2013 OG |
205 | //# 26.06.2013 OG |
206 | //# - del: USE_PKT_STARTINFO |
206 | //# - del: USE_PKT_STARTINFO |
207 | //# |
207 | //# |
208 | //# 24.06.2013 OG |
208 | //# 24.06.2013 OG |
209 | //# - chg: vor dem editieren des Bluetooth Namens bt_fixname() eingefuegt |
209 | //# - chg: vor dem editieren des Bluetooth Namens bt_fixname() eingefuegt |
210 | //# |
210 | //# |
211 | //# 24.06.2013 OG |
211 | //# 24.06.2013 OG |
212 | //# - fix: Edit_String(): Fehlermeldung bei EDIT_BT_NAME wenn erstes Zeichen = Space |
212 | //# - fix: Edit_String(): Fehlermeldung bei EDIT_BT_NAME wenn erstes Zeichen = Space |
213 | //# - chg: Edit_String(): Code-Layout und diverses |
213 | //# - chg: Edit_String(): Code-Layout und diverses |
214 | //# - chg: Setup_BTM222(): Bearbeitung von BT_NAME geaendert |
214 | //# - chg: Setup_BTM222(): Bearbeitung von BT_NAME geaendert |
215 | //# - chg: Setup_BTM222(): Menuetexte geaendert |
215 | //# - chg: Setup_BTM222(): Menuetexte geaendert |
216 | //# - chg: Setup_MAIN(): Text im Setup-Hauptmenue von "BTM-222" auf "Bluetooth" geaendert |
216 | //# - chg: Setup_MAIN(): Text im Setup-Hauptmenue von "BTM-222" auf "Bluetooth" geaendert |
217 | //# |
217 | //# |
218 | //# 21.06.2013 OG |
218 | //# 21.06.2013 OG |
219 | //# - fix: Menuetext GPSMouse "Zeige Geräteliste" (Anzeige "ä" korrigiert) |
219 | //# - fix: Menuetext GPSMouse "Zeige Geräteliste" (Anzeige "ä" korrigiert) |
220 | //# |
220 | //# |
221 | //# 15.06.2013 OG |
221 | //# 15.06.2013 OG |
222 | //# - add: "zeige MK-Setting" in Setup_OSD() hinzugefuegt |
222 | //# - add: "zeige MK-Setting" in Setup_OSD() hinzugefuegt |
223 | //# |
223 | //# |
224 | //# 15.06.2013 OG |
224 | //# 15.06.2013 OG |
225 | //# - chg: Umstrukturierungen am OSD-Setup |
225 | //# - chg: Umstrukturierungen am OSD-Setup |
226 | //# - chg: OSD Empfangsausfall von Setup_PKTGeneric() nach Setup_OSD() verschoben |
226 | //# - chg: OSD Empfangsausfall von Setup_PKTGeneric() nach Setup_OSD() verschoben |
227 | //# |
227 | //# |
228 | //# 13.06.2013 OG |
228 | //# 13.06.2013 OG |
229 | //# - del: Setup_Time() - jetzt in Setup_PKTGeneric() |
229 | //# - del: Setup_Time() - jetzt in Setup_PKTGeneric() |
230 | //# - del: Setup_PKTAccu() - jetzt in Setup_PKTGeneric() |
230 | //# - del: Setup_PKTAccu() - jetzt in Setup_PKTGeneric() |
231 | //# - del: SETUP_PKTDEBUG in Setup_MAIN() entfernt (auskommentiert, wenn notwendig ggf. mit einem Debug define regeln) |
231 | //# - del: SETUP_PKTDEBUG in Setup_MAIN() entfernt (auskommentiert, wenn notwendig ggf. mit einem Debug define regeln) |
232 | //# - chg: diverse Aenderungen in Menutexten |
232 | //# - chg: diverse Aenderungen in Menutexten |
233 | //# - fix: keine LCD-Helligkeitseinstellung bei HW 3.9x mehr durch Abfrage von PCB_Version |
233 | //# - fix: keine LCD-Helligkeitseinstellung bei HW 3.9x mehr durch Abfrage von PCB_Version |
234 | //# |
234 | //# |
235 | //# 31.05.2013 cebra |
235 | //# 31.05.2013 cebra |
236 | //# - chg: Umlaute, soweit gefunden, korrigiert |
236 | //# - chg: Umlaute, soweit gefunden, korrigiert |
237 | //# |
237 | //# |
238 | //# 30.05.2013 cebra |
238 | //# 30.05.2013 cebra |
239 | //# - chg: doppelte Texte auf #define umgestellt |
239 | //# - chg: doppelte Texte auf #define umgestellt |
240 | //# |
240 | //# |
241 | //# 24.05.2013 OG |
241 | //# 24.05.2013 OG |
242 | //# - chg: etliche Aenderungen rund um Bluetooth/BT-GPS Maus fuer bessere |
242 | //# - chg: etliche Aenderungen rund um Bluetooth/BT-GPS Maus fuer bessere |
243 | //# Usebility, Code-Einsparung und Code-Lesbarkeit |
243 | //# Usebility, Code-Einsparung und Code-Lesbarkeit |
244 | //# - add: Wait4KeyOK() |
244 | //# - add: Wait4KeyOK() |
245 | //# - chg: Aufrufe von MenuCtrl_Push() umgestellt auf MenuCtrl_PushML_P() |
245 | //# - chg: Aufrufe von MenuCtrl_Push() umgestellt auf MenuCtrl_PushML_P() |
246 | //# |
246 | //# |
247 | //# 22.05.2013 OG |
247 | //# 22.05.2013 OG |
248 | //# - chg: umgestellt auf menuctrl: BT_SelectDevice() |
248 | //# - chg: umgestellt auf menuctrl: BT_SelectDevice() |
249 | //# |
249 | //# |
250 | //# 22.05.2013 OG |
250 | //# 22.05.2013 OG |
251 | //# - chg: umgestellt auf menuctrl: Setup_Time(), Setup_FollowMe(), Setup_OSD() |
251 | //# - chg: umgestellt auf menuctrl: Setup_Time(), Setup_FollowMe(), Setup_OSD() |
252 | //# - chg: weitere Speicheroptimierungen fuer USE_* |
252 | //# - chg: weitere Speicheroptimierungen fuer USE_* |
253 | //# - chg: Menu_Setup() umbenannt zu Setup_MAIN() |
253 | //# - chg: Menu_Setup() umbenannt zu Setup_MAIN() |
254 | //# |
254 | //# |
255 | //# 20.05.2013 OG |
255 | //# 20.05.2013 OG |
256 | //# - chg: umgestellt auf menuctrl: Menu_Setup(), Setup_PKTGeneric(), Setup_WI232() |
256 | //# - chg: umgestellt auf menuctrl: Menu_Setup(), Setup_PKTGeneric(), Setup_WI232() |
257 | //# Setup_BTM222(), Setup_PKTAccu(), Setup_GPSMouse() |
257 | //# Setup_BTM222(), Setup_PKTAccu(), Setup_GPSMouse() |
258 | //# - add: GPSMouse_ShowData() |
258 | //# - add: GPSMouse_ShowData() |
259 | //# |
259 | //# |
260 | //# 19.05.2013 OG |
260 | //# 19.05.2013 OG |
261 | //# - chg: Aufruf von Update_PKT() umgestellt auf PKT_Update() |
261 | //# - chg: Aufruf von Update_PKT() umgestellt auf PKT_Update() |
262 | //# |
262 | //# |
263 | //# 17.05.2013 OG |
263 | //# 17.05.2013 OG |
264 | //# - chg: umgestellt auf utils/menuold.h |
264 | //# - chg: umgestellt auf utils/menuold.h |
265 | //# |
265 | //# |
266 | //# 16.05.2013 Cebra |
266 | //# 16.05.2013 Cebra |
267 | //# - chg: Fehler bei On/Off Settings |
267 | //# - chg: Fehler bei On/Off Settings |
268 | //# |
268 | //# |
269 | //# 05.05.2013 Cebra |
269 | //# 05.05.2013 Cebra |
270 | //# - add: PKT Zeitsetup |
270 | //# - add: PKT Zeitsetup |
271 | //# |
271 | //# |
272 | //# 19.04.2013 Cebra |
272 | //# 19.04.2013 Cebra |
273 | //# - chg: Fehlerbehandlung im GPS Menü für den Fall das kein BTM22 eingebaut oder GPS-Device konfiguriert |
273 | //# - chg: Fehlerbehandlung im GPS Menü für den Fall das kein BTM22 eingebaut oder GPS-Device konfiguriert |
274 | //# |
274 | //# |
275 | //# 16.04.2013 Cebra |
275 | //# 16.04.2013 Cebra |
276 | //# - chg: PROGMEM angepasst auf neue avr-libc und GCC, prog_char depreciated |
276 | //# - chg: PROGMEM angepasst auf neue avr-libc und GCC, prog_char depreciated |
277 | //# |
277 | //# |
278 | //# 12.04.2013 Cebra |
278 | //# 12.04.2013 Cebra |
279 | //# - chg: edit_generic um Sprungfaktor erweitert, erm�glicht bei hohen Werten einen schnelleren Wertewechsel |
279 | //# - chg: edit_generic um Sprungfaktor erweitert, erm�glicht bei hohen Werten einen schnelleren Wertewechsel |
280 | //# |
280 | //# |
281 | //# 03.04.2013 Cebra |
281 | //# 03.04.2013 Cebra |
282 | //# - chg: find/replace Fehler bei lcd_puts_at beseitigt, GPS und BT-Maus Bereich |
282 | //# - chg: find/replace Fehler bei lcd_puts_at beseitigt, GPS und BT-Maus Bereich |
283 | //# |
283 | //# |
284 | //# 02.04.2013 Cebra |
284 | //# 02.04.2013 Cebra |
285 | //# - chg: Textfehler bei der Einstellung "Verbindung zum MK" beseitigt |
285 | //# - chg: Textfehler bei der Einstellung "Verbindung zum MK" beseitigt |
286 | //# |
286 | //# |
287 | //# 04.03.2013 Cebra |
287 | //# 04.03.2013 Cebra |
288 | //# - del: OSD-Sreenmode ,is no longer necessary, last OSD-Screen is saved at shutdown |
288 | //# - del: OSD-Sreenmode ,is no longer necessary, last OSD-Screen is saved at shutdown |
289 | //# |
289 | //# |
290 | //# 27.03.2013 Cebra |
290 | //# 27.03.2013 Cebra |
291 | //# - chg: Fehler bei der Menüsteuerung behoben |
291 | //# - chg: Fehler bei der Menüsteuerung behoben |
292 | //############################################################################ |
292 | //############################################################################ |
293 | 293 | ||
294 | 294 | ||
295 | #include "../cpu.h" |
295 | #include "../cpu.h" |
296 | #include <avr/io.h> |
296 | #include <avr/io.h> |
297 | #include <avr/interrupt.h> |
297 | #include <avr/interrupt.h> |
298 | #include <avr/pgmspace.h> |
298 | #include <avr/pgmspace.h> |
299 | #include <string.h> |
299 | #include <string.h> |
300 | #include <util/delay.h> |
300 | #include <util/delay.h> |
301 | #include "../main.h" |
301 | #include "../main.h" |
302 | #include "../setup/setup.h" |
302 | #include "../setup/setup.h" |
303 | #include "../lcd/lcd.h" |
303 | #include "../lcd/lcd.h" |
304 | #include "../timer/timer.h" |
304 | #include "../timer/timer.h" |
305 | #include "../wi232/Wi232.h" |
305 | #include "../wi232/Wi232.h" |
306 | #include "../bluetooth/bluetooth.h" |
306 | #include "../bluetooth/bluetooth.h" |
307 | #include "../connect.h" |
307 | #include "../connect.h" |
308 | #include "../lipo/lipo.h" |
308 | #include "../lipo/lipo.h" |
309 | #include "../messages.h" |
309 | #include "../messages.h" |
310 | #include "../eeprom/eeprom.h" |
310 | #include "../eeprom/eeprom.h" |
311 | #include "../tracking/tracking.h" |
311 | #include "../tracking/tracking.h" |
312 | #include "../uart/uart1.h" |
312 | #include "../uart/uart1.h" |
313 | #include "../sound/pwmsine8bit.h" |
313 | #include "../sound/pwmsine8bit.h" |
314 | #include "../tracking/servo_setup.h" |
314 | #include "../tracking/servo_setup.h" |
315 | #include "../bluetooth/error.h" |
315 | #include "../bluetooth/error.h" |
316 | #include "../stick/stick_setup.h" |
316 | #include "../stick/stick_setup.h" |
317 | #include "../utils/menuctrl.h" |
317 | #include "../utils/menuctrl.h" |
318 | #include "../utils/xutils.h" |
318 | #include "../utils/xutils.h" |
319 | #include "../pkt/pkt.h" |
319 | #include "../pkt/pkt.h" |
320 | #include "../osd/osd.h" |
320 | #include "../osd/osd.h" |
321 | #include "../wifly/wifly_setup.h" |
321 | #include "../wifly/wifly_setup.h" |
322 | #include "../gps/gpsmouse.h" |
322 | #include "../gps/gpsmouse.h" |
323 | #include "../utils/scrollbox.h" |
323 | #include "../utils/scrollbox.h" |
324 | #include "../osd/osdold_messages.h" |
324 | #include "../osd/osdold_messages.h" |
325 | 325 | ||
326 | 326 | ||
327 | uint8_t edit = 0; |
327 | uint8_t edit = 0; |
328 | uint16_t Pre; |
328 | uint16_t Pre; |
329 | char EditString[21]; |
329 | char EditString[21]; |
330 | uint8_t length_tmp; |
330 | uint8_t length_tmp; |
331 | uint8_t Old_Baudrate; //Merkzelle für alte Baudrate |
331 | uint8_t Old_Baudrate; //Merkzelle für alte Baudrate |
332 | 332 | ||
333 | 333 | ||
334 | //############################################################################ |
334 | //############################################################################ |
335 | //############################################################################ |
335 | //############################################################################ |
336 | 336 | ||
337 | //----------------------------- |
337 | //----------------------------- |
338 | // Setup_Main() |
338 | // Setup_Main() |
339 | //----------------------------- |
339 | //----------------------------- |
340 | #define SETUP_MKCONNECTION 1 |
340 | #define SETUP_MKCONNECTION 1 |
341 | #define SETUP_PKTCONFIG 2 |
341 | #define SETUP_PKTCONFIG 2 |
342 | #define SETUP_WI232 3 |
342 | #define SETUP_WI232 3 |
343 | #define SETUP_BTM222 4 |
343 | #define SETUP_BTM222 4 |
344 | #define SETUP_SERVOCONFIG 5 |
344 | #define SETUP_SERVOCONFIG 5 |
345 | #define SETUP_OSDVIEW 6 |
345 | #define SETUP_OSDVIEW 6 |
346 | #define SETUP_TIME 7 |
346 | #define SETUP_TIME 7 |
347 | #define SETUP_GPSMAUS 8 |
347 | #define SETUP_GPSMAUS 8 |
348 | #define SETUP_FOLLOWME 9 |
348 | #define SETUP_FOLLOWME 9 |
349 | #define SETUP_JOYSTICK 10 |
349 | #define SETUP_JOYSTICK 10 |
350 | #define SETUP_PKTAKKU 11 |
350 | #define SETUP_PKTAKKU 11 |
351 | #define SETUP_PKTUPDATE 12 |
351 | #define SETUP_PKTUPDATE 12 |
352 | #define SETUP_PKTDEBUG 13 |
352 | #define SETUP_PKTDEBUG 13 |
353 | #define SETUP_EEPROMRESET 14 |
353 | #define SETUP_EEPROMRESET 14 |
354 | #define SETUP_WIFLY 15 |
354 | #define SETUP_WIFLY 15 |
355 | #define SETUP_OSDSCREENS 16 |
355 | #define SETUP_OSDSCREENS 16 |
356 | #define SETUP_BLE 17 |
356 | #define SETUP_BLE 17 |
357 | 357 | ||
358 | 358 | ||
359 | static const char SETUP_MKCONNECTION_de[] PROGMEM = "Verbindung MK"; |
359 | static const char SETUP_MKCONNECTION_de[] PROGMEM = "Verbindung MK"; |
360 | static const char SETUP_MKCONNECTION_en[] PROGMEM = "connection MK"; |
360 | static const char SETUP_MKCONNECTION_en[] PROGMEM = "connection MK"; |
361 | 361 | ||
362 | static const char SETUP_PKTCONFIG_de[] PROGMEM = "PKT Allgemein"; |
362 | static const char SETUP_PKTCONFIG_de[] PROGMEM = "PKT Allgemein"; |
363 | static const char SETUP_PKTCONFIG_en[] PROGMEM = "PKT general"; |
363 | static const char SETUP_PKTCONFIG_en[] PROGMEM = "PKT general"; |
364 | 364 | ||
365 | static const char SETUP_WI232_de[] PROGMEM = "Wi.232"; |
365 | static const char SETUP_WI232_de[] PROGMEM = "Wi.232"; |
366 | #define SETUP_WI232_en SETUP_WI232_de |
366 | #define SETUP_WI232_en SETUP_WI232_de |
367 | 367 | ||
368 | static const char SETUP_BTM222_de[] PROGMEM = "Bluetooth"; |
368 | static const char SETUP_BTM222_de[] PROGMEM = "Bluetooth"; |
369 | #define SETUP_BTM222_en SETUP_BTM222_de |
369 | #define SETUP_BTM222_en SETUP_BTM222_de |
370 | 370 | ||
371 | static const char SETUP_BLE_de[] PROGMEM = "Bluetooth BLE"; |
371 | static const char SETUP_BLE_de[] PROGMEM = "Bluetooth BLE"; |
372 | #define SETUP_BLE_en SETUP_BLE_de |
372 | #define SETUP_BLE_en SETUP_BLE_de |
373 | 373 | ||
374 | static const char SETUP_WIFLY_de[] PROGMEM = "WLAN WiFly"; |
374 | static const char SETUP_WIFLY_de[] PROGMEM = "WLAN WiFly"; |
375 | #define SETUP_WIFLY_en SETUP_WIFLY_de |
375 | #define SETUP_WIFLY_en SETUP_WIFLY_de |
376 | 376 | ||
377 | static const char SETUP_SERVOCONFIG_de[] PROGMEM = "Tracking"; |
377 | static const char SETUP_SERVOCONFIG_de[] PROGMEM = "Tracking"; |
378 | #define SETUP_SERVOCONFIG_en SETUP_SERVOCONFIG_de |
378 | #define SETUP_SERVOCONFIG_en SETUP_SERVOCONFIG_de |
379 | 379 | ||
380 | static const char SETUP_OSDVIEW_de[] PROGMEM = "OSD Anzeige"; |
380 | static const char SETUP_OSDVIEW_de[] PROGMEM = "OSD Anzeige"; |
381 | static const char SETUP_OSDVIEW_en[] PROGMEM = "OSD display"; |
381 | static const char SETUP_OSDVIEW_en[] PROGMEM = "OSD display"; |
382 | 382 | ||
383 | static const char SETUP_OSDSCREENS_de[] PROGMEM = "OSD Screens"; |
383 | static const char SETUP_OSDSCREENS_de[] PROGMEM = "OSD Screens"; |
384 | static const char SETUP_OSDSCREENS_en[] PROGMEM = "OSD screens"; |
384 | static const char SETUP_OSDSCREENS_en[] PROGMEM = "OSD screens"; |
385 | 385 | ||
386 | static const char SETUP_GPSMAUS_de[] PROGMEM = "GPS Maus"; |
386 | static const char SETUP_GPSMAUS_de[] PROGMEM = "GPS Maus"; |
387 | static const char SETUP_GPSMAUS_en[] PROGMEM = "GPS mouse"; |
387 | static const char SETUP_GPSMAUS_en[] PROGMEM = "GPS mouse"; |
388 | 388 | ||
389 | static const char SETUP_FOLLOWME_de[] PROGMEM = "Follow Me"; |
389 | static const char SETUP_FOLLOWME_de[] PROGMEM = "Follow Me"; |
390 | #define SETUP_FOLLOWME_en SETUP_FOLLOWME_de |
390 | #define SETUP_FOLLOWME_en SETUP_FOLLOWME_de |
391 | 391 | ||
392 | static const char SETUP_JOYSTICK_de[] PROGMEM = "Joystick"; |
392 | static const char SETUP_JOYSTICK_de[] PROGMEM = "Joystick"; |
393 | #define SETUP_JOYSTICK_en SETUP_JOYSTICK_de |
393 | #define SETUP_JOYSTICK_en SETUP_JOYSTICK_de |
394 | 394 | ||
395 | static const char SETUP_PKTUPDATE_de[] PROGMEM = "PKT Update"; |
395 | static const char SETUP_PKTUPDATE_de[] PROGMEM = "PKT Update"; |
396 | #define SETUP_PKTUPDATE_en SETUP_PKTUPDATE_de |
396 | #define SETUP_PKTUPDATE_en SETUP_PKTUPDATE_de |
397 | 397 | ||
398 | static const char SETUP_PKTDEBUG_de[] PROGMEM = "Debug PKT"; |
398 | static const char SETUP_PKTDEBUG_de[] PROGMEM = "Debug PKT"; |
399 | #define SETUP_PKTDEBUG_en SETUP_PKTDEBUG_de |
399 | #define SETUP_PKTDEBUG_en SETUP_PKTDEBUG_de |
400 | 400 | ||
401 | static const char SETUP_EEPROMRESET_de[] PROGMEM = "PKT Reset"; |
401 | static const char SETUP_EEPROMRESET_de[] PROGMEM = "PKT Reset"; |
402 | #define SETUP_EEPROMRESET_en SETUP_EEPROMRESET_de |
402 | #define SETUP_EEPROMRESET_en SETUP_EEPROMRESET_de |
403 | 403 | ||
404 | //############################################################################ |
404 | //############################################################################ |
405 | 405 | ||
406 | //----------------------------- |
406 | //----------------------------- |
407 | // Setup_PKTGeneric() ("PKT allgemein") |
407 | // Setup_PKTGeneric() ("PKT allgemein") |
408 | //----------------------------- |
408 | //----------------------------- |
409 | #define PKT_LANGUAGE 3 |
409 | #define PKT_LANGUAGE 3 |
410 | #define PKT_LIGHTOFF 4 |
410 | #define PKT_LIGHTOFF 4 |
411 | #define PKT_BRIGHTNESS 5 |
411 | #define PKT_BRIGHTNESS 5 |
412 | #define PKT_CONTRAST 6 |
412 | #define PKT_CONTRAST 6 |
413 | #define PKT_SOUNDMODUL 9 |
413 | #define PKT_SOUNDMODUL 9 |
414 | #define PKT_BEEPER 10 |
414 | #define PKT_BEEPER 10 |
415 | #define PKT_VOLUME 11 |
415 | #define PKT_VOLUME 11 |
416 | #define PKT_ACCUTYPE 12 |
416 | #define PKT_ACCUTYPE 12 |
417 | #define PKT_ACCUMEASURE 13 |
417 | #define PKT_ACCUMEASURE 13 |
418 | #define TIME_ZONE 14 |
418 | #define TIME_ZONE 14 |
419 | #define TIME_SUMMER 15 |
419 | #define TIME_SUMMER 15 |
420 | #define PKT_PKTOFF 16 |
420 | #define PKT_PKTOFF 16 |
421 | 421 | ||
422 | 422 | ||
423 | static const char LANGUAGE_de[] PROGMEM = "Sprache"; |
423 | static const char LANGUAGE_de[] PROGMEM = "Sprache"; |
424 | static const char LANGUAGE_en[] PROGMEM = "language"; |
424 | static const char LANGUAGE_en[] PROGMEM = "language"; |
425 | 425 | ||
426 | static const char TIME_ZONE_de[] PROGMEM = "Zeitzone UTC"; |
426 | static const char TIME_ZONE_de[] PROGMEM = "Zeitzone UTC"; |
427 | static const char TIME_ZONE_en[] PROGMEM = "time zone UTC"; |
427 | static const char TIME_ZONE_en[] PROGMEM = "time zone UTC"; |
428 | 428 | ||
429 | static const char TIME_SUMMER_de[] PROGMEM = "Sommerzeit"; |
429 | static const char TIME_SUMMER_de[] PROGMEM = "Sommerzeit"; |
430 | static const char TIME_SUMMER_en[] PROGMEM = "summer time"; |
430 | static const char TIME_SUMMER_en[] PROGMEM = "summer time"; |
431 | 431 | ||
432 | static const char PKT_PKTOFF_de[] PROGMEM = "PKT aus nach"; |
432 | static const char PKT_PKTOFF_de[] PROGMEM = "PKT aus nach"; |
433 | static const char PKT_PKTOFF_en[] PROGMEM = "PKT off after"; |
433 | static const char PKT_PKTOFF_en[] PROGMEM = "PKT off after"; |
434 | 434 | ||
435 | static const char LIGHTOFF_de[] PROGMEM = "LCD aus nach"; |
435 | static const char LIGHTOFF_de[] PROGMEM = "LCD aus nach"; |
436 | static const char LIGHTOFF_en[] PROGMEM = "LCD off after"; |
436 | static const char LIGHTOFF_en[] PROGMEM = "LCD off after"; |
437 | 437 | ||
438 | //static const char BRIGHTNESS_de[] PROGMEM = "LCD Helligkeit"; |
438 | //static const char BRIGHTNESS_de[] PROGMEM = "LCD Helligkeit"; |
439 | //static const char BRIGHTNESS_en[] PROGMEM = "LCD brightness"; |
439 | //static const char BRIGHTNESS_en[] PROGMEM = "LCD brightness"; |
440 | 440 | ||
441 | static const char CONTRAST_de[] PROGMEM = "LCD Kontrast"; |
441 | static const char CONTRAST_de[] PROGMEM = "LCD Kontrast"; |
442 | static const char CONTRAST_en[] PROGMEM = "LCD contrast"; |
442 | static const char CONTRAST_en[] PROGMEM = "LCD contrast"; |
443 | 443 | ||
444 | static const char BEEPER_de[] PROGMEM = "Hardware Beeper"; |
444 | static const char BEEPER_de[] PROGMEM = "Hardware Beeper"; |
445 | #define BEEPER_en BEEPER_de |
445 | #define BEEPER_en BEEPER_de |
446 | 446 | ||
447 | #ifdef USE_SOUND |
447 | #ifdef USE_SOUND |
448 | static const char SOUNDMODUL_de[] PROGMEM = "Soundmodul"; |
448 | static const char SOUNDMODUL_de[] PROGMEM = "Soundmodul"; |
449 | static const char SOUNDMODUL_en[] PROGMEM = "Soundmodule"; |
449 | static const char SOUNDMODUL_en[] PROGMEM = "Soundmodule"; |
450 | 450 | ||
451 | static const char VOLUME_de[] PROGMEM = "Lautstärke Sound"; |
451 | static const char VOLUME_de[] PROGMEM = "Lautstärke Sound"; |
452 | static const char VOLUME_en[] PROGMEM = "Volume Sound"; |
452 | static const char VOLUME_en[] PROGMEM = "Volume Sound"; |
453 | #endif |
453 | #endif |
454 | 454 | ||
455 | static const char ACCUTYPE_de[] PROGMEM = "Akku Typ"; |
455 | static const char ACCUTYPE_de[] PROGMEM = "Akku Typ"; |
456 | static const char ACCUTYPE_en[] PROGMEM = "Accu type"; |
456 | static const char ACCUTYPE_en[] PROGMEM = "Accu type"; |
457 | 457 | ||
458 | static const char ACCUMEASURE_de[] PROGMEM = "Akku Messung"; |
458 | static const char ACCUMEASURE_de[] PROGMEM = "Akku Messung"; |
459 | static const char ACCUMEASURE_en[] PROGMEM = "Accu measure"; |
459 | static const char ACCUMEASURE_en[] PROGMEM = "Accu measure"; |
460 | 460 | ||
461 | //############################################################################ |
461 | //############################################################################ |
462 | 462 | ||
463 | //----------------------------- |
463 | //----------------------------- |
464 | // Setup_MKConnection() |
464 | // Setup_MKConnection() |
465 | //----------------------------- |
465 | //----------------------------- |
466 | 466 | ||
467 | #define MKCONN_CONNECTION 1 |
467 | #define MKCONN_CONNECTION 1 |
468 | #define MKCONN_BAUDRATE 2 |
468 | #define MKCONN_BAUDRATE 2 |
469 | 469 | ||
470 | #define MKCONN_CONNECTION_de SETUP_MKCONNECTION_de |
470 | #define MKCONN_CONNECTION_de SETUP_MKCONNECTION_de |
471 | #define MKCONN_CONNECTION_en SETUP_MKCONNECTION_en |
471 | #define MKCONN_CONNECTION_en SETUP_MKCONNECTION_en |
472 | 472 | ||
473 | static const char MKCONN_BAUDRATE_de[] PROGMEM = "Baudrate Wi232/BT"; |
473 | static const char MKCONN_BAUDRATE_de[] PROGMEM = "Baudrate Wi232/BT"; |
474 | #define MKCONN_BAUDRATE_en MKCONN_BAUDRATE_de |
474 | #define MKCONN_BAUDRATE_en MKCONN_BAUDRATE_de |
475 | 475 | ||
476 | 476 | ||
477 | //############################################################################ |
477 | //############################################################################ |
478 | 478 | ||
479 | //----------------------------- |
479 | //----------------------------- |
480 | // Setup_WI232() |
480 | // Setup_WI232() |
481 | //----------------------------- |
481 | //----------------------------- |
482 | #define WI_INSTALLED 1 |
482 | #define WI_INSTALLED 1 |
483 | #define WI_TXRX 2 |
483 | #define WI_TXRX 2 |
484 | #define WI_GROUP 3 |
484 | #define WI_GROUP 3 |
485 | #define WI_MODE 4 |
485 | #define WI_MODE 4 |
486 | #define WI_TIMEOUT 5 |
486 | #define WI_TIMEOUT 5 |
487 | #define WI_MTU 6 |
487 | #define WI_MTU 6 |
488 | #define WI_INIT 7 |
488 | #define WI_INIT 7 |
489 | #define WI_PCCONFIG 8 |
489 | #define WI_PCCONFIG 8 |
490 | 490 | ||
491 | static const char WI_INSTALLED_de[] PROGMEM = "Modul eingebaut"; |
491 | static const char WI_INSTALLED_de[] PROGMEM = "Modul eingebaut"; |
492 | static const char WI_INSTALLED_en[] PROGMEM = "module built in"; |
492 | static const char WI_INSTALLED_en[] PROGMEM = "module built in"; |
493 | 493 | ||
494 | static const char WI_TXRX_de[] PROGMEM = "TX/RX Kanal"; |
494 | static const char WI_TXRX_de[] PROGMEM = "TX/RX Kanal"; |
495 | static const char WI_TXRX_en[] PROGMEM = "TX/RX Channel"; |
495 | static const char WI_TXRX_en[] PROGMEM = "TX/RX Channel"; |
496 | 496 | ||
497 | static const char WI_GROUP_de[] PROGMEM = "NetW. Gruppe"; |
497 | static const char WI_GROUP_de[] PROGMEM = "NetW. Gruppe"; |
498 | static const char WI_GROUP_en[] PROGMEM = "NetW. Group"; |
498 | static const char WI_GROUP_en[] PROGMEM = "NetW. Group"; |
499 | 499 | ||
500 | static const char WI_MODE_de[] PROGMEM = "NetW. Mode"; |
500 | static const char WI_MODE_de[] PROGMEM = "NetW. Mode"; |
501 | #define WI_MODE_en WI_MODE_de |
501 | #define WI_MODE_en WI_MODE_de |
502 | 502 | ||
503 | static const char WI_TIMEOUT_de[] PROGMEM = "TX Timeout"; |
503 | static const char WI_TIMEOUT_de[] PROGMEM = "TX Timeout"; |
504 | #define WI_TIMEOUT_en WI_TIMEOUT_de |
504 | #define WI_TIMEOUT_en WI_TIMEOUT_de |
505 | 505 | ||
506 | static const char WI_MTU_de[] PROGMEM = "TX MTU"; |
506 | static const char WI_MTU_de[] PROGMEM = "TX MTU"; |
507 | #define WI_MTU_en WI_MTU_de |
507 | #define WI_MTU_en WI_MTU_de |
508 | 508 | ||
509 | static const char WI_INIT_de[] PROGMEM = "Initialisieren"; |
509 | static const char WI_INIT_de[] PROGMEM = "Initialisieren"; |
510 | static const char WI_INIT_en[] PROGMEM = "initialize"; |
510 | static const char WI_INIT_en[] PROGMEM = "initialize"; |
511 | 511 | ||
512 | static const char WI_PCCONFIG_de[] PROGMEM = "Konfig. mit PC"; |
512 | static const char WI_PCCONFIG_de[] PROGMEM = "Konfig. mit PC"; |
513 | static const char WI_PCCONFIG_en[] PROGMEM = "config. with PC"; |
513 | static const char WI_PCCONFIG_en[] PROGMEM = "config. with PC"; |
514 | 514 | ||
515 | 515 | ||
516 | //############################################################################ |
516 | //############################################################################ |
517 | 517 | ||
518 | //----------------------------- |
518 | //----------------------------- |
519 | // Setup_BTM222() (Bluetooth) |
519 | // Setup_BTM222() (Bluetooth) |
520 | //----------------------------- |
520 | //----------------------------- |
521 | #define BT_INSTALLED 1 |
521 | #define BT_INSTALLED 1 |
522 | #define BT_NAME 2 |
522 | #define BT_NAME 2 |
523 | #define BT_PIN 3 |
523 | #define BT_PIN 3 |
524 | #define BT_INIT 4 |
524 | #define BT_INIT 4 |
525 | #define BT_MAC 5 |
525 | #define BT_MAC 5 |
526 | #define BT_REID 6 |
526 | #define BT_REID 6 |
527 | #define BT_PCCONFIG 7 |
527 | #define BT_PCCONFIG 7 |
528 | #define BT_SHOWCONFIG 8 |
528 | #define BT_SHOWCONFIG 8 |
529 | 529 | ||
530 | #define BT_INSTALLED_de WI_INSTALLED_de |
530 | #define BT_INSTALLED_de WI_INSTALLED_de |
531 | #define BT_INSTALLED_en WI_INSTALLED_en |
531 | #define BT_INSTALLED_en WI_INSTALLED_en |
532 | 532 | ||
533 | static const char BT_NAME_de[] PROGMEM = "BT Name"; |
533 | static const char BT_NAME_de[] PROGMEM = "BT Name"; |
534 | static const char BT_NAME_en[] PROGMEM = "BT name"; |
534 | static const char BT_NAME_en[] PROGMEM = "BT name"; |
535 | 535 | ||
536 | static const char BT_PIN_de[] PROGMEM = "BT Pin"; |
536 | static const char BT_PIN_de[] PROGMEM = "BT Pin"; |
537 | static const char BT_PIN_en[] PROGMEM = "BT pin"; |
537 | static const char BT_PIN_en[] PROGMEM = "BT pin"; |
538 | 538 | ||
539 | #define BT_INIT_de WI_INIT_de |
539 | #define BT_INIT_de WI_INIT_de |
540 | #define BT_INIT_en WI_INIT_en |
540 | #define BT_INIT_en WI_INIT_en |
541 | 541 | ||
542 | static const char BT_MAC_de[] PROGMEM = "zeige BT MAC"; |
542 | static const char BT_MAC_de[] PROGMEM = "zeige BT MAC"; |
543 | static const char BT_MAC_en[] PROGMEM = "show BT MAC"; |
543 | static const char BT_MAC_en[] PROGMEM = "show BT MAC"; |
544 | 544 | ||
545 | static const char BT_REID_de[] PROGMEM = "RE-ID Notiz"; |
545 | static const char BT_REID_de[] PROGMEM = "RE-ID Notiz"; |
546 | #define BT_REID_en BT_REID_de |
546 | #define BT_REID_en BT_REID_de |
547 | 547 | ||
548 | #define BT_PCCONFIG_de WI_PCCONFIG_de |
548 | #define BT_PCCONFIG_de WI_PCCONFIG_de |
549 | #define BT_PCCONFIG_en WI_PCCONFIG_en |
549 | #define BT_PCCONFIG_en WI_PCCONFIG_en |
550 | 550 | ||
551 | static const char BT_SHOWCONFIG_de[] PROGMEM = "zeige BT Konfig"; |
551 | static const char BT_SHOWCONFIG_de[] PROGMEM = "zeige BT Konfig"; |
552 | static const char BT_SHOWCONFIG_en[] PROGMEM = "show BT config"; |
552 | static const char BT_SHOWCONFIG_en[] PROGMEM = "show BT config"; |
553 | 553 | ||
554 | //############################################################################ |
554 | //############################################################################ |
555 | 555 | ||
556 | //----------------------------- |
556 | //----------------------------- |
557 | // Setup_BLE() (Bluetooth 4 Low Energy) |
557 | // Setup_BLE() (Bluetooth 4 Low Energy) |
558 | //----------------------------- |
558 | //----------------------------- |
559 | #define BLE_INSTALLED 1 |
559 | #define BLE_INSTALLED 1 |
560 | 560 | ||
561 | // Text ist in messages.c: MODULE_EXIST |
561 | // Text ist in messages.c: MODULE_EXIST |
562 | 562 | ||
563 | 563 | ||
564 | //############################################################################ |
564 | //############################################################################ |
565 | 565 | ||
566 | //----------------------------- |
566 | //----------------------------- |
567 | // Setup_GPSMouse() |
567 | // Setup_GPSMouse() |
568 | //----------------------------- |
568 | //----------------------------- |
569 | #define GPS_DEVICES 1 |
569 | #define GPS_DEVICES 1 |
570 | #define GPS_SEARCH 2 |
570 | #define GPS_SEARCH 2 |
571 | #define GPS_TYPE 3 |
571 | #define GPS_TYPE 3 |
572 | #define GPS_ACTIVE 4 |
572 | #define GPS_ACTIVE 4 |
573 | #define GPS_SHOWDEV 5 |
573 | #define GPS_SHOWDEV 5 |
574 | #define GPS_DATA 6 |
574 | #define GPS_DATA 6 |
575 | 575 | ||
576 | 576 | ||
577 | static const char GPS_SEARCH_de[] PROGMEM = "suche GPS-Maus"; |
577 | static const char GPS_SEARCH_de[] PROGMEM = "suche GPS-Maus"; |
578 | static const char GPS_SEARCH_en[] PROGMEM = "search GPS-mouse"; |
578 | static const char GPS_SEARCH_en[] PROGMEM = "search GPS-mouse"; |
579 | 579 | ||
580 | static const char GPS_DEVICES_de[] PROGMEM = "Geräteliste"; |
580 | static const char GPS_DEVICES_de[] PROGMEM = "Geräteliste"; |
581 | static const char GPS_DEVICES_en[] PROGMEM = "devicelist"; |
581 | static const char GPS_DEVICES_en[] PROGMEM = "devicelist"; |
582 | 582 | ||
583 | static const char GPS_SHOWDEV_de[] PROGMEM = "aktuelle Maus"; |
583 | static const char GPS_SHOWDEV_de[] PROGMEM = "aktuelle Maus"; |
584 | static const char GPS_SHOWDEV_en[] PROGMEM = "act. GPS-mouse"; |
584 | static const char GPS_SHOWDEV_en[] PROGMEM = "act. GPS-mouse"; |
585 | 585 | ||
586 | static const char GPS_DATA_de[] PROGMEM = "GPS-Maus Daten"; |
586 | static const char GPS_DATA_de[] PROGMEM = "GPS-Maus Daten"; |
587 | static const char GPS_DATA_en[] PROGMEM = "GPS-mouse data"; |
587 | static const char GPS_DATA_en[] PROGMEM = "GPS-mouse data"; |
588 | 588 | ||
589 | static const char GPS_TYPE_de[] PROGMEM = "GPS-Maus Typ"; // aktuell nicht verwendet |
589 | static const char GPS_TYPE_de[] PROGMEM = "GPS-Maus Typ"; // aktuell nicht verwendet |
590 | static const char GPS_TYPE_en[] PROGMEM = "GPS-mouse typ"; |
590 | static const char GPS_TYPE_en[] PROGMEM = "GPS-mouse typ"; |
591 | 591 | ||
592 | static const char GPS_ACTIVE_de[] PROGMEM = "GPS-Maus aktiv"; // aktuell nicht verwendet |
592 | static const char GPS_ACTIVE_de[] PROGMEM = "GPS-Maus aktiv"; // aktuell nicht verwendet |
593 | static const char GPS_ACTIVE_en[] PROGMEM = "GPS-mouse activ"; |
593 | static const char GPS_ACTIVE_en[] PROGMEM = "GPS-mouse activ"; |
594 | 594 | ||
595 | 595 | ||
596 | //############################################################################ |
596 | //############################################################################ |
597 | 597 | ||
598 | //----------------------------- |
598 | //----------------------------- |
599 | // Setup_FollowMe() |
599 | // Setup_FollowMe() |
600 | //----------------------------- |
600 | //----------------------------- |
601 | #define FME_DISTANCE 1 |
601 | #define FME_DISTANCE 1 |
602 | #define FME_SPEED 2 |
602 | #define FME_SPEED 2 |
603 | #define FME_RADIUS 3 |
603 | #define FME_RADIUS 3 |
604 | #define FME_AZIMUTH 4 |
604 | #define FME_AZIMUTH 4 |
605 | 605 | ||
606 | static const char FME_DISTANCE_de[] PROGMEM = "FollowMe Abstand"; |
606 | static const char FME_DISTANCE_de[] PROGMEM = "FollowMe Abstand"; |
607 | static const char FME_DISTANCE_en[] PROGMEM = "followMe distance"; |
607 | static const char FME_DISTANCE_en[] PROGMEM = "followMe distance"; |
608 | 608 | ||
609 | static const char FME_AZIMUTH_de[] PROGMEM = "FollowMe Winkel"; |
609 | static const char FME_AZIMUTH_de[] PROGMEM = "FollowMe Winkel"; |
610 | static const char FME_AZIMUTH_en[] PROGMEM = "followMe angle"; |
610 | static const char FME_AZIMUTH_en[] PROGMEM = "followMe angle"; |
611 | 611 | ||
612 | static const char FME_SPEED_de[] PROGMEM = "FollowMe Speed"; |
612 | static const char FME_SPEED_de[] PROGMEM = "FollowMe Speed"; |
613 | #define FME_SPEED_en FME_SPEED_de |
613 | #define FME_SPEED_en FME_SPEED_de |
614 | 614 | ||
615 | static const char FME_RADIUS_de[] PROGMEM = "Toleranz Radius"; |
615 | static const char FME_RADIUS_de[] PROGMEM = "Toleranz Radius"; |
616 | static const char FME_RADIUS_en[] PROGMEM = "tolerance radius"; |
616 | static const char FME_RADIUS_en[] PROGMEM = "tolerance radius"; |
617 | 617 | ||
618 | 618 | ||
619 | 619 | ||
620 | 620 | ||
621 | //############################################################################ |
621 | //############################################################################ |
622 | 622 | ||
623 | //----------------------------- |
623 | //----------------------------- |
624 | // Setup_OSD() |
624 | // Setup_OSD() |
625 | //----------------------------- |
625 | //----------------------------- |
626 | #define OSDS_SHOWCELLU 1 |
626 | #define OSDS_SHOWCELLU 1 |
627 | #define OSDS_LOWBAT 2 |
627 | #define OSDS_LOWBAT 2 |
628 | #define OSDS_RCERROR 3 |
628 | #define OSDS_RCERROR 3 |
629 | #define OSDS_MKSETTING 4 |
629 | #define OSDS_MKSETTING 4 |
630 | #define OSDS_MAH 5 |
630 | #define OSDS_MAH 5 |
631 | #define OSDS_DATASV2 6 |
631 | #define OSDS_DATASV2 6 |
632 | #define OSDS_OUTFORMAT 7 |
632 | #define OSDS_OUTFORMAT 7 |
633 | #define OSDS_OUTPOLARITY 8 |
633 | #define OSDS_OUTPOLARITY 8 |
634 | #define OSDS_FALLSPEED 9 |
634 | #define OSDS_FALLSPEED 9 |
635 | #define OSDS_VARIOBEEP 10 |
635 | #define OSDS_VARIOBEEP 10 |
636 | #define OSDS_VOLTBAR 11 |
636 | #define OSDS_VOLTBAR 11 |
637 | 637 | ||
638 | 638 | ||
639 | static const char OSDS_LOWBAT_de[] PROGMEM = "Warn Unterspannung"; |
639 | static const char OSDS_LOWBAT_de[] PROGMEM = "Warn Unterspannung"; |
640 | static const char OSDS_LOWBAT_en[] PROGMEM = "Warn LowBat"; |
640 | static const char OSDS_LOWBAT_en[] PROGMEM = "Warn LowBat"; |
641 | 641 | ||
642 | static const char OSDS_MAH_de[] PROGMEM = "Warn mAh"; |
642 | static const char OSDS_MAH_de[] PROGMEM = "Warn mAh"; |
643 | static const char OSDS_MAH_en[] PROGMEM = "Warn mAh"; |
643 | static const char OSDS_MAH_en[] PROGMEM = "Warn mAh"; |
644 | 644 | ||
645 | static const char OSDS_RCERROR_de[] PROGMEM = "Warn RC-Fehler"; |
645 | static const char OSDS_RCERROR_de[] PROGMEM = "Warn RC-Fehler"; |
646 | static const char OSDS_RCERROR_en[] PROGMEM = "Warn RC-Error"; |
646 | static const char OSDS_RCERROR_en[] PROGMEM = "Warn RC-Error"; |
647 | 647 | ||
648 | static const char OSDS_SHOWCELLU_de[] PROGMEM = "zeige Zellspannung"; |
648 | static const char OSDS_SHOWCELLU_de[] PROGMEM = "zeige Zellspannung"; |
649 | static const char OSDS_SHOWCELLU_en[] PROGMEM = "show cell voltage"; |
649 | static const char OSDS_SHOWCELLU_en[] PROGMEM = "show cell voltage"; |
650 | 650 | ||
651 | static const char OSDS_MKSETTING_de[] PROGMEM = "zeige MK Setting"; |
651 | static const char OSDS_MKSETTING_de[] PROGMEM = "zeige MK Setting"; |
652 | static const char OSDS_MKSETTING_en[] PROGMEM = "show mk setting"; |
652 | static const char OSDS_MKSETTING_en[] PROGMEM = "show mk setting"; |
653 | 653 | ||
654 | static const char OSDS_DATASV2_de[] PROGMEM = "Navi Daten an SV2"; |
654 | static const char OSDS_DATASV2_de[] PROGMEM = "Navi Daten an SV2"; |
655 | static const char OSDS_DATASV2_en[] PROGMEM = "Navi data to SV2"; |
655 | static const char OSDS_DATASV2_en[] PROGMEM = "Navi data to SV2"; |
656 | 656 | ||
657 | 657 | ||
658 | #ifdef USE_OSD_SCREEN_OLD |
658 | #ifdef USE_OSD_SCREEN_OLD |
659 | static const char OSDS_OUTFORMAT_de[] PROGMEM = "OUT1/2 Format"; |
659 | static const char OSDS_OUTFORMAT_de[] PROGMEM = "OUT1/2 Format"; |
660 | static const char OSDS_OUTFORMAT_en[] PROGMEM = "OUT1/2 format"; |
660 | static const char OSDS_OUTFORMAT_en[] PROGMEM = "OUT1/2 format"; |
661 | 661 | ||
662 | static const char OSDS_FALLSPEED_de[] PROGMEM = "Max. Sinkrate m/s"; |
662 | static const char OSDS_FALLSPEED_de[] PROGMEM = "Max. Sinkrate m/s"; |
663 | static const char OSDS_FALLSPEED_en[] PROGMEM = "max fallspeed m/s"; |
663 | static const char OSDS_FALLSPEED_en[] PROGMEM = "max fallspeed m/s"; |
664 | 664 | ||
665 | static const char OSDS_VARIOBEEP_de[] PROGMEM = "Variometer Beep"; |
665 | static const char OSDS_VARIOBEEP_de[] PROGMEM = "Variometer Beep"; |
666 | static const char OSDS_VARIOBEEP_en[] PROGMEM = "Variometer beep"; |
666 | static const char OSDS_VARIOBEEP_en[] PROGMEM = "Variometer beep"; |
667 | 667 | ||
668 | static const char OSDS_OUTPOLARITY_de[] PROGMEM = "OUT1/2 Polarität"; |
668 | static const char OSDS_OUTPOLARITY_de[] PROGMEM = "OUT1/2 Polarität"; |
669 | static const char OSDS_OUTPOLARITY_en[] PROGMEM = "OUT1/2 polarity"; |
669 | static const char OSDS_OUTPOLARITY_en[] PROGMEM = "OUT1/2 polarity"; |
670 | 670 | ||
671 | static const char OSDS_VOLTBAR_de[] PROGMEM = "Volt Balken"; |
671 | static const char OSDS_VOLTBAR_de[] PROGMEM = "Volt Balken"; |
672 | static const char OSDS_VOLTBAR_en[] PROGMEM = "volt bargraph"; |
672 | static const char OSDS_VOLTBAR_en[] PROGMEM = "volt bargraph"; |
673 | #endif |
673 | #endif |
674 | 674 | ||
675 | 675 | ||
676 | 676 | ||
677 | //############################################################################ |
677 | //############################################################################ |
678 | 678 | ||
679 | 679 | ||
680 | //############################################################################ |
680 | //############################################################################ |
681 | //# Allgemeines |
681 | //# Allgemeines |
682 | //############################################################################ |
682 | //############################################################################ |
683 | 683 | ||
684 | //-------------------------------------------------------------- |
684 | //-------------------------------------------------------------- |
685 | //-------------------------------------------------------------- |
685 | //-------------------------------------------------------------- |
686 | void Wait4KeyOK( void ) |
686 | void Wait4KeyOK( void ) |
687 | { |
687 | { |
688 | set_beep( 60, 0xffff, BeepNormal); |
688 | set_beep( 60, 0xffff, BeepNormal); |
689 | lcd_printp_at(19, 7, strGet(OK) , MNORMAL); |
689 | lcd_printp_at(19, 7, strGet(OK) , MNORMAL); |
690 | while( !get_key_press(1 << KEY_ENTER) ) PKT_CtrlHook(); // PKT-Update usw... |
690 | while( !get_key_press(1 << KEY_ENTER) ) PKT_CtrlHook(); // PKT-Update usw... |
691 | clear_key_all(); |
691 | clear_key_all(); |
692 | } |
692 | } |
693 | 693 | ||
694 | 694 | ||
695 | //-------------------------------------------------------------- |
695 | //-------------------------------------------------------------- |
696 | //-------------------------------------------------------------- |
696 | //-------------------------------------------------------------- |
697 | void Wait4KeyENDE( uint8_t beep ) |
697 | void Wait4KeyENDE( uint8_t beep ) |
698 | { |
698 | { |
699 | if( beep ) set_beep( 60, 0xffff, BeepNormal); |
699 | if( beep ) set_beep( 60, 0xffff, BeepNormal); |
700 | lcd_printp_at(12, 7, strGet(ENDE) , MNORMAL); |
700 | lcd_printp_at(12, 7, strGet(ENDE) , MNORMAL); |
701 | while( !get_key_press(1 << KEY_ESC) ) |
701 | while( !get_key_press(1 << KEY_ESC) ) |
702 | { |
702 | { |
703 | show_Lipo(); |
703 | show_Lipo(); |
704 | PKT_CtrlHook(); // PKT-Update usw... |
704 | PKT_CtrlHook(); // PKT-Update usw... |
705 | } |
705 | } |
706 | clear_key_all(); |
706 | clear_key_all(); |
707 | } |
707 | } |
708 | 708 | ||
709 | 709 | ||
710 | //############################################################################ |
710 | //############################################################################ |
711 | //# BT-Funktionen (GPS-Maus) |
711 | //# BT-Funktionen (GPS-Maus) |
712 | //############################################################################ |
712 | //############################################################################ |
713 | 713 | ||
714 | #ifdef USE_BLUETOOTH |
714 | #ifdef USE_BLUETOOTH |
715 | 715 | ||
716 | //-------------------------------------------------------------- |
716 | //-------------------------------------------------------------- |
717 | // BT_CheckBTM222() |
717 | // BT_CheckBTM222() |
718 | // |
718 | // |
719 | // prueft ob das Bluetooth Modul im PKT installiert ist |
719 | // prueft ob das Bluetooth Modul im PKT installiert ist |
720 | //-------------------------------------------------------------- |
720 | //-------------------------------------------------------------- |
721 | uint8_t BT_CheckBTM222( void ) |
721 | uint8_t BT_CheckBTM222( void ) |
722 | { |
722 | { |
723 | if( !Config.UseBT ) |
723 | if( !Config.UseBT ) |
724 | { |
724 | { |
725 | // PKT_Message_P( text, error, timeout, beep, clearscreen) |
725 | // PKT_Message_P( text, error, timeout, beep, clearscreen) |
726 | PKT_Message_P( strGet(STR_NOBTM222), true, 1000, true, true); // 1000 = max. 10 Sekunden anzeigen; "kein BTM222 vorh." |
726 | PKT_Message_P( strGet(STR_NOBTM222), true, 1000, true, true); // 1000 = max. 10 Sekunden anzeigen; "kein BTM222 vorh." |
727 | return false; // -> kein BTM222 eingebaut |
727 | return false; // -> kein BTM222 eingebaut |
728 | } |
728 | } |
729 | 729 | ||
730 | return true; |
730 | return true; |
731 | } |
731 | } |
732 | 732 | ||
733 | 733 | ||
734 | 734 | ||
735 | //-------------------------------------------------------------- |
735 | //-------------------------------------------------------------- |
736 | // BT_SelectDevice() |
736 | // BT_SelectDevice() |
737 | // |
737 | // |
738 | // Auswahl eines BT-Device aus einer Liste von BT-Devices |
738 | // Auswahl eines BT-Device aus einer Liste von BT-Devices |
739 | //-------------------------------------------------------------- |
739 | //-------------------------------------------------------------- |
740 | void BT_SelectDevice( void ) |
740 | void BT_SelectDevice( void ) |
741 | { |
741 | { |
742 | uint8_t itemid; |
742 | uint8_t itemid; |
743 | uint8_t event; |
743 | uint8_t event; |
744 | uint8_t i; |
744 | uint8_t i; |
745 | 745 | ||
746 | //------------------------------- |
746 | //------------------------------- |
747 | // BTM222 Modul vorhanden? |
747 | // BTM222 Modul vorhanden? |
748 | //------------------------------- |
748 | //------------------------------- |
749 | if( !BT_CheckBTM222() ) return; |
749 | if( !BT_CheckBTM222() ) return; |
750 | 750 | ||
751 | 751 | ||
752 | //------------------------------- |
752 | //------------------------------- |
753 | // BT Device-Suche durchgefuert? |
753 | // BT Device-Suche durchgefuert? |
754 | //------------------------------- |
754 | //------------------------------- |
755 | if( bt_devicecount == 0 ) |
755 | if( bt_devicecount == 0 ) |
756 | { |
756 | { |
757 | // PKT_Message_P( text, error, timeout, beep, clearscreen) |
757 | // PKT_Message_P( text, error, timeout, beep, clearscreen) |
758 | PKT_Message_P( PSTR("Suche durchführen!"), true, 1000, true, true); // 1000 = max. 10 Sekunden anzeigen; "kein BTM222 vorh." |
758 | PKT_Message_P( PSTR("Suche durchführen!"), true, 1000, true, true); // 1000 = max. 10 Sekunden anzeigen; "kein BTM222 vorh." |
759 | return; |
759 | return; |
760 | } |
760 | } |
761 | 761 | ||
762 | 762 | ||
763 | //--------------- |
763 | //--------------- |
764 | // Create |
764 | // Create |
765 | //--------------- |
765 | //--------------- |
766 | MenuCtrl_Create(); |
766 | MenuCtrl_Create(); |
767 | MenuCtrl_SetTitle_P( strGet(STR_BT_DEVICES) ); // "BT Geräte" |
767 | MenuCtrl_SetTitle_P( strGet(STR_BT_DEVICES) ); // "BT Geräte" |
768 | 768 | ||
769 | //--------------- |
769 | //--------------- |
770 | // Menuitems |
770 | // Menuitems |
771 | //--------------- |
771 | //--------------- |
772 | for( i = 0; i < bt_devicecount; i++ ) |
772 | for( i = 0; i < bt_devicecount; i++ ) |
773 | { |
773 | { |
774 | MenuCtrl_Push( i, MENU_ITEM, NOFUNC, device_list[i].DevName ); |
774 | MenuCtrl_Push( i, MENU_ITEM, NOFUNC, device_list[i].DevName ); |
775 | 775 | ||
776 | if( strncmp(device_list[i].mac,Config.gps_UsedMac,14) == 0 ) |
776 | if( strncmp(device_list[i].mac,Config.gps_UsedMac,14) == 0 ) |
777 | MenuCtrl_ItemMark( i, true ); // aktuelles BT-Device markieren |
777 | MenuCtrl_ItemMark( i, true ); // aktuelles BT-Device markieren |
778 | } |
778 | } |
779 | 779 | ||
780 | //--------------- |
780 | //--------------- |
781 | // Control |
781 | // Control |
782 | //--------------- |
782 | //--------------- |
783 | event = MenuCtrl_Control( MENUCTRL_EVENT ); |
783 | event = MenuCtrl_Control( MENUCTRL_EVENT ); |
784 | 784 | ||
785 | if( event == MENUEVENT_ITEM ) |
785 | if( event == MENUEVENT_ITEM ) |
786 | { |
786 | { |
787 | itemid = MenuCtrl_GetItemId(); // welcher Menu-Punkt (ID) |
787 | itemid = MenuCtrl_GetItemId(); // welcher Menu-Punkt (ID) |
788 | strncpy( Config.gps_UsedMac , device_list[itemid].mac , 14); |
788 | strncpy( Config.gps_UsedMac , device_list[itemid].mac , 14); |
789 | strncpy( Config.gps_UsedDevName, device_list[itemid].DevName, 20); |
789 | strncpy( Config.gps_UsedDevName, device_list[itemid].DevName, 20); |
790 | } |
790 | } |
791 | 791 | ||
792 | //--------------- |
792 | //--------------- |
793 | // Destroy |
793 | // Destroy |
794 | //--------------- |
794 | //--------------- |
795 | MenuCtrl_Destroy(); |
795 | MenuCtrl_Destroy(); |
796 | } |
796 | } |
797 | 797 | ||
798 | 798 | ||
799 | 799 | ||
800 | //-------------------------------------------------------------- |
800 | //-------------------------------------------------------------- |
801 | // BT_SearchDevices() |
801 | // BT_SearchDevices() |
802 | // |
802 | // |
803 | // sucht BT-Devices |
803 | // sucht BT-Devices |
804 | //-------------------------------------------------------------- |
804 | //-------------------------------------------------------------- |
805 | void BT_SearchDevices( void ) |
805 | void BT_SearchDevices( void ) |
806 | { |
806 | { |
807 | uint8_t wahl; |
807 | uint8_t wahl; |
808 | 808 | ||
809 | char *title; |
809 | char *title; |
810 | 810 | ||
811 | //------------------- |
811 | //------------------- |
812 | // 1. Frage: suchen? |
812 | // 1. Frage: suchen? |
813 | //------------------- |
813 | //------------------- |
814 | if( Config.gps_UsedDevName[0] != 0 ) // ist eine BT GPS-Maus bereits vorhanden? |
814 | if( Config.gps_UsedDevName[0] != 0 ) // ist eine BT GPS-Maus bereits vorhanden? |
815 | title = Config.gps_UsedDevName; // dann zeige im Titel den Namen der GPS-Maus an |
815 | title = Config.gps_UsedDevName; // dann zeige im Titel den Namen der GPS-Maus an |
816 | else |
816 | else |
817 | title = "BT Devices"; |
817 | title = "BT Devices"; |
818 | 818 | ||
819 | set_beep( 50, 0xffff, BeepNormal); |
819 | set_beep( 50, 0xffff, BeepNormal); |
820 | 820 | ||
821 | //wahl = PKT_AskX( asktype, text1, text2, text_progmem, headline, headline_progmem, title, title_progmem) |
821 | //wahl = PKT_AskX( asktype, text1, text2, text_progmem, headline, headline_progmem, title, title_progmem) |
822 | wahl = PKT_AskX( ASK_END_START, strGet(STR_SEARCH_BT_ASK), strGet(STR_BT_SEARCHTIME), true, MenuCtrl_GetItemText(), true, title, false); // "BT Geräte suchen?" |
822 | wahl = PKT_AskX( ASK_END_START, strGet(STR_SEARCH_BT_ASK), strGet(STR_BT_SEARCHTIME), true, MenuCtrl_GetItemText(), true, title, false); // "BT Geräte suchen?" |
823 | 823 | ||
824 | 824 | ||
825 | //------------------- |
825 | //------------------- |
826 | // 2. BT suchen |
826 | // 2. BT suchen |
827 | //------------------- |
827 | //------------------- |
828 | if( wahl ) |
828 | if( wahl ) |
829 | { |
829 | { |
830 | if( BT_CheckBTM222() ) |
830 | if( BT_CheckBTM222() ) |
831 | { |
831 | { |
832 | //PKT_Title_P( text, lShowLipo, clearscreen ) |
832 | //PKT_Title_P( text, lShowLipo, clearscreen ) |
833 | PKT_Title_P( PSTR("BT Suche"), true, true ); |
833 | PKT_Title_P( PSTR("BT Suche"), true, true ); |
834 | 834 | ||
835 | lcdx_printp_center( 2, strGet(STR_SEARCH_BT), MNORMAL, 0,1); // "suche BT Geräte" |
835 | lcdx_printp_center( 2, strGet(STR_SEARCH_BT), MNORMAL, 0,1); // "suche BT Geräte" |
836 | 836 | ||
837 | //PKT_Gauge_Begin( 0 ); // Gauge: 0 = Default fuer y verwenden |
837 | //PKT_Gauge_Begin( 0 ); // Gauge: 0 = Default fuer y verwenden |
838 | 838 | ||
839 | set_BTOn(); |
839 | set_BTOn(); |
840 | bt_downlink_init(); |
840 | bt_downlink_init(); |
841 | 841 | ||
842 | lcd_printp_at( 11, 7, strGet(KEYCANCEL), MNORMAL); // Keyline: "Abbr." bzw "Cancel" |
842 | lcd_printp_at( 11, 7, strGet(KEYCANCEL), MNORMAL); // Keyline: "Abbr." bzw "Cancel" |
843 | bt_searchDevice(); |
843 | bt_searchDevice(); |
844 | 844 | ||
845 | set_BTOff(); |
845 | set_BTOff(); |
846 | 846 | ||
847 | //PKT_Gauge_End(); // Gauge: Ende |
847 | //PKT_Gauge_End(); // Gauge: Ende |
848 | 848 | ||
849 | if( bt_devicecount==0 ) |
849 | if( bt_devicecount==0 ) |
850 | { |
850 | { |
851 | //PKT_Message_P( text, error, timeout, beep, clearscreen) |
851 | //PKT_Message_P( text, error, timeout, beep, clearscreen) |
852 | PKT_Message_P( strGet(STR_NO_BT_FOUND), true, 2000, true, true); |
852 | PKT_Message_P( strGet(STR_NO_BT_FOUND), true, 2000, true, true); |
853 | } |
853 | } |
854 | else |
854 | else |
855 | { |
855 | { |
856 | set_beep( 50, 0xffff, BeepNormal); |
856 | set_beep( 50, 0xffff, BeepNormal); |
857 | BT_SelectDevice(); |
857 | BT_SelectDevice(); |
858 | } |
858 | } |
859 | } |
859 | } |
860 | } |
860 | } |
861 | } |
861 | } |
862 | 862 | ||
863 | 863 | ||
864 | #endif // end: #ifdef USE_BLUETOOTH |
864 | #endif // end: #ifdef USE_BLUETOOTH |
865 | 865 | ||
866 | 866 | ||
867 | 867 | ||
868 | 868 | ||
869 | //############################################################################ |
869 | //############################################################################ |
870 | //# Edit-Funktionen |
870 | //# Edit-Funktionen |
871 | //############################################################################ |
871 | //############################################################################ |
872 | 872 | ||
873 | 873 | ||
874 | //-------------------------------------------------------------- |
874 | //-------------------------------------------------------------- |
875 | // Ausgabe von Werten fuer Edit_generic() |
875 | // Ausgabe von Werten fuer Edit_generic() |
876 | //-------------------------------------------------------------- |
876 | //-------------------------------------------------------------- |
877 | void Edit_generic_printout( int16_t Value, int16_t min, int16_t max, uint8_t what, int8_t yoffs) |
877 | void Edit_generic_printout( int16_t Value, int16_t min, int16_t max, uint8_t what, int8_t yoffs) |
878 | { |
878 | { |
879 | const char *pStr = 0; // PGM |
879 | const char *pStr = 0; // PGM |
880 | const char *pstr = 0; // RAM |
880 | const char *pstr = 0; // RAM |
881 | //uint8_t x = 0; |
881 | //uint8_t x = 0; |
882 | //uint8_t y = 3; |
882 | //uint8_t y = 3; |
883 | 883 | ||
884 | 884 | ||
885 | switch( what ) |
885 | switch( what ) |
886 | { |
886 | { |
887 | case Show_uint3: pstr = buffered_sprintf_P( PSTR("%3d"), Value ); |
887 | case Show_uint3: pstr = buffered_sprintf_P( PSTR("%3d"), Value ); |
888 | break; |
888 | break; |
889 | 889 | ||
890 | 890 | ||
891 | case Show_uint5: pstr = buffered_sprintf_P( PSTR("%5d"), Value ); |
891 | case Show_uint5: pstr = buffered_sprintf_P( PSTR("%5d"), Value ); |
892 | break; |
892 | break; |
893 | 893 | ||
894 | 894 | ||
895 | case Show_uint10th: pstr = buffered_sprintf_P( PSTR("%2.1d"), Value ); |
895 | case Show_uint10th: pstr = buffered_sprintf_P( PSTR("%2.1d"), Value ); |
896 | break; |
896 | break; |
897 | 897 | ||
898 | 898 | ||
899 | case MK_Connection: switch( Value ) |
899 | case MK_Connection: switch( Value ) |
900 | { |
900 | { |
901 | case 0: pStr = PSTR("Wi.232"); break; |
901 | case 0: pStr = PSTR("Wi.232"); break; |
902 | case 1: pStr = strGet(KABEL); break; |
902 | case 1: pStr = strGet(KABEL); break; |
903 | } |
903 | } |
904 | 904 | ||
905 | if( (Value == 0) && (Config.UseWi == false) ) |
905 | if( (Value == 0) && (Config.UseWi == false) ) |
906 | { |
906 | { |
907 | lcd_rect_round( 0, 37, 127, 21-6, 1, R2); // Rahmen |
907 | lcd_rect_round( 0, 37, 127, 21-6, 1, R2); // Rahmen |
908 | lcdx_printp_center( 6, strGet(STR_WI232_ACTIVATE), MNORMAL, 0,-7); // "aktiviere Wi.232!" |
908 | lcdx_printp_center( 6, strGet(STR_WI232_ACTIVATE), MNORMAL, 0,-7); // "aktiviere Wi.232!" |
909 | } |
909 | } |
910 | else |
910 | else |
911 | { |
911 | { |
912 | lcd_frect( 0, 37, 127, 21-6, 0); // Hilfebereich loeschen |
912 | lcd_frect( 0, 37, 127, 21-6, 0); // Hilfebereich loeschen |
913 | } |
913 | } |
914 | break; |
914 | break; |
915 | 915 | ||
916 | 916 | ||
917 | case GPSMOUSE: switch( Value ) |
917 | case GPSMOUSE: switch( Value ) |
918 | { |
918 | { |
919 | case GPS_Bluetoothmouse1: pStr = PSTR("BT-Mouse"); break; |
919 | case GPS_Bluetoothmouse1: pStr = PSTR("BT-Mouse"); break; |
920 | case GPS_Mikrokopter: pStr = PSTR("Mikrokopter"); break; |
920 | case GPS_Mikrokopter: pStr = PSTR("Mikrokopter"); break; |
921 | default: pStr = PSTR("unknown"); |
921 | default: pStr = PSTR("unknown"); |
922 | } |
922 | } |
923 | break; |
923 | break; |
924 | 924 | ||
925 | 925 | ||
926 | case Wi_Netmode: switch( Value ) |
926 | case Wi_Netmode: switch( Value ) |
927 | { |
927 | { |
928 | case false: pStr = strGet(SLAVE); break; |
928 | case false: pStr = strGet(SLAVE); break; |
929 | case true : pStr = strGet(NORMAL); break; |
929 | case true : pStr = strGet(NORMAL); break; |
930 | } |
930 | } |
931 | break; |
931 | break; |
932 | 932 | ||
933 | 933 | ||
934 | 934 | ||
935 | case OnOff: switch( Value ) |
935 | case OnOff: switch( Value ) |
936 | { |
936 | { |
937 | case 0: pStr = strGet(OFF); break; |
937 | case 0: pStr = strGet(OFF); break; |
938 | case 1: pStr = strGet(ON); break; |
938 | case 1: pStr = strGet(ON); break; |
939 | } |
939 | } |
940 | break; |
940 | break; |
941 | 941 | ||
942 | 942 | ||
943 | case YesNo: switch( Value ) |
943 | case YesNo: switch( Value ) |
944 | { |
944 | { |
945 | case 0: pStr = strGet(NOO); break; |
945 | case 0: pStr = strGet(NOO); break; |
946 | case 1: pStr = strGet(YES); break; |
946 | case 1: pStr = strGet(YES); break; |
947 | } |
947 | } |
948 | break; |
948 | break; |
949 | 949 | ||
950 | 950 | ||
951 | case WlanMode: switch( Value ) |
951 | case WlanMode: switch( Value ) |
952 | { |
952 | { |
953 | case 0: pStr = strGet(OFF); break; |
953 | case 0: pStr = strGet(OFF); break; |
954 | case 1: pStr = PSTR("AP-Mode"); break; |
954 | case 1: pStr = PSTR("AP-Mode"); break; |
955 | case 2: pStr = PSTR("AdHoc"); break; |
955 | case 2: pStr = PSTR("AdHoc"); break; |
956 | } |
956 | } |
957 | break; |
957 | break; |
958 | 958 | ||
959 | 959 | ||
960 | 960 | ||
961 | case NormRev: switch( Value ) // wird noch von stick/stick_setup.c verwendet |
961 | case NormRev: switch( Value ) // wird noch von stick/stick_setup.c verwendet |
962 | { |
962 | { |
963 | case 0 : pStr = strGet(NORMAL); break; |
963 | case 0 : pStr = strGet(NORMAL); break; |
964 | case 1 : pStr = strGet(REVERSE); break; |
964 | case 1 : pStr = strGet(REVERSE); break; |
965 | } |
965 | } |
966 | break; |
966 | break; |
967 | 967 | ||
968 | 968 | ||
969 | case Kontrast: if( Value >= max ) |
969 | case Kontrast: if( Value >= max ) |
970 | { |
970 | { |
971 | Value = max; |
971 | Value = max; |
972 | set_beep( 200, 0x0080, BeepNormal); |
972 | set_beep( 200, 0x0080, BeepNormal); |
973 | } |
973 | } |
974 | 974 | ||
975 | if( Value == min ) |
975 | if( Value == min ) |
976 | { |
976 | { |
977 | Value = min; |
977 | Value = min; |
978 | set_beep( 200, 0x0080, BeepNormal); |
978 | set_beep( 200, 0x0080, BeepNormal); |
979 | } |
979 | } |
980 | 980 | ||
981 | lcd_set_contrast( Value ); |
981 | lcd_set_contrast( Value ); |
982 | 982 | ||
983 | pstr = buffered_sprintf_P( PSTR("%3d"), Value ); |
983 | pstr = buffered_sprintf_P( PSTR("%3d"), Value ); |
984 | break; |
984 | break; |
985 | 985 | ||
986 | 986 | ||
987 | case Baudrate: pstr = buffered_sprintf_P( PSTR("%ld"), Baud_to_uint32(Value) ); |
987 | case Baudrate: pstr = buffered_sprintf_P( PSTR("%ld"), Baud_to_uint32(Value) ); |
988 | break; |
988 | break; |
989 | 989 | ||
990 | 990 | ||
991 | case Language: switch( Value ) |
991 | case Language: switch( Value ) |
992 | { |
992 | { |
993 | case 0: pStr = strGet(DEUTSCH); break; |
993 | case 0: pStr = strGet(DEUTSCH); break; |
994 | case 1: pStr = strGet(ENGLISCH); break; |
994 | case 1: pStr = strGet(ENGLISCH); break; |
995 | } |
995 | } |
996 | break; |
996 | break; |
997 | 997 | ||
998 | 998 | ||
999 | case Sticktype: switch( Value ) |
999 | case Sticktype: switch( Value ) |
1000 | { |
1000 | { |
1001 | case false: pStr = strGet(POTI); break; |
1001 | case false: pStr = strGet(POTI); break; |
1002 | case true : pStr = strGet(TASTER); break; |
1002 | case true : pStr = strGet(TASTER); break; |
1003 | } |
1003 | } |
1004 | break; |
1004 | break; |
1005 | 1005 | ||
1006 | 1006 | ||
1007 | /* |
1007 | /* |
1008 | case WlanSecurity: // Anmerkung 02.04.2014 OG: wird aktuell nicht benoetigt weil anders geloest |
1008 | case WlanSecurity: // Anmerkung 02.04.2014 OG: wird aktuell nicht benoetigt weil anders geloest |
1009 | switch (Value) |
1009 | switch (Value) |
1010 | { |
1010 | { |
1011 | case 0x0 : lcd_printp_at(15, 2, PSTR("Adhoc"), 0); |
1011 | case 0x0 : lcd_printp_at(15, 2, PSTR("Adhoc"), 0); |
1012 | break; |
1012 | break; |
1013 | case 0x1 : lcd_printp_at(15, 2, PSTR("WPA "), 0); |
1013 | case 0x1 : lcd_printp_at(15, 2, PSTR("WPA "), 0); |
1014 | break; |
1014 | break; |
1015 | } |
1015 | } |
1016 | break; |
1016 | break; |
1017 | */ |
1017 | */ |
1018 | 1018 | ||
1019 | case PKT_Akku: switch( Value ) |
1019 | case PKT_Akku: switch( Value ) |
1020 | { |
1020 | { |
1021 | case true : pStr = PSTR("Lipo"); break; |
1021 | case true : pStr = PSTR("Lipo"); break; |
1022 | case false: pStr = PSTR("LiIon"); break; |
1022 | case false: pStr = PSTR("LiIon"); break; |
1023 | } |
1023 | } |
1024 | break; |
1024 | break; |
1025 | } // end: switch( what ) |
1025 | } // end: switch( what ) |
1026 | 1026 | ||
1027 | 1027 | ||
1028 | 1028 | ||
1029 | //lcdx_printf_at_P( uint8_t x, uint8_t y, uint8_t mode, int8_t xoffs, int8_t yoffs, const char *format, ... ) |
1029 | //lcdx_printf_at_P( uint8_t x, uint8_t y, uint8_t mode, int8_t xoffs, int8_t yoffs, const char *format, ... ) |
1030 | 1030 | ||
1031 | if( pStr ) lcdx_printf_at_P( 0, 3, MNORMAL, 0,yoffs, PSTR("> %16S"), pStr ); // PGM |
1031 | if( pStr ) lcdx_printf_at_P( 0, 3, MNORMAL, 0,yoffs, PSTR("> %16S"), pStr ); // PGM |
1032 | if( pstr ) lcdx_printf_at_P( 0, 3, MNORMAL, 0,yoffs, PSTR("> %16s"), pstr ); // RAM |
1032 | if( pstr ) lcdx_printf_at_P( 0, 3, MNORMAL, 0,yoffs, PSTR("> %16s"), pstr ); // RAM |
1033 | } |
1033 | } |
1034 | 1034 | ||
1035 | 1035 | ||
1036 | 1036 | ||
1037 | 1037 | ||
1038 | //-------------------------------------------------------------- |
1038 | //-------------------------------------------------------------- |
1039 | // int16_t Edit_generic( Value, min, max, what, Addfactor, strHelp1, strHelp2) |
1039 | // int16_t Edit_generic( Value, min, max, what, Addfactor, strHelp1, strHelp2) |
1040 | // |
1040 | // |
1041 | // generische Funktion zum aendern von Setup-Werten |
1041 | // generische Funktion zum aendern von Setup-Werten |
1042 | // |
1042 | // |
1043 | // PARAMETER: |
1043 | // PARAMETER: |
1044 | // Value: Ausgangswert der zu aendern ist |
1044 | // Value: Ausgangswert der zu aendern ist |
1045 | // min : minimaler Wert |
1045 | // min : minimaler Wert |
1046 | // max : maximaler Wert |
1046 | // max : maximaler Wert |
1047 | // what : Typ des Wertes, abhaengig davon wird der Wert dargestellt, ENUM dafuer in setup.h |
1047 | // what : Typ des Wertes, abhaengig davon wird der Wert dargestellt, ENUM dafuer in setup.h |
1048 | // Addfactor : Sprungwert der beim erhöhen und erniedrigen addiert wird |
1048 | // Addfactor : Sprungwert der beim erhöhen und erniedrigen addiert wird |
1049 | // strHelp1 : Hilefetext 1 (PGM) |
1049 | // strHelp1 : Hilefetext 1 (PGM) |
1050 | // strHelp2 : Hilefetext 2 (PGM) |
1050 | // strHelp2 : Hilefetext 2 (PGM) |
1051 | //S |
1051 | //S |
1052 | // RUECKGABE: |
1052 | // RUECKGABE: |
1053 | // int16_t Return : Ergebnis der Veraenderung des Wertes |
1053 | // int16_t Return : Ergebnis der Veraenderung des Wertes |
1054 | //-------------------------------------------------------------- |
1054 | //-------------------------------------------------------------- |
1055 | int16_t Edit_generic( int16_t Value, int16_t min, int16_t max, uint8_t what, uint8_t Addfactor, const char *strHelp1, const char *strHelp2 ) |
1055 | int16_t Edit_generic( int16_t Value, int16_t min, int16_t max, uint8_t what, uint8_t Addfactor, const char *strHelp1, const char *strHelp2 ) |
1056 | { |
1056 | { |
1057 | uint8_t redraw = true; |
1057 | uint8_t redraw = true; |
1058 | uint8_t noCancel = false; |
1058 | uint8_t noCancel = false; |
1059 | int8_t yoffs = 0; // yoffs fuer das Edit-Label |
1059 | int8_t yoffs = 0; // yoffs fuer das Edit-Label |
1060 | int8_t yoffsV = 4; // yoffs fuer den Eingabebereich |
1060 | int8_t yoffsV = 4; // yoffs fuer den Eingabebereich |
1061 | const char *pStr; |
1061 | const char *pStr; |
1062 | 1062 | ||
1063 | Pre = Value; |
1063 | Pre = Value; |
1064 | 1064 | ||
1065 | do |
1065 | do |
1066 | { |
1066 | { |
1067 | //------------------------ |
1067 | //------------------------ |
1068 | // Screen neu zeichnen |
1068 | // Screen neu zeichnen |
1069 | //------------------------ |
1069 | //------------------------ |
1070 | if( redraw ) |
1070 | if( redraw ) |
1071 | { |
1071 | { |
1072 | PKT_TitleFromMenuItem( true ); // Titel mit PKT-LiPo Anzeige und clearcsreen |
1072 | PKT_TitleFromMenuItem( true ); // Titel mit PKT-LiPo Anzeige und clearcsreen |
1073 | 1073 | ||
1074 | 1074 | ||
1075 | //------------------------ |
1075 | //------------------------ |
1076 | // Platz reservieren fuer |
1076 | // Platz reservieren fuer |
1077 | // spezielle Typen |
1077 | // spezielle Typen |
1078 | //------------------------ |
1078 | //------------------------ |
1079 | if( what == MK_Connection ) |
1079 | if( what == MK_Connection ) |
1080 | { |
1080 | { |
1081 | yoffs = -2; // yoffs fuer das Edit-Label |
1081 | yoffs = -2; // yoffs fuer das Edit-Label |
1082 | yoffsV = 0; // yoffs fuer den Eingabebereich |
1082 | yoffsV = 0; // yoffs fuer den Eingabebereich |
1083 | } |
1083 | } |
1084 | 1084 | ||
1085 | //------------------------ |
1085 | //------------------------ |
1086 | // 1 zeiliger Hilfstext |
1086 | // 1 zeiliger Hilfstext |
1087 | //------------------------ |
1087 | //------------------------ |
1088 | if( strHelp1 != NULL && strHelp2 == NULL ) |
1088 | if( strHelp1 != NULL && strHelp2 == NULL ) |
1089 | { |
1089 | { |
1090 | lcd_rect_round( 0, 37, 127, 21-6, 1, R2); // Rahmen |
1090 | lcd_rect_round( 0, 37, 127, 21-6, 1, R2); // Rahmen |
1091 | lcdx_printp_center( 6, strHelp1, MNORMAL, 0,-7); // Hilfe-Text 1 |
1091 | lcdx_printp_center( 6, strHelp1, MNORMAL, 0,-7); // Hilfe-Text 1 |
1092 | yoffs = -2; // yoffs fuer das Edit-Label |
1092 | yoffs = -2; // yoffs fuer das Edit-Label |
1093 | yoffsV = 0; // yoffs fuer den Eingabebereich |
1093 | yoffsV = 0; // yoffs fuer den Eingabebereich |
1094 | } |
1094 | } |
1095 | 1095 | ||
1096 | //------------------------ |
1096 | //------------------------ |
1097 | // 2 zeiliger Hilfstext |
1097 | // 2 zeiliger Hilfstext |
1098 | //------------------------ |
1098 | //------------------------ |
1099 | if( strHelp2 != NULL ) |
1099 | if( strHelp2 != NULL ) |
1100 | { |
1100 | { |
1101 | lcd_rect_round( 0, 32, 127, 21, 1, R2); // Rahmen |
1101 | lcd_rect_round( 0, 32, 127, 21, 1, R2); // Rahmen |
1102 | lcdx_printp_center( 5, strHelp1, MNORMAL, 0,-5); // Hilfe-Text 1 |
1102 | lcdx_printp_center( 5, strHelp1, MNORMAL, 0,-5); // Hilfe-Text 1 |
1103 | lcdx_printp_center( 6, strHelp2, MNORMAL, 0,-5); // Hilfe-Text 2 |
1103 | lcdx_printp_center( 6, strHelp2, MNORMAL, 0,-5); // Hilfe-Text 2 |
1104 | yoffs = -4; // yoffs fuer das Edit-Label |
1104 | yoffs = -4; // yoffs fuer das Edit-Label |
1105 | yoffsV = -2; // yoffs fuer den Eingabebereich |
1105 | yoffsV = -2; // yoffs fuer den Eingabebereich |
1106 | } |
1106 | } |
1107 | 1107 | ||
1108 | //------------------------ |
1108 | //------------------------ |
1109 | // Label |
1109 | // Label |
1110 | //------------------------ |
1110 | //------------------------ |
1111 | pStr = PSTR("???"); |
1111 | pStr = PSTR("???"); |
1112 | if( MenuCtrl_GetMenuIndex() >= 0 ) pStr = MenuCtrl_GetItemText(); // das Label wird vom Menueeintrag uebernommen (Menuetext muss im PGM sein!) |
1112 | if( MenuCtrl_GetMenuIndex() >= 0 ) pStr = MenuCtrl_GetItemText(); // das Label wird vom Menueeintrag uebernommen (Menuetext muss im PGM sein!) |
1113 | else |
1113 | else |
1114 | { |
1114 | { |
1115 | if( what == Language ) // Ausnahme: wird ggf. beim Start vom PKT von HAL_HW3_9.c aufgerufen |
1115 | if( what == Language ) // Ausnahme: wird ggf. beim Start vom PKT von HAL_HW3_9.c aufgerufen |
1116 | { |
1116 | { |
1117 | pStr = strGetLanguage( LANGUAGE_de, LANGUAGE_en); |
1117 | pStr = strGetLanguage( LANGUAGE_de, LANGUAGE_en); |
1118 | noCancel = true; |
1118 | noCancel = true; |
1119 | } |
1119 | } |
1120 | } |
1120 | } |
1121 | lcdx_printf_at_P( 0, 2, MNORMAL, 0,yoffs, PSTR("%S:"), pStr ); // Ausgabe des Labels |
1121 | lcdx_printf_at_P( 0, 2, MNORMAL, 0,yoffs, PSTR("%S:"), pStr ); // Ausgabe des Labels |
1122 | 1122 | ||
1123 | 1123 | ||
1124 | lcd_printp_at( 0, 7, strGet(KEYLINE5) , MNORMAL); // Keyline: <- -> Abbr. OK |
1124 | lcd_printp_at( 0, 7, strGet(KEYLINE5) , MNORMAL); // Keyline: <- -> Abbr. OK |
1125 | if( noCancel ) lcd_printp_at(11, 7, PSTR(" "), MNORMAL); // Keyline: "Abbr." loeschen wenn noCancel |
1125 | if( noCancel ) lcd_printp_at(11, 7, PSTR(" "), MNORMAL); // Keyline: "Abbr." loeschen wenn noCancel |
1126 | 1126 | ||
1127 | Edit_generic_printout( Value, min, max, what, yoffsV); // aktuellen Eingabewert anzeigen |
1127 | Edit_generic_printout( Value, min, max, what, yoffsV); // aktuellen Eingabewert anzeigen |
1128 | redraw = false; |
1128 | redraw = false; |
1129 | } |
1129 | } |
1130 | 1130 | ||
1131 | 1131 | ||
1132 | //------------------------ |
1132 | //------------------------ |
1133 | // PKT CtrlHook |
1133 | // PKT CtrlHook |
1134 | //------------------------ |
1134 | //------------------------ |
1135 | if( PKT_CtrlHook() ) |
1135 | if( PKT_CtrlHook() ) |
1136 | { |
1136 | { |
1137 | redraw = true; |
1137 | redraw = true; |
1138 | } |
1138 | } |
1139 | 1139 | ||
1140 | 1140 | ||
1141 | //------------------------ |
1141 | //------------------------ |
1142 | // Key: PLUS |
1142 | // Key: PLUS |
1143 | //------------------------ |
1143 | //------------------------ |
1144 | if( (get_key_press(1 << KEY_PLUS) || get_key_long_rpt_sp((1 << KEY_PLUS), 2)) ) |
1144 | if( (get_key_press(1 << KEY_PLUS) || get_key_long_rpt_sp((1 << KEY_PLUS), 2)) ) |
1145 | { |
1145 | { |
1146 | if( Value <= (max-Addfactor) ) Value = Value + Addfactor; |
1146 | if( Value <= (max-Addfactor) ) Value = Value + Addfactor; |
1147 | else Value = min; |
1147 | else Value = min; |
1148 | 1148 | ||
1149 | Edit_generic_printout( Value, min, max, what, yoffsV); |
1149 | Edit_generic_printout( Value, min, max, what, yoffsV); |
1150 | } |
1150 | } |
1151 | 1151 | ||
1152 | 1152 | ||
1153 | //------------------------ |
1153 | //------------------------ |
1154 | // Key: MINUS |
1154 | // Key: MINUS |
1155 | //------------------------ |
1155 | //------------------------ |
1156 | if( (get_key_press(1 << KEY_MINUS) || get_key_long_rpt_sp((1 << KEY_MINUS), 2)) ) |
1156 | if( (get_key_press(1 << KEY_MINUS) || get_key_long_rpt_sp((1 << KEY_MINUS), 2)) ) |
1157 | { |
1157 | { |
1158 | if( Value >= (min + Addfactor) ) Value = Value - Addfactor; |
1158 | if( Value >= (min + Addfactor) ) Value = Value - Addfactor; |
1159 | else Value = max; |
1159 | else Value = max; |
1160 | 1160 | ||
1161 | Edit_generic_printout( Value, min, max, what, yoffsV); |
1161 | Edit_generic_printout( Value, min, max, what, yoffsV); |
1162 | } |
1162 | } |
1163 | 1163 | ||
1164 | 1164 | ||
1165 | //------------------------ |
1165 | //------------------------ |
1166 | // Key: ENTER |
1166 | // Key: ENTER |
1167 | //------------------------ |
1167 | //------------------------ |
1168 | if( get_key_press(1 << KEY_ENTER) ) |
1168 | if( get_key_press(1 << KEY_ENTER) ) |
1169 | { |
1169 | { |
1170 | return Value; |
1170 | return Value; |
1171 | } |
1171 | } |
1172 | 1172 | ||
1173 | 1173 | ||
1174 | //------------------------ |
1174 | //------------------------ |
1175 | // Key: ESC |
1175 | // Key: ESC |
1176 | //------------------------ |
1176 | //------------------------ |
1177 | if( !noCancel && get_key_press(1 << KEY_ESC) ) // Ende ohne speichern |
1177 | if( !noCancel && get_key_press(1 << KEY_ESC) ) // Ende ohne speichern |
1178 | { |
1178 | { |
1179 | break; |
1179 | break; |
1180 | } |
1180 | } |
1181 | } |
1181 | } |
1182 | while( true ); |
1182 | while( true ); |
1183 | 1183 | ||
1184 | get_key_press(KEY_ALL); |
1184 | get_key_press(KEY_ALL); |
1185 | return Pre; |
1185 | return Pre; |
1186 | } |
1186 | } |
1187 | 1187 | ||
1188 | 1188 | ||
1189 | 1189 | ||
1190 | //-------------------------------------------------------------- |
1190 | //-------------------------------------------------------------- |
1191 | // bei HW 3.9x geht das nicht mehr wegen dem Platinenlayout |
1191 | // bei HW 3.9x geht das nicht mehr wegen dem Platinenlayout |
1192 | // bei HW 3.9m geht es theoretisch noch - aber durch einen Bug scheinbar |
1192 | // bei HW 3.9m geht es theoretisch noch - aber durch einen Bug scheinbar |
1193 | // nicht mehr. Kann nur von jemanden mit HW 3.9m repariert werden. |
1193 | // nicht mehr. Kann nur von jemanden mit HW 3.9m repariert werden. |
1194 | // ALSO -> raus und Speicher sparen |
1194 | // ALSO -> raus und Speicher sparen |
1195 | //-------------------------------------------------------------- |
1195 | //-------------------------------------------------------------- |
1196 | /* |
1196 | /* |
1197 | uint8_t Edit_DisplayHelligkeit(uint8_t Value, uint8_t min, uint8_t max) |
1197 | uint8_t Edit_DisplayHelligkeit(uint8_t Value, uint8_t min, uint8_t max) |
1198 | { |
1198 | { |
1199 | float ValCorr = 2.55; // (Value * ValCorr) maximal 255 |
1199 | float ValCorr = 2.55; // (Value * ValCorr) maximal 255 |
1200 | Pre = Value; |
1200 | Pre = Value; |
1201 | OCR2A = Value * ValCorr; |
1201 | OCR2A = Value * ValCorr; |
1202 | 1202 | ||
1203 | lcd_cls(); |
1203 | lcd_cls(); |
1204 | // lcd_printp_at (0, 2, Text, 0); |
1204 | // lcd_printp_at (0, 2, Text, 0); |
1205 | lcdx_printf_at_P( 0, 2, MNORMAL, 0,0, PSTR("%S:"), MenuCtrl_GetItemText() ); // Menuetext muss im PGM sein! (aktuell keine Unterscheidung RAM/PGM) |
1205 | lcdx_printf_at_P( 0, 2, MNORMAL, 0,0, PSTR("%S:"), MenuCtrl_GetItemText() ); // Menuetext muss im PGM sein! (aktuell keine Unterscheidung RAM/PGM) |
1206 | write_ndigit_number_u (16, 2, Value, 3, 0,0); |
1206 | write_ndigit_number_u (16, 2, Value, 3, 0,0); |
1207 | lcd_printp_at (17, 2, PSTR("%"), 0); |
1207 | lcd_printp_at (17, 2, PSTR("%"), 0); |
1208 | // lcd_printp_at (0, 7, PSTR(KEY_LINE_2), 0); |
1208 | // lcd_printp_at (0, 7, PSTR(KEY_LINE_2), 0); |
1209 | lcd_printp_at(0, 7, strGet(KEYLINE2), 0); |
1209 | lcd_printp_at(0, 7, strGet(KEYLINE2), 0); |
1210 | 1210 | ||
1211 | do |
1211 | do |
1212 | { |
1212 | { |
1213 | write_ndigit_number_u (16, 2,Value, 3, 0,0); |
1213 | write_ndigit_number_u (16, 2,Value, 3, 0,0); |
1214 | lcd_frect ((8*0), (8*4), (Value * (16*8) / 100), 6, 1); |
1214 | lcd_frect ((8*0), (8*4), (Value * (16*8) / 100), 6, 1); |
1215 | 1215 | ||
1216 | if ((get_key_press (1 << KEY_PLUS) || get_key_long_rpt_sp ((1 << KEY_PLUS), 3)) && (Value < max)) |
1216 | if ((get_key_press (1 << KEY_PLUS) || get_key_long_rpt_sp ((1 << KEY_PLUS), 3)) && (Value < max)) |
1217 | { |
1217 | { |
1218 | Value++; |
1218 | Value++; |
1219 | 1219 | ||
1220 | if (Value >= max) |
1220 | if (Value >= max) |
1221 | { |
1221 | { |
1222 | Value = max; |
1222 | Value = max; |
1223 | set_beep ( 200, 0x0080, BeepNormal); |
1223 | set_beep ( 200, 0x0080, BeepNormal); |
1224 | } |
1224 | } |
1225 | else |
1225 | else |
1226 | OCR2A = Value * ValCorr; |
1226 | OCR2A = Value * ValCorr; |
1227 | 1227 | ||
1228 | } |
1228 | } |
1229 | 1229 | ||
1230 | if ((get_key_press (1 << KEY_MINUS) || get_key_long_rpt_sp ((1 << KEY_MINUS), 3)) && (Value > min)) |
1230 | if ((get_key_press (1 << KEY_MINUS) || get_key_long_rpt_sp ((1 << KEY_MINUS), 3)) && (Value > min)) |
1231 | { |
1231 | { |
1232 | lcd_frect (((Value - 1) * (16*8) / 100), (8*4), (16*8), 6, 0); |
1232 | lcd_frect (((Value - 1) * (16*8) / 100), (8*4), (16*8), 6, 0); |
1233 | Value--; |
1233 | Value--; |
1234 | 1234 | ||
1235 | if (Value == min) |
1235 | if (Value == min) |
1236 | { |
1236 | { |
1237 | Value = min; |
1237 | Value = min; |
1238 | set_beep ( 200, 0x0080, BeepNormal); |
1238 | set_beep ( 200, 0x0080, BeepNormal); |
1239 | } |
1239 | } |
1240 | else |
1240 | else |
1241 | OCR2A = Value * ValCorr; |
1241 | OCR2A = Value * ValCorr; |
1242 | 1242 | ||
1243 | } |
1243 | } |
1244 | 1244 | ||
1245 | if (get_key_press (1 << KEY_ENTER)) |
1245 | if (get_key_press (1 << KEY_ENTER)) |
1246 | { |
1246 | { |
1247 | OCR2A = Value * ValCorr; |
1247 | OCR2A = Value * ValCorr; |
1248 | Config.LCD_Helligkeit = Value; |
1248 | Config.LCD_Helligkeit = Value; |
1249 | // WriteParameter(); |
1249 | // WriteParameter(); |
1250 | edit = 0; |
1250 | edit = 0; |
1251 | return Value; |
1251 | return Value; |
1252 | } |
1252 | } |
1253 | } |
1253 | } |
1254 | 1254 | ||
1255 | while (!get_key_press (1 << KEY_ESC)); |
1255 | while (!get_key_press (1 << KEY_ESC)); |
1256 | { |
1256 | { |
1257 | get_key_press(KEY_ALL); |
1257 | get_key_press(KEY_ALL); |
1258 | OCR2A = Pre * ValCorr; |
1258 | OCR2A = Pre * ValCorr; |
1259 | Config.LCD_Helligkeit = Pre; |
1259 | Config.LCD_Helligkeit = Pre; |
1260 | // WriteParameter(); |
1260 | // WriteParameter(); |
1261 | return Pre; |
1261 | return Pre; |
1262 | } |
1262 | } |
1263 | } |
1263 | } |
1264 | */ |
1264 | */ |
1265 | 1265 | ||
1266 | 1266 | ||
1267 | 1267 | ||
1268 | //-------------------------------------------------------------- |
1268 | //-------------------------------------------------------------- |
1269 | //-------------------------------------------------------------- |
1269 | //-------------------------------------------------------------- |
1270 | uint8_t Edit_String( const char *data, const uint8_t length, uint8_t type) |
1270 | uint8_t Edit_String( const char *data, const uint8_t length, uint8_t type) |
1271 | { |
1271 | { |
1272 | uint8_t redraw = true; |
1272 | uint8_t redraw = true; |
1273 | uint8_t x = 1; |
1273 | uint8_t x = 1; |
1274 | uint8_t I = 0; |
1274 | uint8_t I = 0; |
1275 | uint8_t lOk = false; |
1275 | uint8_t lOk = false; |
1276 | uint8_t i; |
1276 | uint8_t i; |
1277 | 1277 | ||
1278 | 1278 | ||
1279 | for( i = 0; i < length; i++) |
1279 | for( i = 0; i < length; i++) |
1280 | { |
1280 | { |
1281 | EditString[i] = data[i]; |
1281 | EditString[i] = data[i]; |
1282 | } |
1282 | } |
1283 | 1283 | ||
1284 | 1284 | ||
1285 | do |
1285 | do |
1286 | { |
1286 | { |
1287 | //------------------------- |
1287 | //------------------------- |
1288 | // Screen zeichnen |
1288 | // Screen zeichnen |
1289 | //------------------------- |
1289 | //------------------------- |
1290 | if( redraw ) |
1290 | if( redraw ) |
1291 | { |
1291 | { |
1292 | PKT_TitleFromMenuItem( true ); // true = showlipo (mit clearscreen) |
1292 | PKT_TitleFromMenuItem( true ); // true = showlipo (mit clearscreen) |
1293 | 1293 | ||
1294 | for( i = 0; i < length; i++) |
1294 | for( i = 0; i < length; i++) |
1295 | { |
1295 | { |
1296 | lcd_putc ( (i*2)+1, 3, EditString[i], MNORMAL); |
1296 | lcd_putc ( (i*2)+1, 3, EditString[i], MNORMAL); |
1297 | lcd_printp_at( (i*2)+2, 3, PSTR(" ") , MNORMAL); |
1297 | lcd_printp_at( (i*2)+2, 3, PSTR(" ") , MNORMAL); |
1298 | } |
1298 | } |
1299 | 1299 | ||
1300 | lcd_rect( (x*6)-3, (8*3)-2, 10, 10, 1); |
1300 | lcd_rect( (x*6)-3, (8*3)-2, 10, 10, 1); |
1301 | lcd_printp_at(13, 6, PSTR("C"), MNORMAL); |
1301 | lcd_printp_at(13, 6, PSTR("C"), MNORMAL); |
1302 | lcd_printp_at( 0, 7, PSTR(" \x17 \x16 \x19 OK"), MNORMAL); // Keyline |
1302 | lcd_printp_at( 0, 7, PSTR(" \x17 \x16 \x19 OK"), MNORMAL); // Keyline |
1303 | 1303 | ||
1304 | redraw = false; |
1304 | redraw = false; |
1305 | } |
1305 | } |
1306 | 1306 | ||
1307 | 1307 | ||
1308 | //------------------------- |
1308 | //------------------------- |
1309 | // PKT-LiPo anzeigen |
1309 | // PKT-LiPo anzeigen |
1310 | //------------------------- |
1310 | //------------------------- |
1311 | show_Lipo(); |
1311 | show_Lipo(); |
1312 | 1312 | ||
1313 | 1313 | ||
1314 | //------------------------- |
1314 | //------------------------- |
1315 | // PKT Update-Anforderung? |
1315 | // PKT Update-Anforderung? |
1316 | //------------------------- |
1316 | //------------------------- |
1317 | if( PKT_CtrlHook() ) |
1317 | if( PKT_CtrlHook() ) |
1318 | { |
1318 | { |
1319 | redraw = true; |
1319 | redraw = true; |
1320 | } |
1320 | } |
1321 | 1321 | ||
1322 | 1322 | ||
1323 | if( (type == EDIT_BT_NAME) || (type == EDIT_SSID) || (type == EDIT_WL_PASSWORD)) // Name |
1323 | if( (type == EDIT_BT_NAME) || (type == EDIT_SSID) || (type == EDIT_WL_PASSWORD)) // Name |
1324 | { |
1324 | { |
1325 | if ((get_key_press (1 << KEY_PLUS) || get_key_long_rpt_sp ((1 << KEY_PLUS), 2)) && EditString[I] < 'z') |
1325 | if ((get_key_press (1 << KEY_PLUS) || get_key_long_rpt_sp ((1 << KEY_PLUS), 2)) && EditString[I] < 'z') |
1326 | { |
1326 | { |
1327 | EditString[I]++; |
1327 | EditString[I]++; |
1328 | 1328 | ||
1329 | if (EditString[I] >= 0x00 && EditString[I] < ' ') |
1329 | if (EditString[I] >= 0x00 && EditString[I] < ' ') |
1330 | EditString[I] = ' '; |
1330 | EditString[I] = ' '; |
1331 | 1331 | ||
1332 | if (EditString[I] > ' ' && EditString[I] < '0') |
1332 | if (EditString[I] > ' ' && EditString[I] < '0') |
1333 | EditString[I] = '0'; |
1333 | EditString[I] = '0'; |
1334 | 1334 | ||
1335 | if (EditString[I] > '9' && EditString[I] < 'A') |
1335 | if (EditString[I] > '9' && EditString[I] < 'A') |
1336 | EditString[I] = 'A'; |
1336 | EditString[I] = 'A'; |
1337 | 1337 | ||
1338 | if (EditString[I] > 'Z' && EditString[I] < 'a') |
1338 | if (EditString[I] > 'Z' && EditString[I] < 'a') |
1339 | EditString[I] = 'a'; |
1339 | EditString[I] = 'a'; |
1340 | 1340 | ||
1341 | lcd_putc (x, 3, EditString[I], 0); |
1341 | lcd_putc (x, 3, EditString[I], 0); |
1342 | edit = 1; |
1342 | edit = 1; |
1343 | } |
1343 | } |
1344 | 1344 | ||
1345 | if ((get_key_press (1 << KEY_MINUS) || get_key_long_rpt_sp ((1 << KEY_MINUS), 2)) && EditString[I] > ' ') |
1345 | if ((get_key_press (1 << KEY_MINUS) || get_key_long_rpt_sp ((1 << KEY_MINUS), 2)) && EditString[I] > ' ') |
1346 | { |
1346 | { |
1347 | EditString[I]--; |
1347 | EditString[I]--; |
1348 | 1348 | ||
1349 | if (EditString[I] < 'a' && EditString[I] > 'Z') |
1349 | if (EditString[I] < 'a' && EditString[I] > 'Z') |
1350 | EditString[I] = 'Z'; |
1350 | EditString[I] = 'Z'; |
1351 | 1351 | ||
1352 | if (EditString[I] < 'A' && EditString[I] > '9') |
1352 | if (EditString[I] < 'A' && EditString[I] > '9') |
1353 | EditString[I] = '9'; |
1353 | EditString[I] = '9'; |
1354 | 1354 | ||
1355 | if (EditString[I] < '0' && EditString[I] > ' ') |
1355 | if (EditString[I] < '0' && EditString[I] > ' ') |
1356 | EditString[I] = ' '; |
1356 | EditString[I] = ' '; |
1357 | 1357 | ||
1358 | lcd_putc (x, 3, EditString[I], 0); |
1358 | lcd_putc (x, 3, EditString[I], 0); |
1359 | edit = 1; |
1359 | edit = 1; |
1360 | } |
1360 | } |
1361 | } |
1361 | } |
1362 | else if( type == EDIT_BT_PIN ) // PIN |
1362 | else if( type == EDIT_BT_PIN ) // PIN |
1363 | { |
1363 | { |
1364 | if ((get_key_press (1 << KEY_PLUS) || get_key_long_rpt_sp ((1 << KEY_PLUS), 1)) && (EditString[I] < '9')) |
1364 | if ((get_key_press (1 << KEY_PLUS) || get_key_long_rpt_sp ((1 << KEY_PLUS), 1)) && (EditString[I] < '9')) |
1365 | { |
1365 | { |
1366 | EditString[I]++; |
1366 | EditString[I]++; |
1367 | 1367 | ||
1368 | if (EditString[I] >= 0x00 && EditString[I] < ' ') |
1368 | if (EditString[I] >= 0x00 && EditString[I] < ' ') |
1369 | EditString[I] = ' '; |
1369 | EditString[I] = ' '; |
1370 | 1370 | ||
1371 | if (EditString[I] > ' ' && EditString[I] < '0') |
1371 | if (EditString[I] > ' ' && EditString[I] < '0') |
1372 | EditString[I] = '0'; |
1372 | EditString[I] = '0'; |
1373 | 1373 | ||
1374 | lcd_putc (x, 3, EditString[I], 0); |
1374 | lcd_putc (x, 3, EditString[I], 0); |
1375 | edit = 1; |
1375 | edit = 1; |
1376 | } |
1376 | } |
1377 | 1377 | ||
1378 | if ((get_key_press (1 << KEY_MINUS) || get_key_long_rpt_sp ((1 << KEY_MINUS), 1)) && (EditString[I] > '0')) |
1378 | if ((get_key_press (1 << KEY_MINUS) || get_key_long_rpt_sp ((1 << KEY_MINUS), 1)) && (EditString[I] > '0')) |
1379 | { |
1379 | { |
1380 | EditString[I]--; |
1380 | EditString[I]--; |
1381 | 1381 | ||
1382 | if (EditString[I] < 'A' && EditString[I] > '9') |
1382 | if (EditString[I] < 'A' && EditString[I] > '9') |
1383 | EditString[I] = '9'; |
1383 | EditString[I] = '9'; |
1384 | 1384 | ||
1385 | lcd_putc (x, 3, EditString[I], 0); |
1385 | lcd_putc (x, 3, EditString[I], 0); |
1386 | edit = 1; |
1386 | edit = 1; |
1387 | } |
1387 | } |
1388 | } |
1388 | } |
1389 | 1389 | ||
1390 | if( get_key_long (1 << KEY_ESC)) |
1390 | if( get_key_long (1 << KEY_ESC)) |
1391 | { |
1391 | { |
1392 | if( type == EDIT_BT_NAME|| type == EDIT_SSID || type == EDIT_WL_PASSWORD) EditString[I] = ' '; // Zeichen loeschen |
1392 | if( type == EDIT_BT_NAME|| type == EDIT_SSID || type == EDIT_WL_PASSWORD) EditString[I] = ' '; // Zeichen loeschen |
1393 | if( type == EDIT_BT_PIN) EditString[I] = '0'; // Zeichen setzen |
1393 | if( type == EDIT_BT_PIN) EditString[I] = '0'; // Zeichen setzen |
1394 | lcd_putc (x, 3, EditString[I], 0); |
1394 | lcd_putc (x, 3, EditString[I], 0); |
1395 | edit = 1; |
1395 | edit = 1; |
1396 | } |
1396 | } |
1397 | 1397 | ||
1398 | if( get_key_short (1 << KEY_ESC)) |
1398 | if( get_key_short (1 << KEY_ESC)) |
1399 | { |
1399 | { |
1400 | if( type == EDIT_BT_NAME ) length_tmp = bt_name_length; |
1400 | if( type == EDIT_BT_NAME ) length_tmp = bt_name_length; |
1401 | if( type == EDIT_BT_PIN ) length_tmp = bt_pin_length; |
1401 | if( type == EDIT_BT_PIN ) length_tmp = bt_pin_length; |
1402 | if (type == EDIT_SSID ) length_tmp = wlan_ssid_length; |
1402 | if (type == EDIT_SSID ) length_tmp = wlan_ssid_length; |
1403 | if (type == EDIT_WL_PASSWORD ) length_tmp = wlan_password_length; |
1403 | if (type == EDIT_WL_PASSWORD ) length_tmp = wlan_password_length; |
1404 | 1404 | ||
1405 | if ((x / 2) + 2 > length_tmp) |
1405 | if ((x / 2) + 2 > length_tmp) |
1406 | { |
1406 | { |
1407 | lcd_rect ((x*6)-3, (8*3)-2, 10, 10, 0); |
1407 | lcd_rect ((x*6)-3, (8*3)-2, 10, 10, 0); |
1408 | x = 1; |
1408 | x = 1; |
1409 | lcd_rect ((x*6)-3, (8*3)-2, 10, 10, 1); |
1409 | lcd_rect ((x*6)-3, (8*3)-2, 10, 10, 1); |
1410 | I = 0; |
1410 | I = 0; |
1411 | } |
1411 | } |
1412 | else |
1412 | else |
1413 | { |
1413 | { |
1414 | lcd_rect ((x*6)-3, (8*3)-2, 10, 10, 0); |
1414 | lcd_rect ((x*6)-3, (8*3)-2, 10, 10, 0); |
1415 | x++; |
1415 | x++; |
1416 | x++; |
1416 | x++; |
1417 | lcd_rect ((x*6)-3, (8*3)-2, 10, 10, 1); |
1417 | lcd_rect ((x*6)-3, (8*3)-2, 10, 10, 1); |
1418 | I++; //Zeiger auf Zeichen |
1418 | I++; //Zeiger auf Zeichen |
1419 | } |
1419 | } |
1420 | } |
1420 | } |
1421 | 1421 | ||
1422 | if( get_key_press (1 << KEY_ENTER) ) |
1422 | if( get_key_press (1 << KEY_ENTER) ) |
1423 | { |
1423 | { |
1424 | lOk = true; |
1424 | lOk = true; |
1425 | if( type == EDIT_BT_NAME && EditString[0] == ' ' ) // BT-Name: 1. Zeichen darf nicht Space sein |
1425 | if( type == EDIT_BT_NAME && EditString[0] == ' ' ) // BT-Name: 1. Zeichen darf nicht Space sein |
1426 | { |
1426 | { |
1427 | lcdx_printp_at( 0, 5, PSTR(" FEHLER! 1. Zeichen! "), MNORMAL, 0,-4); |
1427 | lcdx_printp_at( 0, 5, PSTR(" FEHLER! 1. Zeichen! "), MNORMAL, 0,-4); |
1428 | set_beep ( 300, 0xf00f, BeepNormal); |
1428 | set_beep ( 300, 0xf00f, BeepNormal); |
1429 | _delay_ms(2000); |
1429 | _delay_ms(2000); |
1430 | lcd_frect( 0, 5*8-4, 127, 7, 0); // loesche Fehlertext |
1430 | lcd_frect( 0, 5*8-4, 127, 7, 0); // loesche Fehlertext |
1431 | 1431 | ||
1432 | lcd_rect ((x*6)-3, (8*3)-2, 10, 10, 0); // setze Cursor auf Position 1 |
1432 | lcd_rect ((x*6)-3, (8*3)-2, 10, 10, 0); // setze Cursor auf Position 1 |
1433 | x = 1; |
1433 | x = 1; |
1434 | lcd_rect ((x*6)-3, (8*3)-2, 10, 10, 1); |
1434 | lcd_rect ((x*6)-3, (8*3)-2, 10, 10, 1); |
1435 | I = 0; |
1435 | I = 0; |
1436 | 1436 | ||
1437 | get_key_press(KEY_ALL); |
1437 | get_key_press(KEY_ALL); |
1438 | lOk = false; |
1438 | lOk = false; |
1439 | } |
1439 | } |
1440 | } |
1440 | } |
1441 | 1441 | ||
1442 | } while( !lOk ); |
1442 | } while( !lOk ); |
1443 | 1443 | ||
1444 | return 1; |
1444 | return 1; |
1445 | } |
1445 | } |
1446 | 1446 | ||
1447 | 1447 | ||
1448 | 1448 | ||
1449 | //-------------------------------------------------------------- |
1449 | //-------------------------------------------------------------- |
1450 | // min,max sind in Setup_PKTGeneric() festgelegt |
1450 | // min,max sind in Setup_PKTGeneric() festgelegt |
1451 | //-------------------------------------------------------------- |
1451 | //-------------------------------------------------------------- |
1452 | void Edit_LipoOffset( void ) |
1452 | void Edit_LipoOffset( void ) |
1453 | { |
1453 | { |
1454 | uint8_t redraw = true; |
1454 | uint8_t redraw = true; |
1455 | uint8_t inc = 50; // in diesen Schritten hoch/runter zaehlen |
1455 | uint8_t inc = 50; // in diesen Schritten hoch/runter zaehlen |
1456 | uint16_t min = 0; // min. Offset Wert |
1456 | uint16_t min = 0; // min. Offset Wert |
1457 | uint16_t max = 15000; // max. Offset Wert |
1457 | uint16_t max = 15000; // max. Offset Wert |
1458 | uint16_t oldValue; |
1458 | uint16_t oldValue; |
1459 | 1459 | ||
1460 | if( Config.Lipo_UOffset % inc ) // ggf. wurde frueher ein anderer Wert fuer das Increment 'inc' verwendet |
1460 | if( Config.Lipo_UOffset % inc ) // ggf. wurde frueher ein anderer Wert fuer das Increment 'inc' verwendet |
1461 | Config.Lipo_UOffset = (uint16_t)(Config.Lipo_UOffset/inc)*inc; // hier wird der Wert auf das aktuelle 'inc' angepasst |
1461 | Config.Lipo_UOffset = (uint16_t)(Config.Lipo_UOffset/inc)*inc; // hier wird der Wert auf das aktuelle 'inc' angepasst |
1462 | 1462 | ||
1463 | oldValue = Config.Lipo_UOffset; |
1463 | oldValue = Config.Lipo_UOffset; |
1464 | 1464 | ||
1465 | do |
1465 | do |
1466 | { |
1466 | { |
1467 | //------------------------- |
1467 | //------------------------- |
1468 | // Screen zeichnen |
1468 | // Screen zeichnen |
1469 | //------------------------- |
1469 | //------------------------- |
1470 | if( redraw ) |
1470 | if( redraw ) |
1471 | { |
1471 | { |
1472 | PKT_TitleFromMenuItem( true ); // true = showlipo (mit clearscreen) |
1472 | PKT_TitleFromMenuItem( true ); // true = showlipo (mit clearscreen) |
1473 | 1473 | ||
1474 | lcdx_printf_at_P( 0, 2, MNORMAL, 0,-4, PSTR("%S:"), MenuCtrl_GetItemText() ); // Menuetext muss im PGM sein! (aktuell keine Unterscheidung RAM/PGM) |
1474 | lcdx_printf_at_P( 0, 2, MNORMAL, 0,-4, PSTR("%S:"), MenuCtrl_GetItemText() ); // Menuetext muss im PGM sein! (aktuell keine Unterscheidung RAM/PGM) |
1475 | 1475 | ||
1476 | lcd_rect_round( 0, 32, 127, 21, 1, R2); // Rahmen |
1476 | lcd_rect_round( 0, 32, 127, 21, 1, R2); // Rahmen |
1477 | lcdx_printp_at( 1, 5, strGet(STR_HELP_LIPOOFFSET1), MNORMAL, 0,-5); // Hilfe-Text 1 |
1477 | lcdx_printp_at( 1, 5, strGet(STR_HELP_LIPOOFFSET1), MNORMAL, 0,-5); // Hilfe-Text 1 |
1478 | lcdx_printp_at( 1, 6, strGet(STR_HELP_LIPOOFFSET2), MNORMAL, 0,-5); // Hilfe-Text 2 |
1478 | lcdx_printp_at( 1, 6, strGet(STR_HELP_LIPOOFFSET2), MNORMAL, 0,-5); // Hilfe-Text 2 |
1479 | lcd_printp_at( 0, 7, strGet(KEYLINE5), MNORMAL); // Keyline |
1479 | lcd_printp_at( 0, 7, strGet(KEYLINE5), MNORMAL); // Keyline |
1480 | redraw = false; |
1480 | redraw = false; |
1481 | } |
1481 | } |
1482 | 1482 | ||
1483 | 1483 | ||
1484 | //------------------------- |
1484 | //------------------------- |
1485 | // Wert ausgeben |
1485 | // Wert ausgeben |
1486 | //------------------------- |
1486 | //------------------------- |
1487 | lcdx_printf_at_P( 0, 3, MNORMAL, 0,-2, PSTR("> %5d => %1.2dv"), Config.Lipo_UOffset, volt_avg ); |
1487 | lcdx_printf_at_P( 0, 3, MNORMAL, 0,-2, PSTR("> %5d => %1.2dv"), Config.Lipo_UOffset, volt_avg ); |
1488 | show_Lipo(); |
1488 | show_Lipo(); |
1489 | 1489 | ||
1490 | 1490 | ||
1491 | //------------------------- |
1491 | //------------------------- |
1492 | // PKT Update-Anforderung? |
1492 | // PKT Update-Anforderung? |
1493 | //------------------------- |
1493 | //------------------------- |
1494 | if( PKT_CtrlHook() ) |
1494 | if( PKT_CtrlHook() ) |
1495 | { |
1495 | { |
1496 | redraw = true; |
1496 | redraw = true; |
1497 | } |
1497 | } |
1498 | 1498 | ||
1499 | 1499 | ||
1500 | //------------------------- |
1500 | //------------------------- |
1501 | // Tasten |
1501 | // Tasten |
1502 | //------------------------- |
1502 | //------------------------- |
1503 | if( (get_key_press(1 << KEY_PLUS) || get_key_long_rpt_sp((1 << KEY_PLUS),2)) && (Config.Lipo_UOffset < max) ) |
1503 | if( (get_key_press(1 << KEY_PLUS) || get_key_long_rpt_sp((1 << KEY_PLUS),2)) && (Config.Lipo_UOffset < max) ) |
1504 | { |
1504 | { |
1505 | Config.Lipo_UOffset = Config.Lipo_UOffset + inc; |
1505 | Config.Lipo_UOffset = Config.Lipo_UOffset + inc; |
1506 | } |
1506 | } |
1507 | 1507 | ||
1508 | if( (get_key_press(1 << KEY_MINUS) || get_key_long_rpt_sp((1 << KEY_MINUS),2)) && (Config.Lipo_UOffset > min) ) |
1508 | if( (get_key_press(1 << KEY_MINUS) || get_key_long_rpt_sp((1 << KEY_MINUS),2)) && (Config.Lipo_UOffset > min) ) |
1509 | { |
1509 | { |
1510 | Config.Lipo_UOffset = Config.Lipo_UOffset - inc; |
1510 | Config.Lipo_UOffset = Config.Lipo_UOffset - inc; |
1511 | } |
1511 | } |
1512 | 1512 | ||
1513 | if( get_key_press(1 << KEY_ENTER) ) |
1513 | if( get_key_press(1 << KEY_ENTER) ) |
1514 | { |
1514 | { |
1515 | clear_key_all(); |
1515 | clear_key_all(); |
1516 | return; |
1516 | return; |
1517 | } |
1517 | } |
1518 | 1518 | ||
1519 | } while( !get_key_press(1 << KEY_ESC) ); |
1519 | } while( !get_key_press(1 << KEY_ESC) ); |
1520 | 1520 | ||
1521 | clear_key_all(); |
1521 | clear_key_all(); |
1522 | 1522 | ||
1523 | Config.Lipo_UOffset = oldValue; // Abbruch, orginalen Wert wieder herstellen |
1523 | Config.Lipo_UOffset = oldValue; // Abbruch, orginalen Wert wieder herstellen |
1524 | return; |
1524 | return; |
1525 | } |
1525 | } |
1526 | 1526 | ||
1527 | 1527 | ||
1528 | 1528 | ||
1529 | //-------------------------------------------------------------- |
1529 | //-------------------------------------------------------------- |
1530 | //-------------------------------------------------------------- |
1530 | //-------------------------------------------------------------- |
1531 | #ifdef USE_OSD_SCREEN_OLD |
1531 | #ifdef USE_OSD_SCREEN_OLD |
1532 | uint8_t Edit_LED_Form (uint8_t Value, uint8_t min, uint8_t max ) |
1532 | uint8_t Edit_LED_Form (uint8_t Value, uint8_t min, uint8_t max ) |
1533 | { |
1533 | { |
1534 | Pre = Value; |
1534 | Pre = Value; |
1535 | lcd_cls(); |
1535 | lcd_cls(); |
1536 | 1536 | ||
1537 | lcd_printp_at(0, 2, strGetOSDOLD(OSD_LED_Form), MNORMAL); |
1537 | lcd_printp_at(0, 2, strGetOSDOLD(OSD_LED_Form), MNORMAL); |
1538 | 1538 | ||
1539 | switch (Value) |
1539 | switch (Value) |
1540 | { |
1540 | { |
1541 | case 0x1: |
1541 | case 0x1: |
1542 | lcd_circle (14 * 6 + 5, 2 * 8 + 3, 3, 1); // kreis |
1542 | lcd_circle (14 * 6 + 5, 2 * 8 + 3, 3, 1); // kreis |
1543 | 1543 | ||
1544 | lcd_fcircle (16 * 6 + 5, 2 * 8 + 3, 3, 0); // l�schen |
1544 | lcd_fcircle (16 * 6 + 5, 2 * 8 + 3, 3, 0); // l�schen |
1545 | lcd_circle (16 * 6 + 5, 2 * 8 + 3, 3, 1); // kreis |
1545 | lcd_circle (16 * 6 + 5, 2 * 8 + 3, 3, 1); // kreis |
1546 | lcd_fcircle (16 * 6 + 5, 2 * 8 + 3, 1, 1); // plus |
1546 | lcd_fcircle (16 * 6 + 5, 2 * 8 + 3, 1, 1); // plus |
1547 | break; |
1547 | break; |
1548 | case 0x3 : |
1548 | case 0x3 : |
1549 | lcd_circle (14 * 6 + 5, 2 * 8 + 3, 3, 1); // kreis |
1549 | lcd_circle (14 * 6 + 5, 2 * 8 + 3, 3, 1); // kreis |
1550 | 1550 | ||
1551 | lcd_fcircle (16 * 6 + 5, 2 * 8 + 3, 3, 1); // schwarz |
1551 | lcd_fcircle (16 * 6 + 5, 2 * 8 + 3, 3, 1); // schwarz |
1552 | break; |
1552 | break; |
1553 | break; |
1553 | break; |
1554 | } |
1554 | } |
1555 | 1555 | ||
1556 | lcd_printp_at(0, 7, strGet(KEYLINE2), 0); |
1556 | lcd_printp_at(0, 7, strGet(KEYLINE2), 0); |
1557 | 1557 | ||
1558 | do |
1558 | do |
1559 | { |
1559 | { |
1560 | if ((get_key_press (1 << KEY_PLUS)) && (Value == 1)) |
1560 | if ((get_key_press (1 << KEY_PLUS)) && (Value == 1)) |
1561 | { |
1561 | { |
1562 | Value = 3; |
1562 | Value = 3; |
1563 | lcd_circle (14 * 6 + 5, 2 * 8 + 3, 3, 1); // kreis |
1563 | lcd_circle (14 * 6 + 5, 2 * 8 + 3, 3, 1); // kreis |
1564 | 1564 | ||
1565 | lcd_fcircle (16 * 6 + 5, 2 * 8 + 3, 3, 1); // schwarz |
1565 | lcd_fcircle (16 * 6 + 5, 2 * 8 + 3, 3, 1); // schwarz |
1566 | } |
1566 | } |
1567 | 1567 | ||
1568 | if ((get_key_press (1 << KEY_MINUS)) && (Value == 3)) |
1568 | if ((get_key_press (1 << KEY_MINUS)) && (Value == 3)) |
1569 | { |
1569 | { |
1570 | Value = 1; |
1570 | Value = 1; |
1571 | lcd_circle (14 * 6 + 5, 2 * 8 + 3, 3, 1); // kreis |
1571 | lcd_circle (14 * 6 + 5, 2 * 8 + 3, 3, 1); // kreis |
1572 | 1572 | ||
1573 | lcd_fcircle (16 * 6 + 5, 2 * 8 + 3, 3, 0); // l�schen |
1573 | lcd_fcircle (16 * 6 + 5, 2 * 8 + 3, 3, 0); // l�schen |
1574 | lcd_circle (16 * 6 + 5, 2 * 8 + 3, 3, 1); // kreis |
1574 | lcd_circle (16 * 6 + 5, 2 * 8 + 3, 3, 1); // kreis |
1575 | lcd_fcircle (16 * 6 + 5, 2 * 8 + 3, 1, 1); // plus |
1575 | lcd_fcircle (16 * 6 + 5, 2 * 8 + 3, 1, 1); // plus |
1576 | } |
1576 | } |
1577 | 1577 | ||
1578 | if (get_key_press (1 << KEY_ENTER)) |
1578 | if (get_key_press (1 << KEY_ENTER)) |
1579 | { |
1579 | { |
1580 | edit = 1; |
1580 | edit = 1; |
1581 | Config.OSD_LEDform = Value; |
1581 | Config.OSD_LEDform = Value; |
1582 | // WriteParameter(); |
1582 | // WriteParameter(); |
1583 | edit = 0; |
1583 | edit = 0; |
1584 | return Value; |
1584 | return Value; |
1585 | } |
1585 | } |
1586 | } |
1586 | } |
1587 | 1587 | ||
1588 | while (!get_key_press (1 << KEY_ESC)); |
1588 | while (!get_key_press (1 << KEY_ESC)); |
1589 | { |
1589 | { |
1590 | get_key_press(KEY_ALL); |
1590 | get_key_press(KEY_ALL); |
1591 | edit = 0; |
1591 | edit = 0; |
1592 | Config.OSD_LEDform = Pre; |
1592 | Config.OSD_LEDform = Pre; |
1593 | return Pre; |
1593 | return Pre; |
1594 | } |
1594 | } |
1595 | } |
1595 | } |
1596 | #endif // USE_OSD_SCREEN_OLD |
1596 | #endif // USE_OSD_SCREEN_OLD |
1597 | 1597 | ||
1598 | 1598 | ||
1599 | 1599 | ||
1600 | //-------------------------------------------------------------- |
1600 | //-------------------------------------------------------------- |
1601 | // Show_MAC( progmem, headline, mac) |
1601 | // Show_MAC( progmem, headline, mac) |
1602 | //-------------------------------------------------------------- |
1602 | //-------------------------------------------------------------- |
1603 | void Show_MAC( uint8_t progmem, const char *headline, const char *mac ) |
1603 | void Show_MAC( uint8_t progmem, const char *headline, const char *mac ) |
1604 | { |
1604 | { |
1605 | uint8_t i; |
1605 | uint8_t i; |
1606 | uint8_t z; |
1606 | uint8_t z; |
1607 | 1607 | ||
1608 | lcd_cls(); |
1608 | lcd_cls(); |
1609 | PKT_TitleFromMenuItem( true ); |
1609 | PKT_TitleFromMenuItem( true ); |
1610 | 1610 | ||
1611 | if( progmem ) |
1611 | if( progmem ) |
1612 | lcdx_printp_center( 2, headline, MNORMAL, 0,2); |
1612 | lcdx_printp_center( 2, headline, MNORMAL, 0,2); |
1613 | else |
1613 | else |
1614 | lcdx_print_center( 2, (uint8_t *)headline, MNORMAL, 0,2); |
1614 | lcdx_print_center( 2, (uint8_t *)headline, MNORMAL, 0,2); |
1615 | 1615 | ||
1616 | z = 0; |
1616 | z = 0; |
1617 | for( i = 0; i < 13; i++) |
1617 | for( i = 0; i < 13; i++) |
1618 | { |
1618 | { |
1619 | lcdx_putc( z+2, 5, mac[i], MNORMAL, 0,-1); |
1619 | lcdx_putc( z+2, 5, mac[i], MNORMAL, 0,-1); |
1620 | if( (i%2==1) && (i<11) ) |
1620 | if( (i%2==1) && (i<11) ) |
1621 | { |
1621 | { |
1622 | z++; |
1622 | z++; |
1623 | lcdx_printp_at( z+2, 5, PSTR(":"), MNORMAL, 0,-1); |
1623 | lcdx_printp_at( z+2, 5, PSTR(":"), MNORMAL, 0,-1); |
1624 | } |
1624 | } |
1625 | z++; |
1625 | z++; |
1626 | } |
1626 | } |
1627 | lcd_rect_round( 0, 34, 127, 16, 1, R2); // Rahmen |
1627 | lcd_rect_round( 0, 34, 127, 16, 1, R2); // Rahmen |
1628 | Wait4KeyENDE( false ); |
1628 | Wait4KeyENDE( false ); |
1629 | } |
1629 | } |
1630 | 1630 | ||
1631 | 1631 | ||
1632 | 1632 | ||
1633 | //-------------------------------------------------------------- |
1633 | //-------------------------------------------------------------- |
1634 | // Setup_OSD() |
1634 | // Setup_OSD() |
1635 | //-------------------------------------------------------------- |
1635 | //-------------------------------------------------------------- |
1636 | void Setup_OSD( void ) |
1636 | void Setup_OSD( void ) |
1637 | { |
1637 | { |
1638 | uint8_t itemid; |
1638 | uint8_t itemid; |
1639 | 1639 | ||
1640 | //--------------- |
1640 | //--------------- |
1641 | // Create |
1641 | // Create |
1642 | //--------------- |
1642 | //--------------- |
1643 | MenuCtrl_Create(); |
1643 | MenuCtrl_Create(); |
1644 | MenuCtrl_SetTitleFromParentItem(); // "OSD Anzeige" |
1644 | MenuCtrl_SetTitleFromParentItem(); // "OSD Anzeige" |
1645 | 1645 | ||
1646 | //--------------- |
1646 | //--------------- |
1647 | // Menuitems |
1647 | // Menuitems |
1648 | //--------------- |
1648 | //--------------- |
1649 | MenuCtrl_PushML2_P( OSDS_LOWBAT , MENU_ITEM, NOFUNC , OSDS_LOWBAT_de , OSDS_LOWBAT_en ); |
1649 | MenuCtrl_PushML2_P( OSDS_LOWBAT , MENU_ITEM, NOFUNC , OSDS_LOWBAT_de , OSDS_LOWBAT_en ); |
1650 | //MenuCtrl_PushML2_P( OSDS_MAH , MENU_ITEM, NOFUNC , OSDS_MAH_de , OSDS_MAH_en ); |
1650 | //MenuCtrl_PushML2_P( OSDS_MAH , MENU_ITEM, NOFUNC , OSDS_MAH_de , OSDS_MAH_en ); |
1651 | MenuCtrl_PushML2_P( OSDS_RCERROR , MENU_ITEM, NOFUNC , OSDS_RCERROR_de , OSDS_RCERROR_en ); |
1651 | MenuCtrl_PushML2_P( OSDS_RCERROR , MENU_ITEM, NOFUNC , OSDS_RCERROR_de , OSDS_RCERROR_en ); |
1652 | 1652 | ||
1653 | MenuCtrl_PushSeparator(); // MENUE TRENNLINIE |
1653 | MenuCtrl_PushSeparator(); // MENUE TRENNLINIE |
1654 | 1654 | ||
1655 | MenuCtrl_PushML2_P( OSDS_SHOWCELLU , MENU_ITEM, NOFUNC , OSDS_SHOWCELLU_de , OSDS_SHOWCELLU_en ); |
1655 | MenuCtrl_PushML2_P( OSDS_SHOWCELLU , MENU_ITEM, NOFUNC , OSDS_SHOWCELLU_de , OSDS_SHOWCELLU_en ); |
1656 | MenuCtrl_PushML2_P( OSDS_MKSETTING , MENU_ITEM, NOFUNC , OSDS_MKSETTING_de , OSDS_MKSETTING_en ); |
1656 | MenuCtrl_PushML2_P( OSDS_MKSETTING , MENU_ITEM, NOFUNC , OSDS_MKSETTING_de , OSDS_MKSETTING_en ); |
1657 | 1657 | ||
1658 | #ifdef USE_OSD_SCREEN_OLD |
1658 | #ifdef USE_OSD_SCREEN_OLD |
1659 | MenuCtrl_PushSeparator(); // MENUE TRENNLINIE |
1659 | MenuCtrl_PushSeparator(); // MENUE TRENNLINIE |
1660 | MenuCtrl_PushML2_P( OSDS_FALLSPEED , MENU_ITEM, NOFUNC , OSDS_FALLSPEED_de , OSDS_FALLSPEED_en ); |
1660 | MenuCtrl_PushML2_P( OSDS_FALLSPEED , MENU_ITEM, NOFUNC , OSDS_FALLSPEED_de , OSDS_FALLSPEED_en ); |
1661 | MenuCtrl_PushML2_P( OSDS_VARIOBEEP , MENU_ITEM, NOFUNC , OSDS_VARIOBEEP_de , OSDS_VARIOBEEP_en ); |
1661 | MenuCtrl_PushML2_P( OSDS_VARIOBEEP , MENU_ITEM, NOFUNC , OSDS_VARIOBEEP_de , OSDS_VARIOBEEP_en ); |
1662 | MenuCtrl_PushML2_P( OSDS_VOLTBAR , MENU_ITEM, NOFUNC , OSDS_VOLTBAR_de , OSDS_VOLTBAR_en ); |
1662 | MenuCtrl_PushML2_P( OSDS_VOLTBAR , MENU_ITEM, NOFUNC , OSDS_VOLTBAR_de , OSDS_VOLTBAR_en ); |
1663 | MenuCtrl_PushML2_P( OSDS_OUTFORMAT , MENU_ITEM, NOFUNC , OSDS_OUTFORMAT_de , OSDS_OUTFORMAT_en ); |
1663 | MenuCtrl_PushML2_P( OSDS_OUTFORMAT , MENU_ITEM, NOFUNC , OSDS_OUTFORMAT_de , OSDS_OUTFORMAT_en ); |
1664 | MenuCtrl_PushML2_P( OSDS_OUTPOLARITY , MENU_ITEM, NOFUNC , OSDS_OUTPOLARITY_de , OSDS_OUTPOLARITY_en ); |
1664 | MenuCtrl_PushML2_P( OSDS_OUTPOLARITY , MENU_ITEM, NOFUNC , OSDS_OUTPOLARITY_de , OSDS_OUTPOLARITY_en ); |
1665 | #endif |
1665 | #endif |
1666 | 1666 | ||
1667 | MenuCtrl_PushSeparator(); // MENUE TRENNLINIE |
1667 | MenuCtrl_PushSeparator(); // MENUE TRENNLINIE |
1668 | 1668 | ||
1669 | MenuCtrl_PushML2_P( OSDS_DATASV2 , MENU_ITEM, NOFUNC , OSDS_DATASV2_de , OSDS_DATASV2_en ); |
1669 | MenuCtrl_PushML2_P( OSDS_DATASV2 , MENU_ITEM, NOFUNC , OSDS_DATASV2_de , OSDS_DATASV2_en ); |
1670 | 1670 | ||
1671 | 1671 | ||
1672 | //--------------- |
1672 | //--------------- |
1673 | // Control |
1673 | // Control |
1674 | //--------------- |
1674 | //--------------- |
1675 | while( true ) |
1675 | while( true ) |
1676 | { |
1676 | { |
1677 | MenuCtrl_Control( MENUCTRL_EVENT ); |
1677 | MenuCtrl_Control( MENUCTRL_EVENT ); |
1678 | 1678 | ||
1679 | if( MenuCtrl_GetKey() == KEY_ESC ) break; // ENDE |
1679 | if( MenuCtrl_GetKey() == KEY_ESC ) break; // ENDE |
1680 | 1680 | ||
1681 | itemid = MenuCtrl_GetItemId(); // welcher Menu-Punkt (ID) |
1681 | itemid = MenuCtrl_GetItemId(); // welcher Menu-Punkt (ID) |
1682 | 1682 | ||
1683 | if( itemid == OSDS_LOWBAT ) { Config.MK_LowBat = Edit_generic( Config.MK_LowBat ,32,255, Show_uint10th,1 ,strGet(STR_HELP_LOWBAT1),strGet(STR_HELP_LOWBAT2)); } |
1683 | if( itemid == OSDS_LOWBAT ) { Config.MK_LowBat = Edit_generic( Config.MK_LowBat ,32,255, Show_uint10th,1 ,strGet(STR_HELP_LOWBAT1),strGet(STR_HELP_LOWBAT2)); } |
1684 | if( itemid == OSDS_SHOWCELLU ) { Config.OSD_ShowCellU = Edit_generic( Config.OSD_ShowCellU , 0, 1, YesNo,1 ,NULL,NULL); } |
1684 | if( itemid == OSDS_SHOWCELLU ) { Config.OSD_ShowCellU = Edit_generic( Config.OSD_ShowCellU , 0, 1, YesNo,1 ,NULL,NULL); } |
1685 | if( itemid == OSDS_MAH ) { Config.OSD_mAh_Warning = Edit_generic( Config.OSD_mAh_Warning , 0,30000, Show_uint5,100 ,NULL,NULL); } |
1685 | if( itemid == OSDS_MAH ) { Config.OSD_mAh_Warning = Edit_generic( Config.OSD_mAh_Warning , 0,30000, Show_uint5,100 ,NULL,NULL); } |
1686 | if( itemid == OSDS_RCERROR ) { Config.OSD_RCErrorbeep = Edit_generic( Config.OSD_RCErrorbeep , 0, 1, OnOff,1 ,NULL,NULL); } |
1686 | if( itemid == OSDS_RCERROR ) { Config.OSD_RCErrorbeep = Edit_generic( Config.OSD_RCErrorbeep , 0, 1, OnOff,1 ,NULL,NULL); } |
1687 | if( itemid == OSDS_MKSETTING ) { Config.OSD_ShowMKSetting = Edit_generic( Config.OSD_ShowMKSetting, 0, 1, YesNo,1 ,NULL,NULL); } |
1687 | if( itemid == OSDS_MKSETTING ) { Config.OSD_ShowMKSetting = Edit_generic( Config.OSD_ShowMKSetting, 0, 1, YesNo,1 ,NULL,NULL); } |
1688 | if( itemid == OSDS_DATASV2 ) { Config.OSD_SendOSD = Edit_generic( Config.OSD_SendOSD , 0, 1, YesNo,1 ,NULL,NULL); } |
1688 | if( itemid == OSDS_DATASV2 ) { Config.OSD_SendOSD = Edit_generic( Config.OSD_SendOSD , 0, 1, YesNo,1 ,NULL,NULL); } |
1689 | 1689 | ||
1690 | #ifdef USE_OSD_SCREEN_OLD |
1690 | #ifdef USE_OSD_SCREEN_OLD |
1691 | if( itemid == OSDS_FALLSPEED ) { Config.OSD_Fallspeed = Edit_generic( Config.OSD_Fallspeed , 0,247, Show_uint10th,1 ,NULL,NULL); } |
1691 | if( itemid == OSDS_FALLSPEED ) { Config.OSD_Fallspeed = Edit_generic( Config.OSD_Fallspeed , 0,247, Show_uint10th,1 ,NULL,NULL); } |
1692 | if( itemid == OSDS_VARIOBEEP ) { Config.OSD_VarioBeep = Edit_generic( Config.OSD_VarioBeep , 0, 1, YesNo,1 ,NULL,NULL); } |
1692 | if( itemid == OSDS_VARIOBEEP ) { Config.OSD_VarioBeep = Edit_generic( Config.OSD_VarioBeep , 0, 1, YesNo,1 ,NULL,NULL); } |
1693 | if( itemid == OSDS_OUTFORMAT ) { Config.OSD_LEDform = Edit_LED_Form(Config.OSD_LEDform , 1, 3 ); } |
1693 | if( itemid == OSDS_OUTFORMAT ) { Config.OSD_LEDform = Edit_LED_Form(Config.OSD_LEDform , 1, 3 ); } |
1694 | if( itemid == OSDS_OUTPOLARITY ) { Config.OSD_InvertOut = Edit_generic( Config.OSD_InvertOut , 0, 1, YesNo,1 ,NULL,NULL); } |
1694 | if( itemid == OSDS_OUTPOLARITY ) { Config.OSD_InvertOut = Edit_generic( Config.OSD_InvertOut , 0, 1, YesNo,1 ,NULL,NULL); } |
1695 | if( itemid == OSDS_VOLTBAR ) { Config.OSD_LipoBar = Edit_generic( Config.OSD_LipoBar , 0, 1, YesNo,1 ,NULL,NULL); } |
1695 | if( itemid == OSDS_VOLTBAR ) { Config.OSD_LipoBar = Edit_generic( Config.OSD_LipoBar , 0, 1, YesNo,1 ,NULL,NULL); } |
1696 | #endif |
1696 | #endif |
1697 | } |
1697 | } |
1698 | 1698 | ||
1699 | //--------------- |
1699 | //--------------- |
1700 | // Destroy |
1700 | // Destroy |
1701 | //--------------- |
1701 | //--------------- |
1702 | MenuCtrl_Destroy(); |
1702 | MenuCtrl_Destroy(); |
1703 | } |
1703 | } |
1704 | 1704 | ||
1705 | 1705 | ||
1706 | 1706 | ||
1707 | //-------------------------------------------------------------- |
1707 | //-------------------------------------------------------------- |
1708 | //-------------------------------------------------------------- |
1708 | //-------------------------------------------------------------- |
1709 | void Mark_OSDScreen( uint8_t osdscreenid ) |
1709 | void Mark_OSDScreen( uint8_t osdscreenid ) |
1710 | { |
1710 | { |
1711 | MenuCtrl_ItemMarkR( osdscreenid, (Config.OSD_UseScreen & (1 << osdscreenid)) != 0 ); |
1711 | MenuCtrl_ItemMarkR( osdscreenid, (Config.OSD_UseScreen & (1 << osdscreenid)) != 0 ); |
1712 | } |
1712 | } |
1713 | 1713 | ||
1714 | 1714 | ||
1715 | //-------------------------------------------------------------- |
1715 | //-------------------------------------------------------------- |
1716 | //-------------------------------------------------------------- |
1716 | //-------------------------------------------------------------- |
1717 | void Edit_OSDScreen( uint8_t osdscreenid ) |
1717 | void Edit_OSDScreen( uint8_t osdscreenid ) |
1718 | { |
1718 | { |
1719 | if( (Config.OSD_UseScreen & (1 << osdscreenid)) == 0 ) |
1719 | if( (Config.OSD_UseScreen & (1 << osdscreenid)) == 0 ) |
1720 | Config.OSD_UseScreen = (Config.OSD_UseScreen | (1 << osdscreenid)); |
1720 | Config.OSD_UseScreen = (Config.OSD_UseScreen | (1 << osdscreenid)); |
1721 | else |
1721 | else |
1722 | Config.OSD_UseScreen = (Config.OSD_UseScreen ^ (1 << osdscreenid)); |
1722 | Config.OSD_UseScreen = (Config.OSD_UseScreen ^ (1 << osdscreenid)); |
1723 | 1723 | ||
1724 | Mark_OSDScreen( osdscreenid ); |
1724 | Mark_OSDScreen( osdscreenid ); |
1725 | } |
1725 | } |
1726 | 1726 | ||
1727 | 1727 | ||
1728 | 1728 | ||
1729 | //-------------------------------------------------------------- |
1729 | //-------------------------------------------------------------- |
1730 | // Setup_OSDScreens() |
1730 | // Setup_OSDScreens() |
1731 | //-------------------------------------------------------------- |
1731 | //-------------------------------------------------------------- |
1732 | void Setup_OSDScreens( void ) |
1732 | void Setup_OSDScreens( void ) |
1733 | { |
1733 | { |
1734 | uint8_t itemid; |
1734 | uint8_t itemid; |
1735 | 1735 | ||
1736 | //--------------- |
1736 | //--------------- |
1737 | // Create |
1737 | // Create |
1738 | //--------------- |
1738 | //--------------- |
1739 | MenuCtrl_Create(); |
1739 | MenuCtrl_Create(); |
1740 | MenuCtrl_SetTitleFromParentItem(); // "OSD Screens" |
1740 | MenuCtrl_SetTitleFromParentItem(); // "OSD Screens" |
1741 | 1741 | ||
1742 | //--------------- |
1742 | //--------------- |
1743 | // Menuitems |
1743 | // Menuitems |
1744 | //--------------- |
1744 | //--------------- |
1745 | #ifdef USE_OSD_SCREEN_NAVIGATION |
1745 | #ifdef USE_OSD_SCREEN_NAVIGATION |
1746 | MenuCtrl_Push_P( OSDSCREEN_NAVIGATION, MENU_ITEM, NOFUNC, strGet(STR_OSDSCREEN_NAVIGATION) ); Mark_OSDScreen( OSDSCREEN_NAVIGATION ); |
1746 | MenuCtrl_Push_P( OSDSCREEN_NAVIGATION, MENU_ITEM, NOFUNC, strGet(STR_OSDSCREEN_NAVIGATION) ); Mark_OSDScreen( OSDSCREEN_NAVIGATION ); |
1747 | #endif |
1747 | #endif |
1748 | 1748 | ||
1749 | #ifdef USE_OSD_SCREEN_WAYPOINTS |
1749 | #ifdef USE_OSD_SCREEN_WAYPOINTS |
1750 | MenuCtrl_Push_P( OSDSCREEN_WAYPOINTS , MENU_ITEM, NOFUNC, strGet(STR_OSDSCREEN_WAYPOINTS) ); Mark_OSDScreen( OSDSCREEN_WAYPOINTS ); |
1750 | MenuCtrl_Push_P( OSDSCREEN_WAYPOINTS , MENU_ITEM, NOFUNC, strGet(STR_OSDSCREEN_WAYPOINTS) ); Mark_OSDScreen( OSDSCREEN_WAYPOINTS ); |
1751 | #endif |
1751 | #endif |
1752 | 1752 | ||
1753 | #ifdef USE_OSD_SCREEN_ELECTRIC |
1753 | #ifdef USE_OSD_SCREEN_ELECTRIC |
1754 | MenuCtrl_Push_P( OSDSCREEN_ELECTRIC , MENU_ITEM, NOFUNC, strGet(STR_OSDSCREEN_ELECTRIC) ); Mark_OSDScreen( OSDSCREEN_ELECTRIC ); |
1754 | MenuCtrl_Push_P( OSDSCREEN_ELECTRIC , MENU_ITEM, NOFUNC, strGet(STR_OSDSCREEN_ELECTRIC) ); Mark_OSDScreen( OSDSCREEN_ELECTRIC ); |
1755 | #endif |
1755 | #endif |
1756 | 1756 | ||
1757 | #ifdef USE_OSD_SCREEN_ELECTRIC_N |
1757 | #ifdef USE_OSD_SCREEN_ELECTRIC_N |
1758 | MenuCtrl_Push_P( OSDSCREEN_ELECTRIC , MENU_ITEM, NOFUNC, strGet(STR_OSDSCREEN_ELECTRIC) ); Mark_OSDScreen( OSDSCREEN_ELECTRIC ); |
1758 | MenuCtrl_Push_P( OSDSCREEN_ELECTRIC , MENU_ITEM, NOFUNC, strGet(STR_OSDSCREEN_ELECTRIC) ); Mark_OSDScreen( OSDSCREEN_ELECTRIC ); |
1759 | #endif |
1759 | #endif |
1760 | 1760 | ||
1761 | #ifdef USE_OSD_SCREEN_MKSTATUS |
1761 | #ifdef USE_OSD_SCREEN_MKSTATUS |
1762 | MenuCtrl_Push_P( OSDSCREEN_MKSTATUS , MENU_ITEM, NOFUNC, strGet(STR_OSDSCREEN_MKSTATUS) ); Mark_OSDScreen( OSDSCREEN_MKSTATUS ); |
1762 | MenuCtrl_Push_P( OSDSCREEN_MKSTATUS , MENU_ITEM, NOFUNC, strGet(STR_OSDSCREEN_MKSTATUS) ); Mark_OSDScreen( OSDSCREEN_MKSTATUS ); |
1763 | #endif |
1763 | #endif |
1764 | 1764 | ||
1765 | #ifdef USE_OSD_SCREEN_USERGPS |
1765 | #ifdef USE_OSD_SCREEN_USERGPS |
1766 | MenuCtrl_Push_P( OSDSCREEN_USERGPS , MENU_ITEM, NOFUNC, strGet(STR_OSDSCREEN_USERGPS) ); Mark_OSDScreen( OSDSCREEN_USERGPS ); |
1766 | MenuCtrl_Push_P( OSDSCREEN_USERGPS , MENU_ITEM, NOFUNC, strGet(STR_OSDSCREEN_USERGPS) ); Mark_OSDScreen( OSDSCREEN_USERGPS ); |
1767 | #endif |
1767 | #endif |
1768 | 1768 | ||
1769 | #ifdef USE_OSD_SCREEN_3DLAGE |
1769 | #ifdef USE_OSD_SCREEN_3DLAGE |
1770 | MenuCtrl_Push_P( OSDSCREEN_3DLAGE , MENU_ITEM, NOFUNC, strGet(STR_OSDSCREEN_3DLAGE) ); Mark_OSDScreen( OSDSCREEN_3DLAGE ); |
1770 | MenuCtrl_Push_P( OSDSCREEN_3DLAGE , MENU_ITEM, NOFUNC, strGet(STR_OSDSCREEN_3DLAGE) ); Mark_OSDScreen( OSDSCREEN_3DLAGE ); |
1771 | #endif |
1771 | #endif |
1772 | 1772 | ||
1773 | #ifdef USE_OSD_SCREEN_STATISTIC |
1773 | #ifdef USE_OSD_SCREEN_STATISTIC |
1774 | MenuCtrl_Push_P( OSDSCREEN_STATISTICS, MENU_ITEM, NOFUNC, strGet(STR_OSDSCREEN_STATISTIC) ); Mark_OSDScreen( OSDSCREEN_STATISTICS ); |
1774 | MenuCtrl_Push_P( OSDSCREEN_STATISTICS, MENU_ITEM, NOFUNC, strGet(STR_OSDSCREEN_STATISTIC) ); Mark_OSDScreen( OSDSCREEN_STATISTICS ); |
1775 | #endif |
1775 | #endif |
1776 | 1776 | ||
1777 | #ifdef USE_OSD_SCREEN_OLD |
1777 | #ifdef USE_OSD_SCREEN_OLD |
1778 | MenuCtrl_Push_P( OSDSCREEN_OSD0, MENU_ITEM, NOFUNC, strGet(STR_OSDSCREEN_OSD0) ); Mark_OSDScreen( OSDSCREEN_OSD0 ); |
1778 | MenuCtrl_Push_P( OSDSCREEN_OSD0, MENU_ITEM, NOFUNC, strGet(STR_OSDSCREEN_OSD0) ); Mark_OSDScreen( OSDSCREEN_OSD0 ); |
1779 | MenuCtrl_Push_P( OSDSCREEN_OSD1, MENU_ITEM, NOFUNC, strGet(STR_OSDSCREEN_OSD1) ); Mark_OSDScreen( OSDSCREEN_OSD1 ); |
1779 | MenuCtrl_Push_P( OSDSCREEN_OSD1, MENU_ITEM, NOFUNC, strGet(STR_OSDSCREEN_OSD1) ); Mark_OSDScreen( OSDSCREEN_OSD1 ); |
1780 | MenuCtrl_Push_P( OSDSCREEN_OSD2, MENU_ITEM, NOFUNC, strGet(STR_OSDSCREEN_OSD2) ); Mark_OSDScreen( OSDSCREEN_OSD2 ); |
1780 | MenuCtrl_Push_P( OSDSCREEN_OSD2, MENU_ITEM, NOFUNC, strGet(STR_OSDSCREEN_OSD2) ); Mark_OSDScreen( OSDSCREEN_OSD2 ); |
1781 | #endif |
1781 | #endif |
1782 | 1782 | ||
1783 | 1783 | ||
1784 | //--------------- |
1784 | //--------------- |
1785 | // Control |
1785 | // Control |
1786 | //--------------- |
1786 | //--------------- |
1787 | while( true ) |
1787 | while( true ) |
1788 | { |
1788 | { |
1789 | MenuCtrl_Control( MENUCTRL_EVENT ); |
1789 | MenuCtrl_Control( MENUCTRL_EVENT ); |
1790 | 1790 | ||
1791 | if( MenuCtrl_GetKey() == KEY_ESC ) break; // ENDE |
1791 | if( MenuCtrl_GetKey() == KEY_ESC ) break; // ENDE |
1792 | 1792 | ||
1793 | itemid = MenuCtrl_GetItemId(); // welcher Menu-Punkt (ID) |
1793 | itemid = MenuCtrl_GetItemId(); // welcher Menu-Punkt (ID) |
1794 | 1794 | ||
1795 | Edit_OSDScreen( itemid ); |
1795 | Edit_OSDScreen( itemid ); |
1796 | } |
1796 | } |
1797 | 1797 | ||
1798 | //--------------- |
1798 | //--------------- |
1799 | // Destroy |
1799 | // Destroy |
1800 | //--------------- |
1800 | //--------------- |
1801 | MenuCtrl_Destroy(); |
1801 | MenuCtrl_Destroy(); |
1802 | } |
1802 | } |
1803 | 1803 | ||
1804 | 1804 | ||
1805 | //-------------------------------------------------------------- |
1805 | //-------------------------------------------------------------- |
1806 | // Setup_FollowMe() |
1806 | // Setup_FollowMe() |
1807 | //-------------------------------------------------------------- |
1807 | //-------------------------------------------------------------- |
1808 | #ifdef USE_FOLLOWME |
1808 | #ifdef USE_FOLLOWME |
1809 | void Setup_FollowMe( void ) |
1809 | void Setup_FollowMe( void ) |
1810 | { |
1810 | { |
1811 | uint8_t itemid; |
1811 | uint8_t itemid; |
1812 | 1812 | ||
1813 | //--------------- |
1813 | //--------------- |
1814 | // Create |
1814 | // Create |
1815 | //--------------- |
1815 | //--------------- |
1816 | MenuCtrl_Create(); |
1816 | MenuCtrl_Create(); |
1817 | MenuCtrl_SetTitle_P( PSTR("FollowMe Setup") ); |
1817 | MenuCtrl_SetTitle_P( PSTR("FollowMe Setup") ); |
1818 | 1818 | ||
1819 | //--------------- |
1819 | //--------------- |
1820 | // Menuitems |
1820 | // Menuitems |
1821 | //--------------- |
1821 | //--------------- |
1822 | //-------------------------------------------------------------------------------------------------------- |
1822 | //-------------------------------------------------------------------------------------------------------- |
1823 | // 25.06.2014 OG - auskommentiert weil nicht verwendet. FollowMe wird aktuell ueber die Daten-Updaterate |
1823 | // 25.06.2014 OG - auskommentiert weil nicht verwendet. FollowMe wird aktuell ueber die Daten-Updaterate |
1824 | // der BT GPS-Maus getriggert! |
1824 | // der BT GPS-Maus getriggert! |
1825 | //-------------------------------------------------------------------------------------------------------- |
1825 | //-------------------------------------------------------------------------------------------------------- |
1826 | //MenuCtrl_PushML2_P( FME_REFRESH , MENU_ITEM, NOFUNC , FME_REFRESH_de , FME_REFRESH_en ); |
1826 | //MenuCtrl_PushML2_P( FME_REFRESH , MENU_ITEM, NOFUNC , FME_REFRESH_de , FME_REFRESH_en ); |
1827 | 1827 | ||
1828 | 1828 | ||
1829 | 1829 | ||
1830 | #ifdef USE_FOLLOWME_STEP2 |
1830 | #ifdef USE_FOLLOWME_STEP2 |
1831 | MenuCtrl_PushML2_P( FME_DISTANCE, MENU_ITEM, NOFUNC, FME_DISTANCE_de, FME_DISTANCE_en ); |
1831 | MenuCtrl_PushML2_P( FME_DISTANCE, MENU_ITEM, NOFUNC, FME_DISTANCE_de, FME_DISTANCE_en ); |
1832 | MenuCtrl_PushML2_P( FME_AZIMUTH , MENU_ITEM, NOFUNC, FME_AZIMUTH_de , FME_AZIMUTH_en ); |
1832 | MenuCtrl_PushML2_P( FME_AZIMUTH , MENU_ITEM, NOFUNC, FME_AZIMUTH_de , FME_AZIMUTH_en ); |
1833 | #endif |
1833 | #endif |
1834 | MenuCtrl_PushML2_P( FME_SPEED , MENU_ITEM, NOFUNC, FME_SPEED_de , FME_SPEED_en ); |
1834 | MenuCtrl_PushML2_P( FME_SPEED , MENU_ITEM, NOFUNC, FME_SPEED_de , FME_SPEED_en ); |
1835 | MenuCtrl_PushML2_P( FME_RADIUS , MENU_ITEM, NOFUNC, FME_RADIUS_de , FME_RADIUS_en ); |
1835 | MenuCtrl_PushML2_P( FME_RADIUS , MENU_ITEM, NOFUNC, FME_RADIUS_de , FME_RADIUS_en ); |
1836 | MenuCtrl_PushSeparator(); // MENUE TRENNLINIE |
1836 | MenuCtrl_PushSeparator(); // MENUE TRENNLINIE |
1837 | MenuCtrl_PushML2_P( GPS_DATA , MENU_ITEM, NOFUNC, GPS_DATA_de , GPS_DATA_en ); |
1837 | MenuCtrl_PushML2_P( GPS_DATA , MENU_ITEM, NOFUNC, GPS_DATA_de , GPS_DATA_en ); |
1838 | 1838 | ||
1839 | //--------------- |
1839 | //--------------- |
1840 | // Control |
1840 | // Control |
1841 | //--------------- |
1841 | //--------------- |
1842 | while( true ) |
1842 | while( true ) |
1843 | { |
1843 | { |
1844 | MenuCtrl_Control( MENUCTRL_EVENT ); |
1844 | MenuCtrl_Control( MENUCTRL_EVENT ); |
1845 | 1845 | ||
1846 | if( MenuCtrl_GetKey() == KEY_ESC ) break; // ENDE |
1846 | if( MenuCtrl_GetKey() == KEY_ESC ) break; // ENDE |
1847 | 1847 | ||
1848 | itemid = MenuCtrl_GetItemId(); // welcher Menu-Punkt (ID) |
1848 | itemid = MenuCtrl_GetItemId(); // welcher Menu-Punkt (ID) |
1849 | 1849 | ||
1850 | //if( itemid == FME_REFRESH ) { Config.FM_Refresh = Edit_generic( Config.FM_Refresh ,250,60000, Show_uint3,1 ,NULL,NULL); } |
1850 | //if( itemid == FME_REFRESH ) { Config.FM_Refresh = Edit_generic( Config.FM_Refresh ,250,60000, Show_uint3,1 ,NULL,NULL); } |
- | 1851 | ||
1851 | 1852 | // FollowMeStep2: |
|
1852 | if( itemid == FME_DISTANCE) { Config.FM_Distance= Edit_generic( Config.FM_Distance , 0, 100, Show_uint3,1 ,strGet(STR_METERS),NULL); } |
1853 | if( itemid == FME_DISTANCE) { Config.FM_Distance= Edit_generic( Config.FM_Distance , 0, 100, Show_uint3,1 ,strGet(STR_METERS),NULL); } |
- | 1854 | if( itemid == FME_AZIMUTH ) { Config.FM_Azimuth = Edit_generic( Config.FM_Azimuth , 0, 360, Show_uint3,1 ,PSTR("Grad"),NULL); } |
|
1853 | if( itemid == FME_AZIMUTH ) { Config.FM_Azimuth = Edit_generic( Config.FM_Azimuth , 0, 360, Show_uint3,1 ,PSTR("Grad"),NULL); } |
1855 | // FollowMe: |
1854 | if( itemid == FME_SPEED ) { Config.FM_Speed = Edit_generic( Config.FM_Speed , 0, 100, Show_uint3,1 ,PSTR("0.1 m/s") ,NULL); } |
1856 | if( itemid == FME_SPEED ) { Config.FM_Speed = Edit_generic( Config.FM_Speed , 0, 100, Show_uint3,1 ,PSTR("0.1 m/s") ,NULL); } |
1855 | if( itemid == FME_RADIUS ) { Config.FM_Radius = Edit_generic( Config.FM_Radius , 1, 20, Show_uint3,1 ,strGet(STR_METERS),NULL); } |
1857 | if( itemid == FME_RADIUS ) { Config.FM_Radius = Edit_generic( Config.FM_Radius , 1, 20, Show_uint3,1 ,strGet(STR_METERS),NULL); } |
1856 | 1858 | ||
1857 | //-------------------- |
1859 | //-------------------- |
1858 | // GPS_DATA |
1860 | // GPS_DATA |
1859 | //-------------------- |
1861 | //-------------------- |
1860 | if( itemid == GPS_DATA ) |
1862 | if( itemid == GPS_DATA ) |
1861 | { |
1863 | { |
1862 | GPSMouse_ShowData( GPSMOUSE_SHOW_TIME, 0 ); // 0 = beenden mit Verbindungstrennung |
1864 | GPSMouse_ShowData( GPSMOUSE_SHOW_TIME, 0 ); // 0 = beenden mit Verbindungstrennung |
1863 | } |
1865 | } |
1864 | } |
1866 | } |
1865 | 1867 | ||
1866 | //--------------- |
1868 | //--------------- |
1867 | // Destroy |
1869 | // Destroy |
1868 | //--------------- |
1870 | //--------------- |
1869 | MenuCtrl_Destroy(); |
1871 | MenuCtrl_Destroy(); |
1870 | } |
1872 | } |
1871 | #endif // USE_FOLLOWME |
1873 | #endif // USE_FOLLOWME |
1872 | 1874 | ||
1873 | 1875 | ||
1874 | 1876 | ||
1875 | //-------------------------------------------------------------- |
1877 | //-------------------------------------------------------------- |
1876 | // Setup_GPSMouse() |
1878 | // Setup_GPSMouse() |
1877 | //-------------------------------------------------------------- |
1879 | //-------------------------------------------------------------- |
1878 | #ifdef USE_BLUETOOTH |
1880 | #ifdef USE_BLUETOOTH |
1879 | 1881 | ||
1880 | void Setup_GPSMouse( void ) |
1882 | void Setup_GPSMouse( void ) |
1881 | { |
1883 | { |
1882 | uint8_t itemid; |
1884 | uint8_t itemid; |
1883 | 1885 | ||
1884 | //--------------- |
1886 | //--------------- |
1885 | // Create |
1887 | // Create |
1886 | //--------------- |
1888 | //--------------- |
1887 | MenuCtrl_Create(); |
1889 | MenuCtrl_Create(); |
1888 | MenuCtrl_SetTitleFromParentItem(); // "GPS Maus" |
1890 | MenuCtrl_SetTitleFromParentItem(); // "GPS Maus" |
1889 | 1891 | ||
1890 | //--------------- |
1892 | //--------------- |
1891 | // Menuitems |
1893 | // Menuitems |
1892 | //--------------- |
1894 | //--------------- |
1893 | MenuCtrl_PushML2_P( GPS_SEARCH , MENU_ITEM, &BT_SearchDevices , GPS_SEARCH_de , GPS_SEARCH_en ); |
1895 | MenuCtrl_PushML2_P( GPS_SEARCH , MENU_ITEM, &BT_SearchDevices , GPS_SEARCH_de , GPS_SEARCH_en ); |
1894 | MenuCtrl_PushML2_P( GPS_DEVICES , MENU_ITEM, &BT_SelectDevice , GPS_DEVICES_de , GPS_DEVICES_en ); |
1896 | MenuCtrl_PushML2_P( GPS_DEVICES , MENU_ITEM, &BT_SelectDevice , GPS_DEVICES_de , GPS_DEVICES_en ); |
1895 | 1897 | ||
1896 | //-------------------------------------------------------------------------------------------------------- |
1898 | //-------------------------------------------------------------------------------------------------------- |
1897 | // 25.06.2014 OG - auskommentiert weil erstmal nicht weiter benoetigt. Wurde zwar verwendet in tracking.c |
1899 | // 25.06.2014 OG - auskommentiert weil erstmal nicht weiter benoetigt. Wurde zwar verwendet in tracking.c |
1898 | // aber auch dort wurde betroffener Code deaktiviert - siehe Anmerkung tracking.c / PKT_tracking() |
1900 | // aber auch dort wurde betroffener Code deaktiviert - siehe Anmerkung tracking.c / PKT_tracking() |
1899 | //-------------------------------------------------------------------------------------------------------- |
1901 | //-------------------------------------------------------------------------------------------------------- |
1900 | //MenuCtrl_PushML2_P( GPS_TYPE , MENU_ITEM, NOFUNC , GPS_TYPE_de , GPS_TYPE_en ); |
1902 | //MenuCtrl_PushML2_P( GPS_TYPE , MENU_ITEM, NOFUNC , GPS_TYPE_de , GPS_TYPE_en ); |
1901 | 1903 | ||
1902 | //-------------------------------------------------------------------------------------------------------- |
1904 | //-------------------------------------------------------------------------------------------------------- |
1903 | // 25.06.2014 OG - auskommentiert weil nirgendwo verwendet |
1905 | // 25.06.2014 OG - auskommentiert weil nirgendwo verwendet |
1904 | //-------------------------------------------------------------------------------------------------------- |
1906 | //-------------------------------------------------------------------------------------------------------- |
1905 | //MenuCtrl_PushML2_P( GPS_ACTIVE , MENU_ITEM, NOFUNC , GPS_ACTIVE_de , GPS_ACTIVE_en ); |
1907 | //MenuCtrl_PushML2_P( GPS_ACTIVE , MENU_ITEM, NOFUNC , GPS_ACTIVE_de , GPS_ACTIVE_en ); |
1906 | 1908 | ||
1907 | MenuCtrl_PushSeparator(); // MENUE TRENNLINIE |
1909 | MenuCtrl_PushSeparator(); // MENUE TRENNLINIE |
1908 | MenuCtrl_PushML2_P( GPS_SHOWDEV , MENU_ITEM, NOFUNC , GPS_SHOWDEV_de , GPS_SHOWDEV_en ); |
1910 | MenuCtrl_PushML2_P( GPS_SHOWDEV , MENU_ITEM, NOFUNC , GPS_SHOWDEV_de , GPS_SHOWDEV_en ); |
1909 | MenuCtrl_PushML2_P( GPS_DATA , MENU_ITEM, NOFUNC , GPS_DATA_de , GPS_DATA_en ); |
1911 | MenuCtrl_PushML2_P( GPS_DATA , MENU_ITEM, NOFUNC , GPS_DATA_de , GPS_DATA_en ); |
1910 | 1912 | ||
1911 | 1913 | ||
1912 | //--------------- |
1914 | //--------------- |
1913 | // Control |
1915 | // Control |
1914 | //--------------- |
1916 | //--------------- |
1915 | while( true ) |
1917 | while( true ) |
1916 | { |
1918 | { |
1917 | MenuCtrl_Control( MENUCTRL_EVENT ); |
1919 | MenuCtrl_Control( MENUCTRL_EVENT ); |
1918 | 1920 | ||
1919 | if( MenuCtrl_GetKey() == KEY_ESC ) break; // ENDE |
1921 | if( MenuCtrl_GetKey() == KEY_ESC ) break; // ENDE |
1920 | 1922 | ||
1921 | itemid = MenuCtrl_GetItemId(); // welcher Menu-Punkt (ID) |
1923 | itemid = MenuCtrl_GetItemId(); // welcher Menu-Punkt (ID) |
1922 | 1924 | ||
1923 | //-------------------- |
1925 | //-------------------- |
1924 | // GPS_TYPE |
1926 | // GPS_TYPE |
1925 | //-------------------- |
1927 | //-------------------- |
1926 | /* |
1928 | /* |
1927 | if( itemid == GPS_TYPE ) |
1929 | if( itemid == GPS_TYPE ) |
1928 | { |
1930 | { |
1929 | Config.gps_UsedGPSMouse = Edit_generic( Config.gps_UsedGPSMouse, 0,1,GPSMOUSE,1 ,NULL,NULL); |
1931 | Config.gps_UsedGPSMouse = Edit_generic( Config.gps_UsedGPSMouse, 0,1,GPSMOUSE,1 ,NULL,NULL); |
1930 | } |
1932 | } |
1931 | */ |
1933 | */ |
1932 | 1934 | ||
1933 | //-------------------- |
1935 | //-------------------- |
1934 | // GPS_ACTIVE |
1936 | // GPS_ACTIVE |
1935 | //-------------------- |
1937 | //-------------------- |
1936 | /* |
1938 | /* |
1937 | if( itemid == GPS_ACTIVE ) |
1939 | if( itemid == GPS_ACTIVE ) |
1938 | { |
1940 | { |
1939 | Config.gps_UseGPS = Edit_generic( Config.gps_UseGPS, 0,1,YesNo,1 ,NULL,NULL); |
1941 | Config.gps_UseGPS = Edit_generic( Config.gps_UseGPS, 0,1,YesNo,1 ,NULL,NULL); |
1940 | } |
1942 | } |
1941 | */ |
1943 | */ |
1942 | 1944 | ||
1943 | 1945 | ||
1944 | //-------------------- |
1946 | //-------------------- |
1945 | // GPS_SHOWDEV |
1947 | // GPS_SHOWDEV |
1946 | //-------------------- |
1948 | //-------------------- |
1947 | if( itemid == GPS_SHOWDEV ) |
1949 | if( itemid == GPS_SHOWDEV ) |
1948 | { |
1950 | { |
1949 | //Show_MAC( progmem, headline, mac) |
1951 | //Show_MAC( progmem, headline, mac) |
1950 | Show_MAC( false, Config.gps_UsedDevName, Config.gps_UsedMac); |
1952 | Show_MAC( false, Config.gps_UsedDevName, Config.gps_UsedMac); |
1951 | } |
1953 | } |
1952 | 1954 | ||
1953 | 1955 | ||
1954 | //-------------------- |
1956 | //-------------------- |
1955 | // GPS_DATA |
1957 | // GPS_DATA |
1956 | //-------------------- |
1958 | //-------------------- |
1957 | if( itemid == GPS_DATA ) |
1959 | if( itemid == GPS_DATA ) |
1958 | { |
1960 | { |
1959 | GPSMouse_ShowData( GPSMOUSE_SHOW_TIME, 0 ); // 0 = beenden mit Verbindungstrennung |
1961 | GPSMouse_ShowData( GPSMOUSE_SHOW_TIME, 0 ); // 0 = beenden mit Verbindungstrennung |
1960 | } |
1962 | } |
1961 | 1963 | ||
1962 | } |
1964 | } |
1963 | 1965 | ||
1964 | //--------------- |
1966 | //--------------- |
1965 | // Destroy |
1967 | // Destroy |
1966 | //--------------- |
1968 | //--------------- |
1967 | MenuCtrl_Destroy(); |
1969 | MenuCtrl_Destroy(); |
1968 | } |
1970 | } |
1969 | 1971 | ||
1970 | 1972 | ||
1971 | 1973 | ||
1972 | 1974 | ||
1973 | //-------------------------------------------------------------- |
1975 | //-------------------------------------------------------------- |
1974 | // zeigt die Konfig des BTM-222 |
1976 | // zeigt die Konfig des BTM-222 |
1975 | //-------------------------------------------------------------- |
1977 | //-------------------------------------------------------------- |
1976 | void BTM222_Info( void ) |
1978 | void BTM222_Info( void ) |
1977 | { |
1979 | { |
1978 | 1980 | ||
1979 | lcd_cls(); |
1981 | lcd_cls(); |
1980 | 1982 | ||
1981 | set_Modul_On( Bluetooth ); |
1983 | set_Modul_On( Bluetooth ); |
1982 | 1984 | ||
1983 | if( !ScrollBox_Create(55) ) // max. 55 Zeilen |
1985 | if( !ScrollBox_Create(55) ) // max. 55 Zeilen |
1984 | return; // kein RAM mehr |
1986 | return; // kein RAM mehr |
1985 | 1987 | ||
1986 | ScrollBox_Push_P( MNORMAL, PSTR("BTM-222 Config") ); |
1988 | ScrollBox_Push_P( MNORMAL, PSTR("BTM-222 Config") ); |
1987 | ScrollBox_Push_P( MNORMAL, PSTR("") ); |
1989 | ScrollBox_Push_P( MNORMAL, PSTR("") ); |
1988 | bt_showsettings(); |
1990 | bt_showsettings(); |
1989 | ScrollBox_Push_P( MNORMAL, PSTR("End of Config") ); |
1991 | ScrollBox_Push_P( MNORMAL, PSTR("End of Config") ); |
1990 | 1992 | ||
1991 | ScrollBox_Show(); |
1993 | ScrollBox_Show(); |
1992 | ScrollBox_Destroy(); // free memory |
1994 | ScrollBox_Destroy(); // free memory |
1993 | 1995 | ||
1994 | set_Modul_On( USB ); |
1996 | set_Modul_On( USB ); |
1995 | 1997 | ||
1996 | } |
1998 | } |
1997 | 1999 | ||
1998 | 2000 | ||
1999 | 2001 | ||
2000 | //-------------------------------------------------------------- |
2002 | //-------------------------------------------------------------- |
2001 | // Setup_BTM222_MenuCreate() |
2003 | // Setup_BTM222_MenuCreate() |
2002 | // |
2004 | // |
2003 | // das Menue aendert sich je nachdem ob BTM222 ein- oder |
2005 | // das Menue aendert sich je nachdem ob BTM222 ein- oder |
2004 | // ausgeschaltet ist |
2006 | // ausgeschaltet ist |
2005 | //-------------------------------------------------------------- |
2007 | //-------------------------------------------------------------- |
2006 | void Setup_BTM222_MenuCreate( void ) |
2008 | void Setup_BTM222_MenuCreate( void ) |
2007 | { |
2009 | { |
2008 | //--------------- |
2010 | //--------------- |
2009 | // Create |
2011 | // Create |
2010 | //--------------- |
2012 | //--------------- |
2011 | MenuCtrl_Create(); |
2013 | MenuCtrl_Create(); |
2012 | MenuCtrl_SetTitleFromParentItem(); // "Bluetooth" |
2014 | MenuCtrl_SetTitleFromParentItem(); // "Bluetooth" |
2013 | 2015 | ||
2014 | //--------------- |
2016 | //--------------- |
2015 | // Menuitems |
2017 | // Menuitems |
2016 | //--------------- |
2018 | //--------------- |
2017 | MenuCtrl_PushML2_P( BT_INSTALLED , MENU_ITEM, NOFUNC , BT_INSTALLED_de , BT_INSTALLED_en ); |
2019 | MenuCtrl_PushML2_P( BT_INSTALLED , MENU_ITEM, NOFUNC , BT_INSTALLED_de , BT_INSTALLED_en ); |
2018 | 2020 | ||
2019 | if( Config.UseBT ) |
2021 | if( Config.UseBT ) |
2020 | { |
2022 | { |
2021 | MenuCtrl_PushSeparator(); // MENUE TRENNLINIE |
2023 | MenuCtrl_PushSeparator(); // MENUE TRENNLINIE |
2022 | MenuCtrl_PushML2_P( BT_NAME , MENU_ITEM, NOFUNC , BT_NAME_de , BT_NAME_en ); |
2024 | MenuCtrl_PushML2_P( BT_NAME , MENU_ITEM, NOFUNC , BT_NAME_de , BT_NAME_en ); |
2023 | MenuCtrl_PushML2_P( BT_PIN , MENU_ITEM, NOFUNC , BT_PIN_de , BT_PIN_en ); |
2025 | MenuCtrl_PushML2_P( BT_PIN , MENU_ITEM, NOFUNC , BT_PIN_de , BT_PIN_en ); |
2024 | MenuCtrl_PushML2_P( BT_REID , MENU_ITEM, NOFUNC , BT_REID_de , BT_REID_en ); |
2026 | MenuCtrl_PushML2_P( BT_REID , MENU_ITEM, NOFUNC , BT_REID_de , BT_REID_en ); |
2025 | MenuCtrl_PushSeparator(); // MENUE TRENNLINIE |
2027 | MenuCtrl_PushSeparator(); // MENUE TRENNLINIE |
2026 | MenuCtrl_PushML2_P( BT_INIT , MENU_ITEM, NOFUNC , BT_INIT_de , BT_INIT_en ); |
2028 | MenuCtrl_PushML2_P( BT_INIT , MENU_ITEM, NOFUNC , BT_INIT_de , BT_INIT_en ); |
2027 | MenuCtrl_PushML2_P( BT_PCCONFIG , MENU_ITEM, &Port_FC2CFG_BT , BT_PCCONFIG_de , BT_PCCONFIG_en ); |
2029 | MenuCtrl_PushML2_P( BT_PCCONFIG , MENU_ITEM, &Port_FC2CFG_BT , BT_PCCONFIG_de , BT_PCCONFIG_en ); |
2028 | MenuCtrl_PushML2_P( BT_SHOWCONFIG, MENU_ITEM, &BTM222_Info , BT_SHOWCONFIG_de, BT_SHOWCONFIG_en); |
2030 | MenuCtrl_PushML2_P( BT_SHOWCONFIG, MENU_ITEM, &BTM222_Info , BT_SHOWCONFIG_de, BT_SHOWCONFIG_en); |
2029 | MenuCtrl_PushSeparator(); // MENUE TRENNLINIE |
2031 | MenuCtrl_PushSeparator(); // MENUE TRENNLINIE |
2030 | MenuCtrl_PushML2_P( BT_MAC , MENU_ITEM, NOFUNC , BT_MAC_de , BT_MAC_en ); |
2032 | MenuCtrl_PushML2_P( BT_MAC , MENU_ITEM, NOFUNC , BT_MAC_de , BT_MAC_en ); |
2031 | } |
2033 | } |
2032 | } |
2034 | } |
2033 | 2035 | ||
2034 | #endif // end: #ifdef USE_BLUETOOTH |
2036 | #endif // end: #ifdef USE_BLUETOOTH |
2035 | 2037 | ||
2036 | 2038 | ||
2037 | 2039 | ||
2038 | //-------------------------------------------------------------- |
2040 | //-------------------------------------------------------------- |
2039 | // Setup_BTM222() |
2041 | // Setup_BTM222() |
2040 | //-------------------------------------------------------------- |
2042 | //-------------------------------------------------------------- |
2041 | #ifdef USE_BLUETOOTH |
2043 | #ifdef USE_BLUETOOTH |
2042 | 2044 | ||
2043 | void Setup_BTM222( void ) |
2045 | void Setup_BTM222( void ) |
2044 | { |
2046 | { |
2045 | uint8_t itemid; |
2047 | uint8_t itemid; |
2046 | uint8_t UseBT; |
2048 | uint8_t UseBT; |
2047 | uint8_t i; |
2049 | uint8_t i; |
2048 | char string[11]; |
2050 | char string[11]; |
2049 | 2051 | ||
2050 | Setup_BTM222_MenuCreate(); |
2052 | Setup_BTM222_MenuCreate(); |
2051 | 2053 | ||
2052 | //--------------- |
2054 | //--------------- |
2053 | // Control |
2055 | // Control |
2054 | //--------------- |
2056 | //--------------- |
2055 | while( true ) |
2057 | while( true ) |
2056 | { |
2058 | { |
2057 | MenuCtrl_Control( MENUCTRL_EVENT ); |
2059 | MenuCtrl_Control( MENUCTRL_EVENT ); |
2058 | 2060 | ||
2059 | if( MenuCtrl_GetKey() == KEY_ESC ) break; // ENDE |
2061 | if( MenuCtrl_GetKey() == KEY_ESC ) break; // ENDE |
2060 | 2062 | ||
2061 | itemid = MenuCtrl_GetItemId(); // welcher Menu-Punkt (ID) |
2063 | itemid = MenuCtrl_GetItemId(); // welcher Menu-Punkt (ID) |
2062 | edit = 0; |
2064 | edit = 0; |
2063 | 2065 | ||
2064 | //-------------------- |
2066 | //-------------------- |
2065 | // BT_INSTALLED |
2067 | // BT_INSTALLED |
2066 | //-------------------- |
2068 | //-------------------- |
2067 | if( itemid == BT_INSTALLED ) |
2069 | if( itemid == BT_INSTALLED ) |
2068 | { |
2070 | { |
2069 | UseBT = Config.UseBT; |
2071 | UseBT = Config.UseBT; |
2070 | Config.UseBT = Edit_generic( Config.UseBT ,0,1, YesNo,1 ,NULL,NULL); |
2072 | Config.UseBT = Edit_generic( Config.UseBT ,0,1, YesNo,1 ,NULL,NULL); |
2071 | 2073 | ||
2072 | if( UseBT != Config.UseBT ) // hat Benutzer Einstellung geaendert? |
2074 | if( UseBT != Config.UseBT ) // hat Benutzer Einstellung geaendert? |
2073 | { |
2075 | { |
2074 | if( Config.UseBT ) // BTM222 wurde aktiviert - initialisieren |
2076 | if( Config.UseBT ) // BTM222 wurde aktiviert - initialisieren |
2075 | { |
2077 | { |
2076 | BTM222_Initalize(); |
2078 | BTM222_Initalize(); |
2077 | 2079 | ||
2078 | //if( bt_init() ) |
2080 | //if( bt_init() ) |
2079 | // Config.BTIsSet = true; |
2081 | // Config.BTIsSet = true; |
2080 | //else |
2082 | //else |
2081 | // Config.BTIsSet = false; |
2083 | // Config.BTIsSet = false; |
2082 | } |
2084 | } |
2083 | 2085 | ||
2084 | MenuCtrl_Destroy(); // Menue aendern wegen wechsel Wi232 vorhanden / nicht vorhanden |
2086 | MenuCtrl_Destroy(); // Menue aendern wegen wechsel Wi232 vorhanden / nicht vorhanden |
2085 | Setup_BTM222_MenuCreate(); |
2087 | Setup_BTM222_MenuCreate(); |
2086 | continue; |
2088 | continue; |
2087 | } |
2089 | } |
2088 | } |
2090 | } |
2089 | 2091 | ||
2090 | 2092 | ||
2091 | //-------------------- |
2093 | //-------------------- |
2092 | // BT_NAME |
2094 | // BT_NAME |
2093 | //-------------------- |
2095 | //-------------------- |
2094 | if( itemid == BT_NAME ) |
2096 | if( itemid == BT_NAME ) |
2095 | { |
2097 | { |
2096 | bt_fixname(); |
2098 | bt_fixname(); |
2097 | strncpyfill( string, Config.bt_name, bt_name_length+1 ); // bt_name_length=10 + 1 Terminierende 0 |
2099 | strncpyfill( string, Config.bt_name, bt_name_length+1 ); // bt_name_length=10 + 1 Terminierende 0 |
2098 | Edit_String( string, bt_name_length, EDIT_BT_NAME ); |
2100 | Edit_String( string, bt_name_length, EDIT_BT_NAME ); |
2099 | 2101 | ||
2100 | if( edit == 1 ) |
2102 | if( edit == 1 ) |
2101 | { |
2103 | { |
2102 | strrtrim( EditString); // Leerzeichen rechts entfernen |
2104 | strrtrim( EditString); // Leerzeichen rechts entfernen |
2103 | //lcd_print_at( 0, 5, EditString, 0); // DEBUG |
2105 | //lcd_print_at( 0, 5, EditString, 0); // DEBUG |
2104 | //lcdx_printf_at( 17, 5, MNORMAL, 0,0, "%3d", strlen(EditString) ); |
2106 | //lcdx_printf_at( 17, 5, MNORMAL, 0,0, "%3d", strlen(EditString) ); |
2105 | //_delay_ms(8000); |
2107 | //_delay_ms(8000); |
2106 | 2108 | ||
2107 | strncpy( Config.bt_name, EditString, bt_name_length+1 ); |
2109 | strncpy( Config.bt_name, EditString, bt_name_length+1 ); |
2108 | } |
2110 | } |
2109 | } |
2111 | } |
2110 | 2112 | ||
2111 | 2113 | ||
2112 | //-------------------- |
2114 | //-------------------- |
2113 | // BT_PIN |
2115 | // BT_PIN |
2114 | //-------------------- |
2116 | //-------------------- |
2115 | if( itemid == BT_PIN ) |
2117 | if( itemid == BT_PIN ) |
2116 | { |
2118 | { |
2117 | for( i = 0; i < bt_pin_length; i++) |
2119 | for( i = 0; i < bt_pin_length; i++) |
2118 | { |
2120 | { |
2119 | string[i] = Config.bt_pin[i]; |
2121 | string[i] = Config.bt_pin[i]; |
2120 | } |
2122 | } |
2121 | string[bt_pin_length] = 0; |
2123 | string[bt_pin_length] = 0; |
2122 | Edit_String( string, bt_pin_length, EDIT_BT_PIN ); |
2124 | Edit_String( string, bt_pin_length, EDIT_BT_PIN ); |
2123 | 2125 | ||
2124 | if (edit == 1) |
2126 | if (edit == 1) |
2125 | { |
2127 | { |
2126 | for( i = 0; i < bt_pin_length; i++) |
2128 | for( i = 0; i < bt_pin_length; i++) |
2127 | { |
2129 | { |
2128 | Config.bt_pin[i] = EditString[i]; |
2130 | Config.bt_pin[i] = EditString[i]; |
2129 | } |
2131 | } |
2130 | } |
2132 | } |
2131 | } |
2133 | } |
2132 | 2134 | ||
2133 | 2135 | ||
2134 | //-------------------- |
2136 | //-------------------- |
2135 | // BT_INIT |
2137 | // BT_INIT |
2136 | //-------------------- |
2138 | //-------------------- |
2137 | if( itemid == BT_INIT ) |
2139 | if( itemid == BT_INIT ) |
2138 | { |
2140 | { |
2139 | //lcd_cls (); |
2141 | //lcd_cls (); |
2140 | //Old_Baudrate = Config.PKT_Baudrate; |
2142 | //Old_Baudrate = Config.PKT_Baudrate; |
2141 | 2143 | ||
2142 | BTM222_Initalize(); |
2144 | BTM222_Initalize(); |
2143 | 2145 | ||
2144 | /* |
2146 | /* |
2145 | if( bt_init() == true ) |
2147 | if( bt_init() == true ) |
2146 | { |
2148 | { |
2147 | lcd_printp_at( 0, 3, PSTR("BT Init ok"), MNORMAL); |
2149 | lcd_printp_at( 0, 3, PSTR("BT Init ok"), MNORMAL); |
2148 | WriteBTInitFlag(); |
2150 | WriteBTInitFlag(); |
2149 | } |
2151 | } |
2150 | else |
2152 | else |
2151 | { |
2153 | { |
2152 | lcd_printp_at( 0, 3, PSTR("BT Init Error"), MNORMAL); |
2154 | lcd_printp_at( 0, 3, PSTR("BT Init Error"), MNORMAL); |
2153 | Config.BTIsSet = false; |
2155 | Config.BTIsSet = false; |
2154 | set_beep( 1000, 0x0040, BeepNormal); |
2156 | set_beep( 1000, 0x0040, BeepNormal); |
2155 | } |
2157 | } |
2156 | _delay_ms(2500); // 2.5 Sekunden anzeigen fuer Benutzer |
2158 | _delay_ms(2500); // 2.5 Sekunden anzeigen fuer Benutzer |
2157 | */ |
2159 | */ |
2158 | } |
2160 | } |
2159 | 2161 | ||
2160 | 2162 | ||
2161 | //-------------------- |
2163 | //-------------------- |
2162 | // BT_MAC |
2164 | // BT_MAC |
2163 | //-------------------- |
2165 | //-------------------- |
2164 | if( itemid == BT_MAC ) |
2166 | if( itemid == BT_MAC ) |
2165 | { |
2167 | { |
2166 | //Show_MAC( progmem, headline, mac) |
2168 | //Show_MAC( progmem, headline, mac) |
2167 | Show_MAC( true, PSTR("BTM-222 MAC"), Config.bt_Mac); |
2169 | Show_MAC( true, PSTR("BTM-222 MAC"), Config.bt_Mac); |
2168 | } |
2170 | } |
2169 | 2171 | ||
2170 | 2172 | ||
2171 | //-------------------- |
2173 | //-------------------- |
2172 | // BT_REID |
2174 | // BT_REID |
2173 | //-------------------- |
2175 | //-------------------- |
2174 | if( itemid == BT_REID ) |
2176 | if( itemid == BT_REID ) |
2175 | { |
2177 | { |
2176 | for( i = 0; i < RE_ID_length; i++) |
2178 | for( i = 0; i < RE_ID_length; i++) |
2177 | { |
2179 | { |
2178 | string[i] = Config.RE_ID[i]; |
2180 | string[i] = Config.RE_ID[i]; |
2179 | } |
2181 | } |
2180 | string[RE_ID_length] = 0; |
2182 | string[RE_ID_length] = 0; |
2181 | Edit_String( string, RE_ID_length, EDIT_BT_PIN ); |
2183 | Edit_String( string, RE_ID_length, EDIT_BT_PIN ); |
2182 | 2184 | ||
2183 | if( edit == 1 ) |
2185 | if( edit == 1 ) |
2184 | { |
2186 | { |
2185 | for( i = 0; i < RE_ID_length; i++) |
2187 | for( i = 0; i < RE_ID_length; i++) |
2186 | { |
2188 | { |
2187 | Config.RE_ID[i] = EditString[i]; |
2189 | Config.RE_ID[i] = EditString[i]; |
2188 | } |
2190 | } |
2189 | } |
2191 | } |
2190 | } |
2192 | } |
2191 | 2193 | ||
2192 | } // end: while( true ) |
2194 | } // end: while( true ) |
2193 | 2195 | ||
2194 | //--------------- |
2196 | //--------------- |
2195 | // Destroy |
2197 | // Destroy |
2196 | //--------------- |
2198 | //--------------- |
2197 | MenuCtrl_Destroy(); |
2199 | MenuCtrl_Destroy(); |
2198 | 2200 | ||
2199 | } // end: Setup_BTM222() |
2201 | } // end: Setup_BTM222() |
2200 | 2202 | ||
2201 | #endif // end: #ifdef USE_BLUETOOTH |
2203 | #endif // end: #ifdef USE_BLUETOOTH |
2202 | 2204 | ||
2203 | 2205 | ||
2204 | 2206 | ||
2205 | 2207 | ||
2206 | //-------------------------------------------------------------- |
2208 | //-------------------------------------------------------------- |
2207 | // Setup_BLE() |
2209 | // Setup_BLE() |
2208 | //-------------------------------------------------------------- |
2210 | //-------------------------------------------------------------- |
2209 | void Setup_BLE( void ) |
2211 | void Setup_BLE( void ) |
2210 | { |
2212 | { |
2211 | uint8_t itemid; |
2213 | uint8_t itemid; |
2212 | 2214 | ||
2213 | //--------------- |
2215 | //--------------- |
2214 | // Create |
2216 | // Create |
2215 | //--------------- |
2217 | //--------------- |
2216 | MenuCtrl_Create(); |
2218 | MenuCtrl_Create(); |
2217 | MenuCtrl_SetTitleFromParentItem(); // "Bluetooth BLE" |
2219 | MenuCtrl_SetTitleFromParentItem(); // "Bluetooth BLE" |
2218 | 2220 | ||
2219 | //--------------- |
2221 | //--------------- |
2220 | // Menuitems |
2222 | // Menuitems |
2221 | //--------------- |
2223 | //--------------- |
2222 | MenuCtrl_Push_P( BLE_INSTALLED, MENU_ITEM, NOFUNC, strGet(MODULE_EXIST) ); |
2224 | MenuCtrl_Push_P( BLE_INSTALLED, MENU_ITEM, NOFUNC, strGet(MODULE_EXIST) ); |
2223 | 2225 | ||
2224 | 2226 | ||
2225 | //--------------- |
2227 | //--------------- |
2226 | // Control |
2228 | // Control |
2227 | //--------------- |
2229 | //--------------- |
2228 | while( true ) |
2230 | while( true ) |
2229 | { |
2231 | { |
2230 | MenuCtrl_Control( MENUCTRL_EVENT ); |
2232 | MenuCtrl_Control( MENUCTRL_EVENT ); |
2231 | 2233 | ||
2232 | if( MenuCtrl_GetKey() == KEY_ESC ) break; // ENDE |
2234 | if( MenuCtrl_GetKey() == KEY_ESC ) break; // ENDE |
2233 | 2235 | ||
2234 | itemid = MenuCtrl_GetItemId(); // welcher Menu-Punkt (ID) |
2236 | itemid = MenuCtrl_GetItemId(); // welcher Menu-Punkt (ID) |
2235 | 2237 | ||
2236 | //-------------------- |
2238 | //-------------------- |
2237 | // BT_INSTALLED |
2239 | // BT_INSTALLED |
2238 | //-------------------- |
2240 | //-------------------- |
2239 | if( itemid == BT_INSTALLED ) |
2241 | if( itemid == BT_INSTALLED ) |
2240 | { |
2242 | { |
2241 | Config.UseBLE = Edit_generic( Config.UseBLE, 0, 1, YesNo, 1 ,strGet(STR_EXTSV2MODULE),NULL); |
2243 | Config.UseBLE = Edit_generic( Config.UseBLE, 0, 1, YesNo, 1 ,strGet(STR_EXTSV2MODULE),NULL); |
2242 | } |
2244 | } |
2243 | } // end: while( true ) |
2245 | } // end: while( true ) |
2244 | 2246 | ||
2245 | //--------------- |
2247 | //--------------- |
2246 | // Destroy |
2248 | // Destroy |
2247 | //--------------- |
2249 | //--------------- |
2248 | MenuCtrl_Destroy(); |
2250 | MenuCtrl_Destroy(); |
2249 | 2251 | ||
2250 | } // end: Setup_BTM222() |
2252 | } // end: Setup_BTM222() |
2251 | 2253 | ||
2252 | 2254 | ||
2253 | 2255 | ||
2254 | //-------------------------------------------------------------- |
2256 | //-------------------------------------------------------------- |
2255 | // Setup_MKConnection() |
2257 | // Setup_MKConnection() |
2256 | //-------------------------------------------------------------- |
2258 | //-------------------------------------------------------------- |
2257 | void Setup_MKConnection( void ) |
2259 | void Setup_MKConnection( void ) |
2258 | { |
2260 | { |
2259 | uint8_t itemid; |
2261 | uint8_t itemid; |
2260 | uint8_t old; |
2262 | uint8_t old; |
2261 | 2263 | ||
2262 | //--------------- |
2264 | //--------------- |
2263 | // Create |
2265 | // Create |
2264 | //--------------- |
2266 | //--------------- |
2265 | MenuCtrl_Create(); |
2267 | MenuCtrl_Create(); |
2266 | MenuCtrl_SetTitleFromParentItem(); // "Bluetooth BLE" |
2268 | MenuCtrl_SetTitleFromParentItem(); // "Bluetooth BLE" |
2267 | 2269 | ||
2268 | //--------------- |
2270 | //--------------- |
2269 | // Menuitems |
2271 | // Menuitems |
2270 | //--------------- |
2272 | //--------------- |
2271 | MenuCtrl_PushML2_P( MKCONN_CONNECTION , MENU_ITEM, NOFUNC , MKCONN_CONNECTION_de , MKCONN_CONNECTION_en ); |
2273 | MenuCtrl_PushML2_P( MKCONN_CONNECTION , MENU_ITEM, NOFUNC , MKCONN_CONNECTION_de , MKCONN_CONNECTION_en ); |
2272 | MenuCtrl_PushSeparator(); // MENUE TRENNLINIE |
2274 | MenuCtrl_PushSeparator(); // MENUE TRENNLINIE |
2273 | MenuCtrl_PushML2_P( MKCONN_BAUDRATE , MENU_ITEM, NOFUNC , MKCONN_BAUDRATE_de , MKCONN_BAUDRATE_en ); |
2275 | MenuCtrl_PushML2_P( MKCONN_BAUDRATE , MENU_ITEM, NOFUNC , MKCONN_BAUDRATE_de , MKCONN_BAUDRATE_en ); |
2274 | 2276 | ||
2275 | 2277 | ||
2276 | //--------------- |
2278 | //--------------- |
2277 | // Control |
2279 | // Control |
2278 | //--------------- |
2280 | //--------------- |
2279 | while( true ) |
2281 | while( true ) |
2280 | { |
2282 | { |
2281 | MenuCtrl_Control( MENUCTRL_EVENT ); |
2283 | MenuCtrl_Control( MENUCTRL_EVENT ); |
2282 | 2284 | ||
2283 | if( MenuCtrl_GetKey() == KEY_ESC ) break; // ENDE |
2285 | if( MenuCtrl_GetKey() == KEY_ESC ) break; // ENDE |
2284 | 2286 | ||
2285 | itemid = MenuCtrl_GetItemId(); // welcher Menu-Punkt (ID) |
2287 | itemid = MenuCtrl_GetItemId(); // welcher Menu-Punkt (ID) |
2286 | 2288 | ||
2287 | 2289 | ||
2288 | //-------------------- |
2290 | //-------------------- |
2289 | // MKCONN_CONNECTION |
2291 | // MKCONN_CONNECTION |
2290 | //-------------------- |
2292 | //-------------------- |
2291 | if( itemid == MKCONN_CONNECTION ) |
2293 | if( itemid == MKCONN_CONNECTION ) |
2292 | { |
2294 | { |
2293 | old = Config.U02SV2; |
2295 | old = Config.U02SV2; |
2294 | Config.U02SV2 = Edit_generic( Config.U02SV2, 0, 1, MK_Connection,1, NULL,NULL); |
2296 | Config.U02SV2 = Edit_generic( Config.U02SV2, 0, 1, MK_Connection,1, NULL,NULL); |
2295 | 2297 | ||
2296 | if( Config.U02SV2 != old ) // Verbindung geaendert? |
2298 | if( Config.U02SV2 != old ) // Verbindung geaendert? |
2297 | { |
2299 | { |
2298 | if( Config.U02SV2 == 1 ) Change_Output( Uart02FC ); // 1 = Kabel |
2300 | if( Config.U02SV2 == 1 ) Change_Output( Uart02FC ); // 1 = Kabel |
2299 | else Change_Output( Uart02Wi ); // 0 = Wi.232 |
2301 | else Change_Output( Uart02Wi ); // 0 = Wi.232 |
2300 | } |
2302 | } |
2301 | 2303 | ||
2302 | if( (Config.U02SV2 == 0) && (Config.UseWi == false) ) // FEHLER: Wi.232 nicht aktiviert (Config.U02SV2 = 0 -> entspricht Wi.232) |
2304 | if( (Config.U02SV2 == 0) && (Config.UseWi == false) ) // FEHLER: Wi.232 nicht aktiviert (Config.U02SV2 = 0 -> entspricht Wi.232) |
2303 | { |
2305 | { |
2304 | //PKT_Message_P( text , error, timeout, beep, clear) |
2306 | //PKT_Message_P( text , error, timeout, beep, clear) |
2305 | PKT_Message_P( strGet(STR_WI232_ACTIVATE), true , 3000 , true, true); |
2307 | PKT_Message_P( strGet(STR_WI232_ACTIVATE), true , 3000 , true, true); |
2306 | } |
2308 | } |
2307 | } |
2309 | } |
2308 | 2310 | ||
2309 | 2311 | ||
2310 | //-------------------- |
2312 | //-------------------- |
2311 | // MKCONN_BAUDRATE |
2313 | // MKCONN_BAUDRATE |
2312 | //-------------------- |
2314 | //-------------------- |
2313 | if( itemid == MKCONN_BAUDRATE ) |
2315 | if( itemid == MKCONN_BAUDRATE ) |
2314 | { |
2316 | { |
2315 | old = Config.PKT_Baudrate; |
2317 | old = Config.PKT_Baudrate; |
2316 | Config.PKT_Baudrate = Edit_generic( Config.PKT_Baudrate ,1,6,Baudrate,1 ,PSTR("Standard: ! 57600 !"),NULL); |
2318 | Config.PKT_Baudrate = Edit_generic( Config.PKT_Baudrate ,1,6,Baudrate,1 ,PSTR("Standard: ! 57600 !"),NULL); |
2317 | 2319 | ||
2318 | if( Config.PKT_Baudrate != old ) |
2320 | if( Config.PKT_Baudrate != old ) |
2319 | { |
2321 | { |
2320 | // Wi.232 umkonfigurieren |
2322 | // Wi.232 umkonfigurieren |
2321 | if( Config.UseWi ) |
2323 | if( Config.UseWi ) |
2322 | { |
2324 | { |
2323 | Wi232_Initalize(); |
2325 | Wi232_Initalize(); |
2324 | } |
2326 | } |
2325 | 2327 | ||
2326 | // BTM222 umkonfigurieren |
2328 | // BTM222 umkonfigurieren |
2327 | #ifdef USE_BLUETOOTH |
2329 | #ifdef USE_BLUETOOTH |
2328 | if( Config.UseBT ) |
2330 | if( Config.UseBT ) |
2329 | { |
2331 | { |
2330 | //set_BTOn(); |
2332 | //set_BTOn(); |
2331 | BTM222_Initalize(); |
2333 | BTM222_Initalize(); |
2332 | //set_BTOff(); |
2334 | //set_BTOff(); |
2333 | } |
2335 | } |
2334 | #endif // end: #ifdef USE_BLUETOOTH |
2336 | #endif // end: #ifdef USE_BLUETOOTH |
2335 | } |
2337 | } |
2336 | } |
2338 | } |
2337 | 2339 | ||
2338 | } // end: while( true ) |
2340 | } // end: while( true ) |
2339 | 2341 | ||
2340 | //--------------- |
2342 | //--------------- |
2341 | // Destroy |
2343 | // Destroy |
2342 | //--------------- |
2344 | //--------------- |
2343 | MenuCtrl_Destroy(); |
2345 | MenuCtrl_Destroy(); |
2344 | 2346 | ||
2345 | } // end: Setup_BTM222() |
2347 | } // end: Setup_BTM222() |
2346 | 2348 | ||
2347 | 2349 | ||
2348 | 2350 | ||
2349 | 2351 | ||
2350 | //-------------------------------------------------------------- |
2352 | //-------------------------------------------------------------- |
2351 | // Setup_WI232_MenuCreate() |
2353 | // Setup_WI232_MenuCreate() |
2352 | // |
2354 | // |
2353 | // das Menue aendert sich je nachdem ob Wi.232 ein- oder |
2355 | // das Menue aendert sich je nachdem ob Wi.232 ein- oder |
2354 | // ausgeschaltet ist |
2356 | // ausgeschaltet ist |
2355 | //-------------------------------------------------------------- |
2357 | //-------------------------------------------------------------- |
2356 | void Setup_WI232_MenuCreate( void ) |
2358 | void Setup_WI232_MenuCreate( void ) |
2357 | { |
2359 | { |
2358 | //--------------- |
2360 | //--------------- |
2359 | // Create |
2361 | // Create |
2360 | //--------------- |
2362 | //--------------- |
2361 | MenuCtrl_Create(); |
2363 | MenuCtrl_Create(); |
2362 | MenuCtrl_SetTitleFromParentItem(); // "Wi.232" |
2364 | MenuCtrl_SetTitleFromParentItem(); // "Wi.232" |
2363 | 2365 | ||
2364 | //--------------- |
2366 | //--------------- |
2365 | // Menuitems |
2367 | // Menuitems |
2366 | //--------------- |
2368 | //--------------- |
2367 | MenuCtrl_Push_P( WI_INSTALLED , MENU_ITEM, NOFUNC , strGet(CONNECT13) ); |
2369 | MenuCtrl_Push_P( WI_INSTALLED , MENU_ITEM, NOFUNC , strGet(CONNECT13) ); |
2368 | 2370 | ||
2369 | if( Config.UseWi ) |
2371 | if( Config.UseWi ) |
2370 | { |
2372 | { |
2371 | MenuCtrl_PushSeparator(); // MENUE TRENNLINIE |
2373 | MenuCtrl_PushSeparator(); // MENUE TRENNLINIE |
2372 | MenuCtrl_PushML2_P( WI_TXRX , MENU_ITEM, NOFUNC , WI_TXRX_de , WI_TXRX_en ); |
2374 | MenuCtrl_PushML2_P( WI_TXRX , MENU_ITEM, NOFUNC , WI_TXRX_de , WI_TXRX_en ); |
2373 | MenuCtrl_PushML2_P( WI_GROUP , MENU_ITEM, NOFUNC , WI_GROUP_de , WI_GROUP_en ); |
2375 | MenuCtrl_PushML2_P( WI_GROUP , MENU_ITEM, NOFUNC , WI_GROUP_de , WI_GROUP_en ); |
2374 | 2376 | ||
2375 | // 06.06.2014 OG |
2377 | // 06.06.2014 OG |
2376 | //MenuCtrl_PushML2_P( WI_MODE , MENU_ITEM, NOFUNC , WI_MODE_de , WI_MODE_en ); |
2378 | //MenuCtrl_PushML2_P( WI_MODE , MENU_ITEM, NOFUNC , WI_MODE_de , WI_MODE_en ); |
2377 | //MenuCtrl_PushML2_P( WI_TIMEOUT , MENU_ITEM, NOFUNC , WI_TIMEOUT_de , WI_TIMEOUT_en ); |
2379 | //MenuCtrl_PushML2_P( WI_TIMEOUT , MENU_ITEM, NOFUNC , WI_TIMEOUT_de , WI_TIMEOUT_en ); |
2378 | //MenuCtrl_PushML2_P( WI_MTU , MENU_ITEM, NOFUNC , WI_MTU_de , WI_MTU_en ); |
2380 | //MenuCtrl_PushML2_P( WI_MTU , MENU_ITEM, NOFUNC , WI_MTU_de , WI_MTU_en ); |
2379 | 2381 | ||
2380 | MenuCtrl_PushSeparator(); // MENUE TRENNLINIE |
2382 | MenuCtrl_PushSeparator(); // MENUE TRENNLINIE |
2381 | MenuCtrl_PushML2_P( WI_INIT , MENU_ITEM, NOFUNC , WI_INIT_de , WI_INIT_en ); |
2383 | MenuCtrl_PushML2_P( WI_INIT , MENU_ITEM, NOFUNC , WI_INIT_de , WI_INIT_en ); |
2382 | 2384 | ||
2383 | //MenuCtrl_PushML2_P( WI_PCCONFIG , MENU_ITEM, &Port_USB2CFG_Wi , WI_PCCONFIG_de , WI_PCCONFIG_en ); |
2385 | //MenuCtrl_PushML2_P( WI_PCCONFIG , MENU_ITEM, &Port_USB2CFG_Wi , WI_PCCONFIG_de , WI_PCCONFIG_en ); |
2384 | MenuCtrl_PushML2_P( WI_PCCONFIG , MENU_ITEM, &Wi232_ConfigPC , WI_PCCONFIG_de , WI_PCCONFIG_en ); |
2386 | MenuCtrl_PushML2_P( WI_PCCONFIG , MENU_ITEM, &Wi232_ConfigPC , WI_PCCONFIG_de , WI_PCCONFIG_en ); |
2385 | 2387 | ||
2386 | 2388 | ||
2387 | } |
2389 | } |
2388 | } |
2390 | } |
2389 | 2391 | ||
2390 | 2392 | ||
2391 | 2393 | ||
2392 | //-------------------------------------------------------------- |
2394 | //-------------------------------------------------------------- |
2393 | // Setup_WI232() |
2395 | // Setup_WI232() |
2394 | //-------------------------------------------------------------- |
2396 | //-------------------------------------------------------------- |
2395 | void Setup_WI232( void ) |
2397 | void Setup_WI232( void ) |
2396 | { |
2398 | { |
2397 | uint8_t itemid; |
2399 | uint8_t itemid; |
2398 | uint8_t UseWi; |
2400 | uint8_t UseWi; |
2399 | 2401 | ||
2400 | Setup_WI232_MenuCreate(); |
2402 | Setup_WI232_MenuCreate(); |
2401 | 2403 | ||
2402 | //--------------- |
2404 | //--------------- |
2403 | // Control |
2405 | // Control |
2404 | //--------------- |
2406 | //--------------- |
2405 | while( true ) |
2407 | while( true ) |
2406 | { |
2408 | { |
2407 | MenuCtrl_Control( MENUCTRL_EVENT ); |
2409 | MenuCtrl_Control( MENUCTRL_EVENT ); |
2408 | 2410 | ||
2409 | if( MenuCtrl_GetKey() == KEY_ESC ) break; // ENDE |
2411 | if( MenuCtrl_GetKey() == KEY_ESC ) break; // ENDE |
2410 | 2412 | ||
2411 | itemid = MenuCtrl_GetItemId(); // welcher Menu-Punkt (ID) |
2413 | itemid = MenuCtrl_GetItemId(); // welcher Menu-Punkt (ID) |
2412 | edit = 0; |
2414 | edit = 0; |
2413 | 2415 | ||
2414 | if( itemid == WI_TXRX ) { Config.WiTXRXChannel = Edit_generic( Config.WiTXRXChannel , 0, 5, Show_uint3,1 ,NULL,NULL); } |
2416 | if( itemid == WI_TXRX ) { Config.WiTXRXChannel = Edit_generic( Config.WiTXRXChannel , 0, 5, Show_uint3,1 ,NULL,NULL); } |
2415 | if( itemid == WI_GROUP ) { Config.WiNetworkGroup = Edit_generic( Config.WiNetworkGroup , 0, 127, Show_uint3,1 ,NULL,NULL); } |
2417 | if( itemid == WI_GROUP ) { Config.WiNetworkGroup = Edit_generic( Config.WiNetworkGroup , 0, 127, Show_uint3,1 ,NULL,NULL); } |
2416 | //if( itemid == WI_MODE ) { Config.WiNetworkMode = Edit_generic( Config.WiNetworkMode , 0, 1, Wi_Netmode,1 ,NULL,NULL); } |
2418 | //if( itemid == WI_MODE ) { Config.WiNetworkMode = Edit_generic( Config.WiNetworkMode , 0, 1, Wi_Netmode,1 ,NULL,NULL); } |
2417 | //if( itemid == WI_TIMEOUT ) { Config.WiTXTO = Edit_generic( Config.WiTXTO , 0, 127, Show_uint3,1 ,NULL,NULL); } |
2419 | //if( itemid == WI_TIMEOUT ) { Config.WiTXTO = Edit_generic( Config.WiTXTO , 0, 127, Show_uint3,1 ,NULL,NULL); } |
2418 | //if( itemid == WI_MTU ) { Config.WiUartMTU = Edit_generic( Config.WiUartMTU , 0, 127, Show_uint3,1 ,NULL,NULL); } |
2420 | //if( itemid == WI_MTU ) { Config.WiUartMTU = Edit_generic( Config.WiUartMTU , 0, 127, Show_uint3,1 ,NULL,NULL); } |
2419 | if( itemid == WI_INIT ) { Wi232_Initalize(); } |
2421 | if( itemid == WI_INIT ) { Wi232_Initalize(); } |
2420 | 2422 | ||
2421 | //-------------------- |
2423 | //-------------------- |
2422 | // WI_INSTALLED |
2424 | // WI_INSTALLED |
2423 | //-------------------- |
2425 | //-------------------- |
2424 | if( itemid == WI_INSTALLED ) |
2426 | if( itemid == WI_INSTALLED ) |
2425 | { |
2427 | { |
2426 | UseWi = Config.UseWi; |
2428 | UseWi = Config.UseWi; |
2427 | Config.UseWi = Edit_generic( Config.UseWi, 0,1, YesNo,1, NULL,NULL); |
2429 | Config.UseWi = Edit_generic( Config.UseWi, 0,1, YesNo,1, NULL,NULL); |
2428 | if( UseWi != Config.UseWi ) // hat Benutzer Einstellung geaendert? |
2430 | if( UseWi != Config.UseWi ) // hat Benutzer Einstellung geaendert? |
2429 | { |
2431 | { |
2430 | if( Config.UseWi ) |
2432 | if( Config.UseWi ) |
2431 | Wi232_Initalize(); // Wi232 wurde aktiviert: init |
2433 | Wi232_Initalize(); // Wi232 wurde aktiviert: init |
2432 | 2434 | ||
2433 | MenuCtrl_Destroy(); // Menue aendern wegen wechsel Wi232 vorhanden / nicht vorhanden |
2435 | MenuCtrl_Destroy(); // Menue aendern wegen wechsel Wi232 vorhanden / nicht vorhanden |
2434 | Setup_WI232_MenuCreate(); |
2436 | Setup_WI232_MenuCreate(); |
2435 | continue; |
2437 | continue; |
2436 | } |
2438 | } |
2437 | } |
2439 | } |
2438 | } |
2440 | } |
2439 | 2441 | ||
2440 | //--------------- |
2442 | //--------------- |
2441 | // Destroy |
2443 | // Destroy |
2442 | //--------------- |
2444 | //--------------- |
2443 | MenuCtrl_Destroy(); |
2445 | MenuCtrl_Destroy(); |
2444 | } |
2446 | } |
2445 | 2447 | ||
2446 | 2448 | ||
2447 | 2449 | ||
2448 | //-------------------------------------------------------------- |
2450 | //-------------------------------------------------------------- |
2449 | // Setup_PKTGeneric() |
2451 | // Setup_PKTGeneric() |
2450 | // |
2452 | // |
2451 | // entspricht "PKT allgemein" |
2453 | // entspricht "PKT allgemein" |
2452 | //-------------------------------------------------------------- |
2454 | //-------------------------------------------------------------- |
2453 | void Setup_PKTGeneric( void ) |
2455 | void Setup_PKTGeneric( void ) |
2454 | { |
2456 | { |
2455 | uint8_t itemid; |
2457 | uint8_t itemid; |
2456 | uint8_t old; |
2458 | uint8_t old; |
2457 | 2459 | ||
2458 | //--------------- |
2460 | //--------------- |
2459 | // Create |
2461 | // Create |
2460 | //--------------- |
2462 | //--------------- |
2461 | MenuCtrl_Create(); |
2463 | MenuCtrl_Create(); |
2462 | 2464 | ||
2463 | //--------------- |
2465 | //--------------- |
2464 | // Einstellungen |
2466 | // Einstellungen |
2465 | //--------------- |
2467 | //--------------- |
2466 | MenuCtrl_SetTitleFromParentItem(); // "PKT allgemein" |
2468 | MenuCtrl_SetTitleFromParentItem(); // "PKT allgemein" |
2467 | //MenuCtrl_SetCycle( false ); |
2469 | //MenuCtrl_SetCycle( false ); |
2468 | //MenuCtrl_SetShowBatt( false ); |
2470 | //MenuCtrl_SetShowBatt( false ); |
2469 | //MenuCtrl_SetBeep( true ); |
2471 | //MenuCtrl_SetBeep( true ); |
2470 | 2472 | ||
2471 | //--------------- |
2473 | //--------------- |
2472 | // Menuitems |
2474 | // Menuitems |
2473 | //--------------- |
2475 | //--------------- |
2474 | MenuCtrl_PushML2_P( PKT_LANGUAGE , MENU_ITEM, NOFUNC , LANGUAGE_de , LANGUAGE_en ); |
2476 | MenuCtrl_PushML2_P( PKT_LANGUAGE , MENU_ITEM, NOFUNC , LANGUAGE_de , LANGUAGE_en ); |
2475 | MenuCtrl_PushML2_P( TIME_ZONE , MENU_ITEM, NOFUNC , TIME_ZONE_de , TIME_ZONE_en ); |
2477 | MenuCtrl_PushML2_P( TIME_ZONE , MENU_ITEM, NOFUNC , TIME_ZONE_de , TIME_ZONE_en ); |
2476 | MenuCtrl_PushML2_P( TIME_SUMMER , MENU_ITEM, NOFUNC , TIME_SUMMER_de , TIME_SUMMER_en ); |
2478 | MenuCtrl_PushML2_P( TIME_SUMMER , MENU_ITEM, NOFUNC , TIME_SUMMER_de , TIME_SUMMER_en ); |
2477 | 2479 | ||
2478 | MenuCtrl_PushSeparator(); // MENUE TRENNLINIE |
2480 | MenuCtrl_PushSeparator(); // MENUE TRENNLINIE |
2479 | 2481 | ||
2480 | MenuCtrl_PushML2_P( PKT_PKTOFF , MENU_ITEM, NOFUNC , PKT_PKTOFF_de , PKT_PKTOFF_en ); |
2482 | MenuCtrl_PushML2_P( PKT_PKTOFF , MENU_ITEM, NOFUNC , PKT_PKTOFF_de , PKT_PKTOFF_en ); |
2481 | MenuCtrl_PushML2_P( PKT_LIGHTOFF , MENU_ITEM, NOFUNC , LIGHTOFF_de , LIGHTOFF_en ); |
2483 | MenuCtrl_PushML2_P( PKT_LIGHTOFF , MENU_ITEM, NOFUNC , LIGHTOFF_de , LIGHTOFF_en ); |
2482 | 2484 | ||
2483 | MenuCtrl_PushSeparator(); // MENUE TRENNLINIE |
2485 | MenuCtrl_PushSeparator(); // MENUE TRENNLINIE |
2484 | 2486 | ||
2485 | // 18.04.2014 OG: rausgenommen da es aktuell auch nicht mehr mit PKT 3.9m Hardware geht |
2487 | // 18.04.2014 OG: rausgenommen da es aktuell auch nicht mehr mit PKT 3.9m Hardware geht |
2486 | //if( PCB_Version == PKT39m ) // Helligkeit nur bei PKT39m - bei der PKT39x geht das nicht mehr |
2488 | //if( PCB_Version == PKT39m ) // Helligkeit nur bei PKT39m - bei der PKT39x geht das nicht mehr |
2487 | // MenuCtrl_PushML2_P( PKT_BRIGHTNESS , MENU_ITEM, NOFUNC , BRIGHTNESS_de , BRIGHTNESS_en ); |
2489 | // MenuCtrl_PushML2_P( PKT_BRIGHTNESS , MENU_ITEM, NOFUNC , BRIGHTNESS_de , BRIGHTNESS_en ); |
2488 | 2490 | ||
2489 | MenuCtrl_PushML2_P( PKT_CONTRAST , MENU_ITEM, NOFUNC , CONTRAST_de , CONTRAST_en ); |
2491 | MenuCtrl_PushML2_P( PKT_CONTRAST , MENU_ITEM, NOFUNC , CONTRAST_de , CONTRAST_en ); |
2490 | MenuCtrl_PushML2_P( PKT_BEEPER , MENU_ITEM, NOFUNC , BEEPER_de , BEEPER_en ); |
2492 | MenuCtrl_PushML2_P( PKT_BEEPER , MENU_ITEM, NOFUNC , BEEPER_de , BEEPER_en ); |
2491 | 2493 | ||
2492 | #ifdef USE_SOUND |
2494 | #ifdef USE_SOUND |
2493 | MenuCtrl_PushML2_P( PKT_SOUNDMODUL , MENU_ITEM, NOFUNC , SOUNDMODUL_de , SOUNDMODUL_en ); |
2495 | MenuCtrl_PushML2_P( PKT_SOUNDMODUL , MENU_ITEM, NOFUNC , SOUNDMODUL_de , SOUNDMODUL_en ); |
2494 | MenuCtrl_PushML2_P( PKT_VOLUME , MENU_ITEM, NOFUNC , VOLUME_de , VOLUME_en ); |
2496 | MenuCtrl_PushML2_P( PKT_VOLUME , MENU_ITEM, NOFUNC , VOLUME_de , VOLUME_en ); |
2495 | #endif |
2497 | #endif |
2496 | 2498 | ||
2497 | MenuCtrl_PushML2_P( PKT_ACCUTYPE , MENU_ITEM, NOFUNC , ACCUTYPE_de , ACCUTYPE_en ); |
2499 | MenuCtrl_PushML2_P( PKT_ACCUTYPE , MENU_ITEM, NOFUNC , ACCUTYPE_de , ACCUTYPE_en ); |
2498 | MenuCtrl_PushML2_P( PKT_ACCUMEASURE , MENU_ITEM, NOFUNC , ACCUMEASURE_de , ACCUMEASURE_en ); |
2500 | MenuCtrl_PushML2_P( PKT_ACCUMEASURE , MENU_ITEM, NOFUNC , ACCUMEASURE_de , ACCUMEASURE_en ); |
2499 | 2501 | ||
2500 | //--------------- |
2502 | //--------------- |
2501 | // Control |
2503 | // Control |
2502 | //--------------- |
2504 | //--------------- |
2503 | while( true ) |
2505 | while( true ) |
2504 | { |
2506 | { |
2505 | MenuCtrl_Control( MENUCTRL_EVENT ); |
2507 | MenuCtrl_Control( MENUCTRL_EVENT ); |
2506 | 2508 | ||
2507 | if( MenuCtrl_GetKey() == KEY_ESC ) break; |
2509 | if( MenuCtrl_GetKey() == KEY_ESC ) break; |
2508 | 2510 | ||
2509 | itemid = MenuCtrl_GetItemId(); // welcher Menu-Punkt (ID) |
2511 | itemid = MenuCtrl_GetItemId(); // welcher Menu-Punkt (ID) |
2510 | 2512 | ||
2511 | if( itemid == PKT_LANGUAGE ) |
2513 | if( itemid == PKT_LANGUAGE ) |
2512 | { |
2514 | { |
2513 | old = Config.DisplayLanguage; |
2515 | old = Config.DisplayLanguage; |
2514 | Config.DisplayLanguage = Edit_generic( Config.DisplayLanguage , 0, 1, Language,1, NULL,NULL); |
2516 | Config.DisplayLanguage = Edit_generic( Config.DisplayLanguage , 0, 1, Language,1, NULL,NULL); |
2515 | 2517 | ||
2516 | if( old != Config.DisplayLanguage ) |
2518 | if( old != Config.DisplayLanguage ) |
2517 | { |
2519 | { |
2518 | PKT_Ask_Restart( strGetLanguage(LANGUAGE_de,LANGUAGE_en) ); |
2520 | PKT_Ask_Restart( strGetLanguage(LANGUAGE_de,LANGUAGE_en) ); |
2519 | } |
2521 | } |
2520 | } |
2522 | } |
2521 | 2523 | ||
2522 | if( itemid == TIME_ZONE ) Config.timezone = Edit_generic( Config.timezone ,-12, 12, Show_uint3,1, PSTR("+1 = Berlin "),PSTR("-5 = New York")); |
2524 | if( itemid == TIME_ZONE ) Config.timezone = Edit_generic( Config.timezone ,-12, 12, Show_uint3,1, PSTR("+1 = Berlin "),PSTR("-5 = New York")); |
2523 | if( itemid == TIME_SUMMER ) Config.summertime = Edit_generic( Config.summertime , 0, 1, YesNo,1, NULL,NULL); |
2525 | if( itemid == TIME_SUMMER ) Config.summertime = Edit_generic( Config.summertime , 0, 1, YesNo,1, NULL,NULL); |
2524 | if( itemid == PKT_LIGHTOFF ) Config.DisplayTimeout = Edit_generic( Config.DisplayTimeout , 0,254, Show_uint3,1, strGet(STR_HELP_PKTOFFTIME1),NULL); |
2526 | if( itemid == PKT_LIGHTOFF ) Config.DisplayTimeout = Edit_generic( Config.DisplayTimeout , 0,254, Show_uint3,1, strGet(STR_HELP_PKTOFFTIME1),NULL); |
2525 | if( itemid == PKT_PKTOFF ) Config.PKTOffTimeout = Edit_generic( Config.PKTOffTimeout , 0,254, Show_uint3,1, strGet(STR_HELP_PKTOFFTIME1),NULL); |
2527 | if( itemid == PKT_PKTOFF ) Config.PKTOffTimeout = Edit_generic( Config.PKTOffTimeout , 0,254, Show_uint3,1, strGet(STR_HELP_PKTOFFTIME1),NULL); |
2526 | if( itemid == PKT_BEEPER ) Config.HWBeeper = Edit_generic( Config.HWBeeper , 0, 1, YesNo,1, NULL,NULL); |
2528 | if( itemid == PKT_BEEPER ) Config.HWBeeper = Edit_generic( Config.HWBeeper , 0, 1, YesNo,1, NULL,NULL); |
2527 | if( itemid == PKT_SOUNDMODUL ) Config.HWSound = Edit_generic( Config.HWSound , 0, 1, YesNo,1, NULL,NULL); |
2529 | if( itemid == PKT_SOUNDMODUL ) Config.HWSound = Edit_generic( Config.HWSound , 0, 1, YesNo,1, NULL,NULL); |
2528 | if( itemid == PKT_VOLUME ) Config.Volume = Edit_generic( Config.Volume , 0, 50, Show_uint3,1, NULL,NULL); |
2530 | if( itemid == PKT_VOLUME ) Config.Volume = Edit_generic( Config.Volume , 0, 50, Show_uint3,1, NULL,NULL); |
2529 | if( itemid == PKT_CONTRAST ) { Config.LCD_Kontrast = Edit_generic( Config.LCD_Kontrast , 10, 40, Kontrast,1, NULL,NULL); |
2531 | if( itemid == PKT_CONTRAST ) { Config.LCD_Kontrast = Edit_generic( Config.LCD_Kontrast , 10, 40, Kontrast,1, NULL,NULL); |
2530 | lcd_set_contrast( Config.LCD_Kontrast ); |
2532 | lcd_set_contrast( Config.LCD_Kontrast ); |
2531 | } |
2533 | } |
2532 | 2534 | ||
2533 | //if( itemid == PKT_BRIGHTNESS ) Config.LCD_Helligkeit = Edit_DisplayHelligkeit(Config.LCD_Helligkeit,0,100); |
2535 | //if( itemid == PKT_BRIGHTNESS ) Config.LCD_Helligkeit = Edit_DisplayHelligkeit(Config.LCD_Helligkeit,0,100); |
2534 | if( itemid == PKT_ACCUTYPE ) Config.PKT_Accutyp = Edit_generic( Config.PKT_Accutyp , 0, 1, PKT_Akku,1, NULL,NULL); |
2536 | if( itemid == PKT_ACCUTYPE ) Config.PKT_Accutyp = Edit_generic( Config.PKT_Accutyp , 0, 1, PKT_Akku,1, NULL,NULL); |
2535 | if( itemid == PKT_ACCUMEASURE ) Edit_LipoOffset(); |
2537 | if( itemid == PKT_ACCUMEASURE ) Edit_LipoOffset(); |
2536 | } |
2538 | } |
2537 | 2539 | ||
2538 | //--------------- |
2540 | //--------------- |
2539 | // Destroy |
2541 | // Destroy |
2540 | //--------------- |
2542 | //--------------- |
2541 | MenuCtrl_Destroy(); |
2543 | MenuCtrl_Destroy(); |
2542 | } |
2544 | } |
2543 | 2545 | ||
2544 | 2546 | ||
2545 | 2547 | ||
2546 | //-------------------------------------------------------------- |
2548 | //-------------------------------------------------------------- |
2547 | // Setup_Main() |
2549 | // Setup_Main() |
2548 | // |
2550 | // |
2549 | // Das Hauptmenue fuer das gesamte Setup |
2551 | // Das Hauptmenue fuer das gesamte Setup |
2550 | //-------------------------------------------------------------- |
2552 | //-------------------------------------------------------------- |
2551 | void Setup_MAIN( void ) |
2553 | void Setup_MAIN( void ) |
2552 | { |
2554 | { |
2553 | uint8_t itemid; |
2555 | uint8_t itemid; |
2554 | 2556 | ||
2555 | //--------------- |
2557 | //--------------- |
2556 | // Create |
2558 | // Create |
2557 | //--------------- |
2559 | //--------------- |
2558 | MenuCtrl_Create(); |
2560 | MenuCtrl_Create(); |
2559 | 2561 | ||
2560 | //--------------- |
2562 | //--------------- |
2561 | // Einstellungen |
2563 | // Einstellungen |
2562 | //--------------- |
2564 | //--------------- |
2563 | MenuCtrl_SetTitleFromParentItem(); // "PKT Setup" |
2565 | MenuCtrl_SetTitleFromParentItem(); // "PKT Setup" |
2564 | //MenuCtrl_SetTitle_P( PSTR("PKT Setup") ); |
2566 | //MenuCtrl_SetTitle_P( PSTR("PKT Setup") ); |
2565 | //MenuCtrl_SetCycle( false ); |
2567 | //MenuCtrl_SetCycle( false ); |
2566 | //MenuCtrl_SetShowBatt( false ); |
2568 | //MenuCtrl_SetShowBatt( false ); |
2567 | //MenuCtrl_SetBeep( true ); |
2569 | //MenuCtrl_SetBeep( true ); |
2568 | 2570 | ||
2569 | //--------------- |
2571 | //--------------- |
2570 | // Menuitems |
2572 | // Menuitems |
2571 | //--------------- |
2573 | //--------------- |
2572 | MenuCtrl_PushML2_P( SETUP_PKTCONFIG , MENU_SUB , &Setup_PKTGeneric , SETUP_PKTCONFIG_de , SETUP_PKTCONFIG_en ); |
2574 | MenuCtrl_PushML2_P( SETUP_PKTCONFIG , MENU_SUB , &Setup_PKTGeneric , SETUP_PKTCONFIG_de , SETUP_PKTCONFIG_en ); |
2573 | MenuCtrl_PushML2_P( SETUP_OSDVIEW , MENU_SUB , &Setup_OSD , SETUP_OSDVIEW_de , SETUP_OSDVIEW_en ); |
2575 | MenuCtrl_PushML2_P( SETUP_OSDVIEW , MENU_SUB , &Setup_OSD , SETUP_OSDVIEW_de , SETUP_OSDVIEW_en ); |
2574 | MenuCtrl_PushML2_P( SETUP_OSDSCREENS , MENU_SUB , &Setup_OSDScreens , SETUP_OSDSCREENS_de , SETUP_OSDSCREENS_en ); |
2576 | MenuCtrl_PushML2_P( SETUP_OSDSCREENS , MENU_SUB , &Setup_OSDScreens , SETUP_OSDSCREENS_de , SETUP_OSDSCREENS_en ); |
2575 | 2577 | ||
2576 | MenuCtrl_PushSeparator(); // MENUE TRENNLINIE |
2578 | MenuCtrl_PushSeparator(); // MENUE TRENNLINIE |
2577 | 2579 | ||
2578 | MenuCtrl_PushML2_P( SETUP_MKCONNECTION , MENU_SUB , &Setup_MKConnection , SETUP_MKCONNECTION_de , SETUP_MKCONNECTION_en ); |
2580 | MenuCtrl_PushML2_P( SETUP_MKCONNECTION , MENU_SUB , &Setup_MKConnection , SETUP_MKCONNECTION_de , SETUP_MKCONNECTION_en ); |
2579 | 2581 | ||
2580 | MenuCtrl_PushML2_P( SETUP_WI232 , MENU_SUB , &Setup_WI232 , SETUP_WI232_de , SETUP_WI232_en ); |
2582 | MenuCtrl_PushML2_P( SETUP_WI232 , MENU_SUB , &Setup_WI232 , SETUP_WI232_de , SETUP_WI232_en ); |
2581 | 2583 | ||
2582 | #ifdef USE_BLUETOOTH |
2584 | #ifdef USE_BLUETOOTH |
2583 | MenuCtrl_PushML2_P( SETUP_BTM222 , MENU_SUB , &Setup_BTM222 , SETUP_BTM222_de , SETUP_BTM222_en ); |
2585 | MenuCtrl_PushML2_P( SETUP_BTM222 , MENU_SUB , &Setup_BTM222 , SETUP_BTM222_de , SETUP_BTM222_en ); |
2584 | #endif |
2586 | #endif |
2585 | 2587 | ||
2586 | #if (defined(USE_SV2MODULE_BLE) || defined(USE_WLAN)) |
2588 | #if (defined(USE_SV2MODULE_BLE) || defined(USE_WLAN)) |
2587 | if( PCB_SV2RxTxPatch ) // nur sichtbar mit SV2 Patch! |
2589 | if( PCB_SV2RxTxPatch ) // nur sichtbar mit SV2 Patch! |
2588 | MenuCtrl_PushSeparator(); // MENUE TRENNLINIE |
2590 | MenuCtrl_PushSeparator(); // MENUE TRENNLINIE |
2589 | #endif |
2591 | #endif |
2590 | 2592 | ||
2591 | #ifdef USE_SV2MODULE_BLE |
2593 | #ifdef USE_SV2MODULE_BLE |
2592 | if( PCB_SV2RxTxPatch ) // nur sichtbar mit SV2 Patch! |
2594 | if( PCB_SV2RxTxPatch ) // nur sichtbar mit SV2 Patch! |
2593 | MenuCtrl_PushML2_P( SETUP_BLE , MENU_SUB , &Setup_BLE , SETUP_BLE_de , SETUP_BLE_en ); |
2595 | MenuCtrl_PushML2_P( SETUP_BLE , MENU_SUB , &Setup_BLE , SETUP_BLE_de , SETUP_BLE_en ); |
2594 | #endif |
2596 | #endif |
2595 | 2597 | ||
2596 | #ifdef USE_WLAN |
2598 | #ifdef USE_WLAN |
2597 | if( PCB_SV2RxTxPatch ) // nur sichtbar mit SV2 Patch! |
2599 | if( PCB_SV2RxTxPatch ) // nur sichtbar mit SV2 Patch! |
2598 | MenuCtrl_PushML2_P( SETUP_WIFLY , MENU_SUB , &Setup_WiFly , SETUP_WIFLY_de , SETUP_WIFLY_en ); |
2600 | MenuCtrl_PushML2_P( SETUP_WIFLY , MENU_SUB , &Setup_WiFly , SETUP_WIFLY_de , SETUP_WIFLY_en ); |
2599 | #endif |
2601 | #endif |
2600 | 2602 | ||
2601 | MenuCtrl_PushSeparator(); // MENUE TRENNLINIE |
2603 | MenuCtrl_PushSeparator(); // MENUE TRENNLINIE |
2602 | 2604 | ||
2603 | #ifdef USE_BLUETOOTH |
2605 | #ifdef USE_BLUETOOTH |
2604 | MenuCtrl_PushML2_P( SETUP_GPSMAUS , MENU_SUB , &Setup_GPSMouse , SETUP_GPSMAUS_de , SETUP_GPSMAUS_en ); |
2606 | MenuCtrl_PushML2_P( SETUP_GPSMAUS , MENU_SUB , &Setup_GPSMouse , SETUP_GPSMAUS_de , SETUP_GPSMAUS_en ); |
2605 | #endif |
2607 | #endif |
2606 | 2608 | ||
2607 | #ifdef USE_FOLLOWME |
2609 | #ifdef USE_FOLLOWME |
2608 | MenuCtrl_PushML2_P( SETUP_FOLLOWME , MENU_SUB , &Setup_FollowMe , SETUP_FOLLOWME_de , SETUP_FOLLOWME_en ); |
2610 | MenuCtrl_PushML2_P( SETUP_FOLLOWME , MENU_SUB , &Setup_FollowMe , SETUP_FOLLOWME_de , SETUP_FOLLOWME_en ); |
2609 | #endif |
2611 | #endif |
2610 | 2612 | ||
2611 | #ifdef USE_TRACKING |
2613 | #ifdef USE_TRACKING |
2612 | MenuCtrl_PushML2_P( SETUP_SERVOCONFIG , MENU_SUB , &Setup_ServoTracking, SETUP_SERVOCONFIG_de , SETUP_SERVOCONFIG_en ); // tracking/servo_setup.c |
2614 | MenuCtrl_PushML2_P( SETUP_SERVOCONFIG , MENU_SUB , &Setup_ServoTracking, SETUP_SERVOCONFIG_de , SETUP_SERVOCONFIG_en ); // tracking/servo_setup.c |
2613 | #endif |
2615 | #endif |
2614 | 2616 | ||
2615 | #ifdef USE_JOYSTICK |
2617 | #ifdef USE_JOYSTICK |
2616 | MenuCtrl_PushML2_P( SETUP_JOYSTICK , MENU_SUB , &Setup_Joysticks , SETUP_JOYSTICK_de , SETUP_JOYSTICK_en ); |
2618 | MenuCtrl_PushML2_P( SETUP_JOYSTICK , MENU_SUB , &Setup_Joysticks , SETUP_JOYSTICK_de , SETUP_JOYSTICK_en ); |
2617 | #endif |
2619 | #endif |
2618 | 2620 | ||
2619 | MenuCtrl_PushSeparator(); // MENUE TRENNLINIE |
2621 | MenuCtrl_PushSeparator(); // MENUE TRENNLINIE |
2620 | 2622 | ||
2621 | MenuCtrl_PushML2_P( SETUP_PKTUPDATE , MENU_ITEM, &PKT_Update , SETUP_PKTUPDATE_de , SETUP_PKTUPDATE_en ); |
2623 | MenuCtrl_PushML2_P( SETUP_PKTUPDATE , MENU_ITEM, &PKT_Update , SETUP_PKTUPDATE_de , SETUP_PKTUPDATE_en ); |
2622 | //MenuCtrl_PushML2_P( SETUP_PKTDEBUG , MENU_ITEM, NOFUNC , SETUP_PKTDEBUG_de , SETUP_PKTDEBUG_en ); |
2624 | //MenuCtrl_PushML2_P( SETUP_PKTDEBUG , MENU_ITEM, NOFUNC , SETUP_PKTDEBUG_de , SETUP_PKTDEBUG_en ); |
2623 | MenuCtrl_PushML2_P( SETUP_EEPROMRESET , MENU_ITEM, &PKT_Reset_EEprom , SETUP_EEPROMRESET_de , SETUP_EEPROMRESET_en ); |
2625 | MenuCtrl_PushML2_P( SETUP_EEPROMRESET , MENU_ITEM, &PKT_Reset_EEprom , SETUP_EEPROMRESET_de , SETUP_EEPROMRESET_en ); |
2624 | 2626 | ||
2625 | //--------------- |
2627 | //--------------- |
2626 | // Control |
2628 | // Control |
2627 | //--------------- |
2629 | //--------------- |
2628 | while( true ) |
2630 | while( true ) |
2629 | { |
2631 | { |
2630 | MenuCtrl_Control( MENUCTRL_EVENT ); |
2632 | MenuCtrl_Control( MENUCTRL_EVENT ); |
2631 | if( MenuCtrl_GetKey() == KEY_ESC ) break; |
2633 | if( MenuCtrl_GetKey() == KEY_ESC ) break; |
2632 | 2634 | ||
2633 | itemid = MenuCtrl_GetItemId(); // welcher Menu-Punkt (ID) |
2635 | itemid = MenuCtrl_GetItemId(); // welcher Menu-Punkt (ID) |
2634 | 2636 | ||
2635 | //-------------------- |
2637 | //-------------------- |
2636 | // SETUP_PKTDEBUG |
2638 | // SETUP_PKTDEBUG |
2637 | //-------------------- |
2639 | //-------------------- |
2638 | if( itemid == SETUP_PKTDEBUG ) |
2640 | if( itemid == SETUP_PKTDEBUG ) |
2639 | { |
2641 | { |
2640 | Config.Debug = Edit_generic( Config.Debug, 0,1,Show_uint3,1 ,NULL,NULL); |
2642 | Config.Debug = Edit_generic( Config.Debug, 0,1,Show_uint3,1 ,NULL,NULL); |
2641 | } |
2643 | } |
2642 | 2644 | ||
2643 | } |
2645 | } |
2644 | 2646 | ||
2645 | //--------------- |
2647 | //--------------- |
2646 | // Destroy |
2648 | // Destroy |
2647 | //--------------- |
2649 | //--------------- |
2648 | MenuCtrl_Destroy(); |
2650 | MenuCtrl_Destroy(); |
2649 | } |
2651 | } |
2650 | 2652 |