comparison Discovery/Src/tMenuXtra.c @ 662:1b995079c045 Betatest

PSCR Mode
author heinrichs weikamp
date Tue, 14 Dec 2021 15:36:10 +0100
parents 890440ab993a
children e81afd727993
comparison
equal deleted inserted replaced
661:87bee7cc77b3 662:1b995079c045
44 uint8_t textPointer; 44 uint8_t textPointer;
45 45
46 textPointer = 0; 46 textPointer = 0;
47 *tab = 500; 47 *tab = 500;
48 *subtext = 0; 48 *subtext = 0;
49
50 SSettings *pSettings = settingsGetPointer();
49 51
50 /* DIVE MODE */ 52 /* DIVE MODE */
51 if(actual_menu_content != MENU_SURFACE) 53 if(actual_menu_content != MENU_SURFACE)
52 { 54 {
53 if((line == 0) || (line == 1)) 55 if((line == 0) || (line == 1))
131 "\016\016" 133 "\016\016"
132 " %c" 134 " %c"
133 "\017" 135 "\017"
134 ,TXT_ScrubTime 136 ,TXT_ScrubTime
135 ,TXT_Maximum 137 ,TXT_Maximum
136 ,settingsGetPointer()->scrubTimerMax 138 ,pSettings->scrubTimerMax
137 ,TXT_Minutes 139 ,TXT_Minutes
138 ); 140 );
139 } 141 }
140 strcpy(&text[textPointer],"\n\r"); 142 strcpy(&text[textPointer],"\n\r");
141 textPointer += 2; 143 textPointer += 2;
142 if((line == 0) || (line == 2)) 144 if((line == 0) || (line == 2))
143 { 145 {
144 textPointer += snprintf(&text[textPointer], 60,\ 146 textPointer += snprintf(&text[textPointer], 60,\
145 "%c\002%03u\016\016 %c\017" 147 "%c\002%03u\016\016 %c\017"
146 ,TXT_ScrubTimeReset 148 ,TXT_ScrubTimeReset
147 ,settingsGetPointer()->scrubTimerCur 149 ,pSettings->scrubTimerCur
148 ,TXT_Minutes); 150 ,TXT_Minutes);
149 } 151 }
150 strcpy(&text[textPointer],"\n\r"); 152 strcpy(&text[textPointer],"\n\r");
151 textPointer += 2; 153 textPointer += 2;
152 if((line == 0) || (line == 3)) 154 if((line == 0) || (line == 3))
153 { 155 {
154 switch(settingsGetPointer()->scrubTimerMode) 156 switch(pSettings->scrubTimerMode)
155 { 157 {
156 case SCRUB_TIMER_OFF: 158 case SCRUB_TIMER_OFF:
157 default: textPointer += snprintf(&text[textPointer], 60,"%c\002%c%c",TXT_ScrubTimeMode, TXT_2BYTE, TXT2BYTE_MoCtrlNone ); 159 default: textPointer += snprintf(&text[textPointer], 60,"%c\002%c%c",TXT_ScrubTimeMode, TXT_2BYTE, TXT2BYTE_MoCtrlNone );
158 break; 160 break;
159 case SCRUB_TIMER_MINUTES: textPointer += snprintf(&text[textPointer], 60,"%c\002%c",TXT_ScrubTimeMode, TXT_Minutes ); 161 case SCRUB_TIMER_MINUTES: textPointer += snprintf(&text[textPointer], 60,"%c\002%c",TXT_ScrubTimeMode, TXT_Minutes );
163 } 165 }
164 } 166 }
165 strcpy(&text[textPointer],"\n\r"); 167 strcpy(&text[textPointer],"\n\r");
166 textPointer += 2; 168 textPointer += 2;
167 169
170 #ifdef ENABLE_PSCR_MODE
171 if(pSettings->dive_mode == DIVEMODE_PSCR)
172 {
173 if((line == 0) || (line == 4))
174 {
175 textPointer += snprintf(&text[textPointer], 60,\
176 "%c\002%02u\016\016%%\017"
177 ,TXT_PSCRO2Drop
178 ,pSettings->pscr_o2_drop);
179 }
180 strcpy(&text[textPointer],"\n\r");
181 textPointer += 2;
182 if((line == 0) || (line == 5))
183 {
184 textPointer += snprintf(&text[textPointer], 60,\
185 "%c\002 1/%02u"
186 ,TXT_PSCRLungRatio
187 ,pSettings->pscr_lung_ratio);
188 }
189 strcpy(&text[textPointer],"\n\r");
190 textPointer += 2;
191 }
192 #endif
193 #ifdef ENABLE_CO2_SUPPORT
194 if((line == 0) || (line == 6))
195 {
196 textPointer += snprintf(&text[textPointer], 60, "%c", TXT_CO2Sensor);
197 }
198 #endif
168 } 199 }
169 return StMXTRA; 200 return StMXTRA;
170 } 201 }
171 202