Mercurial > public > ostc4
annotate Discovery/Src/tMenuCustom.c @ 519:2c49561c8062
Reset Safety Stop display in case of a new descend:
In previous version safety stop was displayed in while the stop depth was reached. The count down was interrupted in case of a new descend but the safety stop was still displayed, blocking the NDL visualization in the big font view. To avoid this scenario a restart function has been added which will return to NDL view in case of a descend > 2m. If just a short drop happend then the countdown will be continued when the safety stop depth is reached again. If that takes more then a minute the safety stop counter is restarted.
author | Ideenmodellierer |
---|---|
date | Sun, 06 Sep 2020 22:11:51 +0200 |
parents | 998529b3e142 |
children | e221cf762f45 |
rev | line source |
---|---|
506
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
1 /////////////////////////////////////////////////////////////////////////////// |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
2 /// -*- coding: UTF-8 -*- |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
3 /// |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
4 /// \file Discovery/Src/tMenuCustom.c |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
5 /// \brief Menu Custom - Provide access to custom view options |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
6 /// \author heinrichs weikamp gmbh |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
7 /// \date 25-Aug-2020 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
8 /// |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
9 /// \details |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
10 /// |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
11 /// $Id$ |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
12 /////////////////////////////////////////////////////////////////////////////// |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
13 /// \par Copyright (c) 2014-2020 Heinrichs Weikamp gmbh |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
14 /// |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
15 /// This program is free software: you can redistribute it and/or modify |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
16 /// it under the terms of the GNU General Public License as published by |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
17 /// the Free Software Foundation, either version 3 of the License, or |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
18 /// (at your option) any later version. |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
19 /// |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
20 /// This program is distributed in the hope that it will be useful, |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
21 /// but WITHOUT ANY WARRANTY; without even the implied warranty of |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
22 /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
23 /// GNU General Public License for more details. |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
24 /// |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
25 /// You should have received a copy of the GNU General Public License |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
26 /// along with this program. If not, see <http://www.gnu.org/licenses/>. |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
27 ////////////////////////////////////////////////////////////////////////////// |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
28 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
29 /* Includes ------------------------------------------------------------------*/ |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
30 #include <stdio.h> |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
31 #include <string.h> |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
32 #include "tMenu.h" |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
33 #include "tStructure.h" |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
34 #include "tMenuCustom.h" |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
35 #include "text_multilanguage.h" |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
36 #include "data_central.h" |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
37 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
38 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
39 /* Exported functions --------------------------------------------------------*/ |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
40 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
41 uint32_t tMCustom_refresh(uint8_t line, char *text, uint16_t *tab, char *subtext) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
42 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
43 uint8_t textPointer; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
44 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
45 textPointer = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
46 *tab = 550; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
47 *subtext = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
48 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
49 if((line == 0) || (line == 1)) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
50 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
51 text[textPointer++] = TXT_2BYTE; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
52 text[textPointer++] = TXT2BYTE_Customviews; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
53 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
54 text[textPointer++] = '\n'; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
55 text[textPointer++] = '\r'; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
56 text[textPointer] = 0; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
57 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
58 if((line == 0) || (line == 2)) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
59 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
60 text[textPointer++] = TXT_2BYTE; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
61 text[textPointer++] = TXT2BYTE_SelectCustomviews; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
62 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
63 strcpy(&text[textPointer],"\n\r"); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
64 textPointer += 2; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
65 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
66 if((line == 0) || (line == 3)) |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
67 { |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
68 text[textPointer++] = TXT_2BYTE; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
69 text[textPointer++] = TXT2BYTE_SelectBigFont; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
70 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
71 strcpy(&text[textPointer],"\n\r"); |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
72 textPointer += 2; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
73 |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
74 return StMCustom; |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
75 } |
998529b3e142
Added new top level menu for customization of views
Ideenmodellierer
parents:
diff
changeset
|
76 |