Debian Codegraph @

src/Instrumentation/KLN89/kln89_page_nav.hxx

raw symbols SCIP
1 // kln89_page_*.[ch]xx - this file is one of the "pages" that
2 // are used in the KLN89 GPS unit simulation.
3 //
4 // Written by David Luff, started 2005.
5 //
6 // Copyright (C) 2005 - David C Luff - daveluff AT ntlworld.com
7 //
8 // This program is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU General Public License as
10 // published by the Free Software Foundation; either version 2 of the
11 // License, or (at your option) any later version.
12 //
13 // This program is distributed in the hope that it will be useful, but
14 // WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // General Public License for more details.
17 //
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the Free Software
20 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 //
22 // $Id$
23
24 #include "kln89.hxx"
25
26 class KLN89NavPage : public KLN89Page {
27
28 public:
29 KLN89NavPage(KLN89* parent);
30 ~KLN89NavPage();
31
32 void Update(double dt);
33
34 void CrsrPressed();
35 void EntPressed();
36 void ClrPressed();
37 void Knob1Left1();
38 void Knob1Right1();
39 void Knob2Left1();
40 void Knob2Right1();
41
42 void LooseFocus();
43
44 // Returns the id string of the selected waypoint on NAV4 if valid, else returns an empty string.
45 std::string GetNav4WpId();
46
47 private:
48 int _posFormat; // 0 => lat,lon; 1 => ref to wp.
49
50 int _vnv; // 0 => To, 1 => Fr, 2 => off.
51
52 // The data snippet to be displayed in field 1 when the moving map is active (NAV 4)
53 int _nav4DataSnippet; // 0 => DTK, 1 => groundspeed, 2 => ETE, 3 => cross-track correction.
54
55 // Format to draw in the CDI field.
56 // 0 => CDI, 1 => Cross track correction (eg " Fly R 2.15nm"), 2 => cdi scale (eg "CDI Scale:5.0nm")
57 int _cdiFormat;
58
59 // Drawing of apt, vor and sua on the moving map can be temporarily suspended
60 // Note that this should be cleared when page focus is lost, or when the menu is displayed.
61 bool _suspendAVS;
62
63 // NAV 4 menu stuff
64 bool _menuActive;
65 int _menuPos;
66
67 // NAV 4 waypoint scan drawing housekeeping.
68 bool _scanWpSet;
69 int _scanWpIndex;
70 };