38
|
1 ///////////////////////////////////////////////////////////////////////////////
|
|
2 /// -*- coding: UTF-8 -*-
|
|
3 ///
|
|
4 /// \file Discovery/Src/tMenuXtra.c
|
|
5 /// \brief Menu Xtra - Specials in Divemode like Reset Stopwatch
|
|
6 /// \author heinrichs weikamp gmbh
|
|
7 /// \date 02-Mar-2015
|
|
8 ///
|
|
9 /// \details
|
|
10 ///
|
|
11 /// $Id$
|
|
12 ///////////////////////////////////////////////////////////////////////////////
|
|
13 /// \par Copyright (c) 2014-2018 Heinrichs Weikamp gmbh
|
|
14 ///
|
|
15 /// This program is free software: you can redistribute it and/or modify
|
|
16 /// it under the terms of the GNU General Public License as published by
|
|
17 /// the Free Software Foundation, either version 3 of the License, or
|
|
18 /// (at your option) any later version.
|
|
19 ///
|
|
20 /// This program is distributed in the hope that it will be useful,
|
|
21 /// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
22 /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
23 /// GNU General Public License for more details.
|
|
24 ///
|
|
25 /// You should have received a copy of the GNU General Public License
|
|
26 /// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
27 //////////////////////////////////////////////////////////////////////////////
|
|
28
|
|
29 /* Includes ------------------------------------------------------------------*/
|
|
30 #include <stdio.h>
|
|
31 #include <string.h>
|
|
32 #include "tMenu.h"
|
|
33 #include "tStructure.h"
|
|
34 #include "tMenuXtra.h"
|
|
35 #include "text_multilanguage.h"
|
|
36 #include "data_central.h"
|
|
37 #include "simulation.h"
|
|
38
|
|
39 /* Exported functions --------------------------------------------------------*/
|
|
40
|
|
41 uint32_t tMXtra_refresh(uint8_t line, char *text, uint16_t *tab, char *subtext)
|
|
42 {
|
|
43 uint8_t textPointer;
|
|
44
|
|
45 textPointer = 0;
|
|
46 *tab = 500;
|
|
47 *subtext = 0;
|
|
48
|
|
49 if((line == 0) || (line == 1))
|
|
50 {
|
|
51 text[textPointer++] = TXT_2BYTE;
|
|
52 text[textPointer++] = TXT2BYTE_ResetStopwatch;
|
|
53 }
|
|
54 strcpy(&text[textPointer],"\n\r");
|
|
55 textPointer += 2;
|
|
56 /*
|
|
57 if((line == 0) || (line == 2))
|
|
58 {
|
|
59 text[textPointer++] = TXT_2BYTE;
|
|
60 text[textPointer++] = TXT2BYTE_ResetAvgDepth;
|
|
61 }
|
|
62 strcpy(&text[textPointer],"\n\r");
|
|
63 textPointer += 2;
|
|
64 */
|
|
65 if((line == 0) || (line == 2))
|
|
66 {
|
|
67 text[textPointer++] = TXT_2BYTE;
|
|
68 text[textPointer++] = TXT2BYTE_CompassHeading;
|
|
69 }
|
|
70 strcpy(&text[textPointer],"\n\r");
|
|
71 textPointer += 2;
|
|
72
|
|
73 if((line == 0) || (line == 3))
|
|
74 {
|
|
75 text[textPointer++] = TXT_2BYTE;
|
|
76 text[textPointer++] = TXT2BYTE_SetMarker;
|
|
77 }
|
|
78 strcpy(&text[textPointer],"\n\r");
|
|
79 textPointer += 2;
|
|
80
|
|
81 if(is_stateUsedSetToSim())
|
|
82 {
|
|
83 if((line == 0) || (line == 4))
|
|
84 {
|
|
85 text[textPointer++] = TXT_2BYTE;
|
|
86 text[textPointer++] = TXT2BYTE_SimFollowDecoStops;
|
|
87 text[textPointer++] = ' ';
|
|
88 text[textPointer++] = ' ';
|
|
89 if(simulation_get_heed_decostops())
|
|
90 text[textPointer++] = '\005';
|
|
91 else
|
|
92 text[textPointer++] = '\006';
|
|
93 }
|
|
94 strcpy(&text[textPointer],"\n\r");
|
|
95 textPointer += 2;
|
|
96 }
|
|
97
|
|
98 return StMXTRA;
|
|
99 }
|
|
100
|