comparison Discovery/Src/tMenuCustom.c @ 521:e221cf762f45

Move Bigfont and motion Ctrl selection menu out of custom view submenu: Due to lag of space the two options were placed within the custom view sub menu. After introduction of new visualization tab the option may be accessed directly
author Ideenmodellierer
date Thu, 10 Sep 2020 20:47:48 +0200
parents 998529b3e142
children 531e7818b737
comparison
equal deleted inserted replaced
520:970d8040c0e3 521:e221cf762f45
28 28
29 /* Includes ------------------------------------------------------------------*/ 29 /* Includes ------------------------------------------------------------------*/
30 #include <stdio.h> 30 #include <stdio.h>
31 #include <string.h> 31 #include <string.h>
32 #include "tMenu.h" 32 #include "tMenu.h"
33 #include "tHome.h"
33 #include "tStructure.h" 34 #include "tStructure.h"
34 #include "tMenuCustom.h" 35 #include "tMenuCustom.h"
35 #include "text_multilanguage.h" 36 #include "text_multilanguage.h"
36 #include "data_central.h" 37 #include "data_central.h"
38 #include "motion.h"
37 39
38 40
39 /* Exported functions --------------------------------------------------------*/ 41 /* Exported functions --------------------------------------------------------*/
40 42
41 uint32_t tMCustom_refresh(uint8_t line, char *text, uint16_t *tab, char *subtext) 43 uint32_t tMCustom_refresh(uint8_t line, char *text, uint16_t *tab, char *subtext)
55 text[textPointer++] = '\r'; 57 text[textPointer++] = '\r';
56 text[textPointer] = 0; 58 text[textPointer] = 0;
57 59
58 if((line == 0) || (line == 2)) 60 if((line == 0) || (line == 2))
59 { 61 {
60 text[textPointer++] = TXT_2BYTE; 62 text[textPointer++] = TXT_2BYTE;
61 text[textPointer++] = TXT2BYTE_SelectCustomviews; 63 text[textPointer++] = TXT2BYTE_ExtraDisplay;
64 text[textPointer++] = ' ';
65 text[textPointer++] = ' ';
66 text[textPointer++] = TXT_2BYTE;
67
68 switch(settingsGetPointer()->extraDisplay)
69 {
70 /* BigFont */
71 case EXTRADISPLAY_BIGFONT:
72 text[textPointer++] = TXT2BYTE_ExtraBigFont;
73 break;
74 /* DecoGame */
75 case EXTRADISPLAY_DECOGAME:
76 text[textPointer++] = TXT2BYTE_ExtraDecoGame;
77 break;
78 /* none */
79 case EXTRADISPLAY_none:
80 text[textPointer++] = TXT2BYTE_ExtraNone;
81 break;
82
83 default:
84 snprintf(&text[textPointer++],2,"%u",settingsGetPointer()->extraDisplay);
85 break;
86 }
62 } 87 }
63 strcpy(&text[textPointer],"\n\r"); 88 strcpy(&text[textPointer],"\n\r");
64 textPointer += 2; 89 textPointer += 2;
65 90
66 if((line == 0) || (line == 3)) 91 if((line == 0) || (line == 3))
67 { 92 {
68 text[textPointer++] = TXT_2BYTE; 93 text[textPointer++] = TXT_2BYTE;
94 text[textPointer++] = TXT2BYTE_SelectCustomviews;
95 }
96 strcpy(&text[textPointer],"\n\r");
97 textPointer += 2;
98
99 if((line == 0) || (line == 4))
100 {
101 text[textPointer++] = TXT_2BYTE;
69 text[textPointer++] = TXT2BYTE_SelectBigFont; 102 text[textPointer++] = TXT2BYTE_SelectBigFont;
70 } 103 }
71 strcpy(&text[textPointer],"\n\r"); 104 strcpy(&text[textPointer],"\n\r");
72 textPointer += 2; 105 textPointer += 2;
73 106
107 #ifdef ENABLE_MOTION_CONTROL
108 if((line == 0) || (line == 5))
109 {
110 /* MotionCtrl */
111 text[textPointer++] = TXT_2BYTE;
112 text[textPointer++] = TXT2BYTE_MotionCtrl;
113 text[textPointer++] = ' ';
114 text[textPointer++] = ' ';
115 text[textPointer++] = TXT_2BYTE;
116 switch(settingsGetPointer()->MotionDetection)
117 {
118 case MOTION_DETECT_OFF:
119 text[textPointer++] = TXT2BYTE_MoCtrlNone;
120 break;
121 case MOTION_DETECT_MOVE:
122 text[textPointer++] = TXT2BYTE_MoCtrlPitch;
123 break;
124 case MOTION_DETECT_SECTOR:
125 text[textPointer++] = TXT2BYTE_MoCtrlSector;
126 break;
127 case MOTION_DETECT_SCROLL:
128 text[textPointer++] = TXT2BYTE_MoCtrlScroll;
129 break;
130 default:
131 snprintf(&text[4],2,"%u",settingsGetPointer()->MotionDetection);
132 textPointer++;
133 break;
134 }
135 strcpy(&text[textPointer],"\n\r");
136 textPointer += 2;
137 }
138 #endif
139
74 return StMCustom; 140 return StMCustom;
75 } 141 }
76 142