annotate Discovery/Src/tMenuCustom.c @ 661:87bee7cc77b3

Undo Rev. 660
author heinrichs weikamp
date Mon, 01 Nov 2021 12:39:34 +0100
parents b9d4baa4f6fa
children 4a6bffaa38b3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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"
521
e221cf762f45 Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents: 506
diff changeset
33 #include "tHome.h"
506
998529b3e142 Added new top level menu for customization of views
Ideenmodellierer
parents:
diff changeset
34 #include "tStructure.h"
998529b3e142 Added new top level menu for customization of views
Ideenmodellierer
parents:
diff changeset
35 #include "tMenuCustom.h"
998529b3e142 Added new top level menu for customization of views
Ideenmodellierer
parents:
diff changeset
36 #include "text_multilanguage.h"
998529b3e142 Added new top level menu for customization of views
Ideenmodellierer
parents:
diff changeset
37 #include "data_central.h"
521
e221cf762f45 Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents: 506
diff changeset
38 #include "motion.h"
552
531e7818b737 Added menu structure to acces viewport calibration:
Ideenmodellierer
parents: 521
diff changeset
39 #include "gfx_fonts.h"
531e7818b737 Added menu structure to acces viewport calibration:
Ideenmodellierer
parents: 521
diff changeset
40 #include "tInfo.h"
531e7818b737 Added menu structure to acces viewport calibration:
Ideenmodellierer
parents: 521
diff changeset
41 #include "motion.h"
506
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
998529b3e142 Added new top level menu for customization of views
Ideenmodellierer
parents:
diff changeset
44 /* Exported functions --------------------------------------------------------*/
998529b3e142 Added new top level menu for customization of views
Ideenmodellierer
parents:
diff changeset
45
998529b3e142 Added new top level menu for customization of views
Ideenmodellierer
parents:
diff changeset
46 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
47 {
998529b3e142 Added new top level menu for customization of views
Ideenmodellierer
parents:
diff changeset
48 uint8_t textPointer;
998529b3e142 Added new top level menu for customization of views
Ideenmodellierer
parents:
diff changeset
49
998529b3e142 Added new top level menu for customization of views
Ideenmodellierer
parents:
diff changeset
50 textPointer = 0;
998529b3e142 Added new top level menu for customization of views
Ideenmodellierer
parents:
diff changeset
51 *tab = 550;
998529b3e142 Added new top level menu for customization of views
Ideenmodellierer
parents:
diff changeset
52 *subtext = 0;
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 if((line == 0) || (line == 1))
998529b3e142 Added new top level menu for customization of views
Ideenmodellierer
parents:
diff changeset
55 {
998529b3e142 Added new top level menu for customization of views
Ideenmodellierer
parents:
diff changeset
56 text[textPointer++] = TXT_2BYTE;
998529b3e142 Added new top level menu for customization of views
Ideenmodellierer
parents:
diff changeset
57 text[textPointer++] = TXT2BYTE_Customviews;
998529b3e142 Added new top level menu for customization of views
Ideenmodellierer
parents:
diff changeset
58 }
998529b3e142 Added new top level menu for customization of views
Ideenmodellierer
parents:
diff changeset
59 text[textPointer++] = '\n';
998529b3e142 Added new top level menu for customization of views
Ideenmodellierer
parents:
diff changeset
60 text[textPointer++] = '\r';
998529b3e142 Added new top level menu for customization of views
Ideenmodellierer
parents:
diff changeset
61 text[textPointer] = 0;
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 if((line == 0) || (line == 2))
998529b3e142 Added new top level menu for customization of views
Ideenmodellierer
parents:
diff changeset
64 {
521
e221cf762f45 Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents: 506
diff changeset
65 text[textPointer++] = TXT_2BYTE;
e221cf762f45 Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents: 506
diff changeset
66 text[textPointer++] = TXT2BYTE_ExtraDisplay;
e221cf762f45 Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents: 506
diff changeset
67 text[textPointer++] = ' ';
e221cf762f45 Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents: 506
diff changeset
68 text[textPointer++] = ' ';
e221cf762f45 Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents: 506
diff changeset
69 text[textPointer++] = TXT_2BYTE;
e221cf762f45 Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents: 506
diff changeset
70
e221cf762f45 Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents: 506
diff changeset
71 switch(settingsGetPointer()->extraDisplay)
e221cf762f45 Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents: 506
diff changeset
72 {
e221cf762f45 Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents: 506
diff changeset
73 /* BigFont */
e221cf762f45 Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents: 506
diff changeset
74 case EXTRADISPLAY_BIGFONT:
e221cf762f45 Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents: 506
diff changeset
75 text[textPointer++] = TXT2BYTE_ExtraBigFont;
e221cf762f45 Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents: 506
diff changeset
76 break;
e221cf762f45 Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents: 506
diff changeset
77 /* DecoGame */
e221cf762f45 Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents: 506
diff changeset
78 case EXTRADISPLAY_DECOGAME:
e221cf762f45 Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents: 506
diff changeset
79 text[textPointer++] = TXT2BYTE_ExtraDecoGame;
e221cf762f45 Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents: 506
diff changeset
80 break;
e221cf762f45 Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents: 506
diff changeset
81 /* none */
e221cf762f45 Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents: 506
diff changeset
82 case EXTRADISPLAY_none:
e221cf762f45 Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents: 506
diff changeset
83 text[textPointer++] = TXT2BYTE_ExtraNone;
e221cf762f45 Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents: 506
diff changeset
84 break;
e221cf762f45 Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents: 506
diff changeset
85
e221cf762f45 Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents: 506
diff changeset
86 default:
630
b9d4baa4f6fa Warnings:
Ideenmodellierer
parents: 604
diff changeset
87 snprintf(&text[textPointer++],4,"%u",settingsGetPointer()->extraDisplay);
521
e221cf762f45 Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents: 506
diff changeset
88 break;
e221cf762f45 Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents: 506
diff changeset
89 }
506
998529b3e142 Added new top level menu for customization of views
Ideenmodellierer
parents:
diff changeset
90 }
998529b3e142 Added new top level menu for customization of views
Ideenmodellierer
parents:
diff changeset
91 strcpy(&text[textPointer],"\n\r");
998529b3e142 Added new top level menu for customization of views
Ideenmodellierer
parents:
diff changeset
92 textPointer += 2;
998529b3e142 Added new top level menu for customization of views
Ideenmodellierer
parents:
diff changeset
93
998529b3e142 Added new top level menu for customization of views
Ideenmodellierer
parents:
diff changeset
94 if((line == 0) || (line == 3))
998529b3e142 Added new top level menu for customization of views
Ideenmodellierer
parents:
diff changeset
95 {
998529b3e142 Added new top level menu for customization of views
Ideenmodellierer
parents:
diff changeset
96 text[textPointer++] = TXT_2BYTE;
521
e221cf762f45 Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents: 506
diff changeset
97 text[textPointer++] = TXT2BYTE_SelectCustomviews;
e221cf762f45 Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents: 506
diff changeset
98 }
e221cf762f45 Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents: 506
diff changeset
99 strcpy(&text[textPointer],"\n\r");
e221cf762f45 Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents: 506
diff changeset
100 textPointer += 2;
e221cf762f45 Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents: 506
diff changeset
101
e221cf762f45 Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents: 506
diff changeset
102 if((line == 0) || (line == 4))
e221cf762f45 Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents: 506
diff changeset
103 {
e221cf762f45 Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents: 506
diff changeset
104 text[textPointer++] = TXT_2BYTE;
506
998529b3e142 Added new top level menu for customization of views
Ideenmodellierer
parents:
diff changeset
105 text[textPointer++] = TXT2BYTE_SelectBigFont;
998529b3e142 Added new top level menu for customization of views
Ideenmodellierer
parents:
diff changeset
106 }
998529b3e142 Added new top level menu for customization of views
Ideenmodellierer
parents:
diff changeset
107 strcpy(&text[textPointer],"\n\r");
998529b3e142 Added new top level menu for customization of views
Ideenmodellierer
parents:
diff changeset
108 textPointer += 2;
998529b3e142 Added new top level menu for customization of views
Ideenmodellierer
parents:
diff changeset
109
521
e221cf762f45 Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents: 506
diff changeset
110 #ifdef ENABLE_MOTION_CONTROL
e221cf762f45 Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents: 506
diff changeset
111 if((line == 0) || (line == 5))
e221cf762f45 Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents: 506
diff changeset
112 {
e221cf762f45 Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents: 506
diff changeset
113 /* MotionCtrl */
e221cf762f45 Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents: 506
diff changeset
114 text[textPointer++] = TXT_2BYTE;
e221cf762f45 Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents: 506
diff changeset
115 text[textPointer++] = TXT2BYTE_MotionCtrl;
552
531e7818b737 Added menu structure to acces viewport calibration:
Ideenmodellierer
parents: 521
diff changeset
116 }
531e7818b737 Added menu structure to acces viewport calibration:
Ideenmodellierer
parents: 521
diff changeset
117
531e7818b737 Added menu structure to acces viewport calibration:
Ideenmodellierer
parents: 521
diff changeset
118 strcpy(&text[textPointer],"\n\r");
531e7818b737 Added menu structure to acces viewport calibration:
Ideenmodellierer
parents: 521
diff changeset
119 textPointer += 2;
521
e221cf762f45 Move Bigfont and motion Ctrl selection menu out of custom view submenu:
Ideenmodellierer
parents: 506
diff changeset
120 #endif
506
998529b3e142 Added new top level menu for customization of views
Ideenmodellierer
parents:
diff changeset
121 return StMCustom;
998529b3e142 Added new top level menu for customization of views
Ideenmodellierer
parents:
diff changeset
122 }
998529b3e142 Added new top level menu for customization of views
Ideenmodellierer
parents:
diff changeset
123