comparison Discovery/Src/tMenuDeco.c @ 707:e81afd727993

Menu cleanup rebreather specific settings: In the previous version the selection for Fix setpoint or sensor was in the deco menu and the Fallback option in the hardware menu. As they have a dependency and are only relevant for rebreather operation, they have been moved into the extra menu which is containing rebreather related data and which is only visible in rebreather mode.
author Ideenmodellierer
date Thu, 03 Nov 2022 20:44:21 +0100
parents 1b995079c045
children 608d3e918146
comparison
equal deleted inserted replaced
706:10b7d271b9c4 707:e81afd727993
36 uint32_t tMDeco_refresh(uint8_t line, char *text, uint16_t *tab, char *subtext) 36 uint32_t tMDeco_refresh(uint8_t line, char *text, uint16_t *tab, char *subtext)
37 { 37 {
38 uint8_t textPointer; 38 uint8_t textPointer;
39 uint8_t futureTTS; 39 uint8_t futureTTS;
40 double ppO2max_deco, ppO2max_std; 40 double ppO2max_deco, ppO2max_std;
41 char divemode, CcrModusTxtId; 41 char divemode;
42 textPointer = 0; 42 textPointer = 0;
43 *tab = 370; 43 *tab = 370;
44 *subtext = 0; 44 *subtext = 0;
45 45
46 SSettings *data = settingsGetPointer(); 46 SSettings *data = settingsGetPointer();
82 ); 82 );
83 } 83 }
84 strcpy(&text[textPointer],"\n\r"); 84 strcpy(&text[textPointer],"\n\r");
85 textPointer += 2; 85 textPointer += 2;
86 86
87 if(isLoopMode(data->dive_mode)) 87 if((line == 0) || (line == 2))
88 {
89 if((line == 0) || (line == 2))
90 {
91 switch(data->CCR_Mode)
92 {
93 case CCRMODE_Sensors: CcrModusTxtId = TXT_Sensor;
94 break;
95 case CCRMODE_FixedSetpoint: CcrModusTxtId = TXT_FixedSP;
96 break;
97 case CCRMODE_Simulation: CcrModusTxtId = TXT_SimPpo2;
98 break;
99 default: CcrModusTxtId = 'X';
100 break;
101 }
102
103
104 textPointer += snprintf(&text[textPointer], 60,\
105 "%c"
106 "\t"
107 "%c"
108 , TXT_CCRmode
109 , CcrModusTxtId
110 );
111 }
112 strcpy(&text[textPointer],"\n\r");
113 textPointer += 2;
114 }
115 else
116 if(line != 0)
117 line++;
118
119 if((line == 0) || (line == 3))
120 { 88 {
121 textPointer += snprintf(&text[textPointer], 60,\ 89 textPointer += snprintf(&text[textPointer], 60,\
122 "ppO2" 90 "ppO2"
123 "\016\016" 91 "\016\016"
124 "max" 92 "max"
137 ); 105 );
138 } 106 }
139 strcpy(&text[textPointer],"\n\r"); 107 strcpy(&text[textPointer],"\n\r");
140 textPointer += 2; 108 textPointer += 2;
141 109
142 if((line == 0) || (line == 4)) 110 if((line == 0) || (line == 3))
143 { 111 {
144 textPointer += snprintf(&text[textPointer], 60,\ 112 textPointer += snprintf(&text[textPointer], 60,\
145 "%c" 113 "%c"
146 "\t" 114 "\t"
147 "%u" 115 "%u"
162 ); 130 );
163 } 131 }
164 strcpy(&text[textPointer],"\n\r"); 132 strcpy(&text[textPointer],"\n\r");
165 textPointer += 2; 133 textPointer += 2;
166 134
167 if((line == 0) || (line == 5)) 135 if((line == 0) || (line == 4))
168 { 136 {
169 textPointer += snprintf(&text[textPointer], 60,\ 137 textPointer += snprintf(&text[textPointer], 60,\
170 "%c" 138 "%c"
171 "\t" 139 "\t"
172 "%u" 140 "%u"
179 ); 147 );
180 } 148 }
181 strcpy(&text[textPointer],"\n\r"); 149 strcpy(&text[textPointer],"\n\r");
182 textPointer += 2; 150 textPointer += 2;
183 151
184 if((line == 0) || (line == 6)) 152 if((line == 0) || (line == 5))
185 { 153 {
186 textPointer += snprintf(&text[textPointer], 60,\ 154 textPointer += snprintf(&text[textPointer], 60,\
187 "%c" 155 "%c"
188 "\t" 156 "\t"
189 "%u" 157 "%u"