comparison Discovery/Src/t7.c @ 1050:88b6ab90c55a GasConsumption

Added separate LLC view for surface GF: A new LLC view has been added. In addition the surface GF is now clipped to a value of 9.99 => 999% in the visualization
author Ideenmodellierer
date Wed, 19 Nov 2025 21:34:18 +0100
parents d91345e9c009
children
comparison
equal deleted inserted replaced
1049:d91345e9c009 1050:88b6ab90c55a
3201 3201
3202 void t7_change_field(void) 3202 void t7_change_field(void)
3203 { 3203 {
3204 selection_custom_field++; 3204 selection_custom_field++;
3205 3205
3206 if((stateUsed->diveSettings.deco_type.ub.standard == VPM_MODE) && (selection_custom_field == LLC_GF)) /* no GF if in VPM mode */ 3206 if((stateUsed->diveSettings.deco_type.ub.standard == VPM_MODE) && ((selection_custom_field == LLC_GF) || (selection_custom_field == LCC_GF_SURF))) /* no GF if in VPM mode */
3207 { 3207 {
3208 selection_custom_field++; 3208 selection_custom_field++;
3209 } 3209 }
3210 SSettings *settings = settingsGetPointer(); 3210 SSettings *settings = settingsGetPointer();
3211 if (selection_custom_field == LLC_ScrubberTime && !isScrubberTimerEnabled(settings)) { 3211 if (selection_custom_field == LLC_ScrubberTime && !isScrubberTimerEnabled(settings)) {
3346 break; 3346 break;
3347 3347
3348 /* actual GF */ 3348 /* actual GF */
3349 case LLC_GF: 3349 case LLC_GF:
3350 headerText[2] = TXT_ActualGradient; 3350 headerText[2] = TXT_ActualGradient;
3351 snprintf(text,TEXTSIZE,"\020\002\016\016%3.0f%% @ C\017\n\r\002\016\016%3.0f%% @ 0\017",100 * pDecoinfoStandard->super_saturation 3351 snprintf(text,TEXTSIZE,"\020%.0f\016\016%%\017",100 * pDecoinfoStandard->super_saturation);
3352 ,100 * pDecoinfoStandard->gf_surf); 3352 break;
3353 tinyHeaderFont = 1; 3353
3354 line = 1; 3354 /* Surface GF */
3355 case LCC_GF_SURF:
3356 headerText[2] = TXT_2BYTE;
3357 headerText[3] = TXT2BYTE_GFSurf;
3358 snprintf(text,TEXTSIZE,"\020%.0f\016\016%%\017",100 * pDecoinfoStandard->gf_surf);
3355 break; 3359 break;
3356 3360
3357 case LLC_ScrubberTime: 3361 case LLC_ScrubberTime:
3358 tinyHeaderFont = 1; 3362 tinyHeaderFont = 1;
3359 headerText[2] = TXT_ScrubTime; 3363 headerText[2] = TXT_ScrubTime;
4147 text[textpointer++] = '\n'; 4151 text[textpointer++] = '\n';
4148 text[textpointer++] = '\r'; 4152 text[textpointer++] = '\r';
4149 text[textpointer++] = TXT_ActualGradient; 4153 text[textpointer++] = TXT_ActualGradient;
4150 text[textpointer++] = '\n'; 4154 text[textpointer++] = '\n';
4151 text[textpointer++] = '\r'; 4155 text[textpointer++] = '\r';
4152 text[textpointer++] = TXT_ActualGradient; 4156 text[textpointer++] = TXT_2BYTE;
4157 text[textpointer++] = TXT2BYTE_GFSurf;
4153 text[textpointer++] = '\n'; 4158 text[textpointer++] = '\n';
4154 text[textpointer++] = '\r'; 4159 text[textpointer++] = '\r';
4155 text[textpointer++] = TXT_CNS; 4160 text[textpointer++] = TXT_CNS;
4156 text[textpointer++] = '\n'; 4161 text[textpointer++] = '\n';
4157 text[textpointer++] = '\r'; 4162 text[textpointer++] = '\r';
4179 GFX_write_string(&FontT24, &t7cY0free, text, 1); 4184 GFX_write_string(&FontT24, &t7cY0free, text, 1);
4180 t7cY0free.WindowY1 += 10; 4185 t7cY0free.WindowY1 += 10;
4181 t7cY0free.WindowX1 += 10; 4186 t7cY0free.WindowX1 += 10;
4182 } 4187 }
4183 textpointer = 0; 4188 textpointer = 0;
4184 text[textpointer++] = '\t'; 4189 text[textpointer++] = '\002';
4185 textpointer += snprintf(&text[textpointer],10,"\020%01.2f", stateUsed->lifeData.ppO2); 4190 textpointer += snprintf(&text[textpointer],10,"\020%01.2f", stateUsed->lifeData.ppO2);
4186 text[textpointer++] = '\n'; 4191 text[textpointer++] = '\n';
4187 text[textpointer++] = '\r'; 4192 text[textpointer++] = '\r';
4188 text[textpointer++] = '\t'; 4193 text[textpointer++] = '\002';
4189 if((pDecoinfoStandard->output_ceiling_meter > 99.9f) || (settingsGetPointer()->nonMetricalSystem)) 4194 if((pDecoinfoStandard->output_ceiling_meter > 99.9f) || (settingsGetPointer()->nonMetricalSystem))
4190 textpointer += snprintf(&text[textpointer],10,"\020%01.0f",unit_depth_float(pDecoinfoStandard->output_ceiling_meter)); 4195 textpointer += snprintf(&text[textpointer],10,"\020%01.0f",unit_depth_float(pDecoinfoStandard->output_ceiling_meter));
4191 else 4196 else
4192 textpointer += snprintf(&text[textpointer],10,"\020%01.1f",pDecoinfoStandard->output_ceiling_meter); 4197 textpointer += snprintf(&text[textpointer],10,"\020%01.1f",pDecoinfoStandard->output_ceiling_meter);
4193 text[textpointer++] = '\n'; 4198 text[textpointer++] = '\n';
4194 text[textpointer++] = '\r'; 4199 text[textpointer++] = '\r';
4195 text[textpointer++] = '\t'; 4200 text[textpointer++] = '\002';
4196 textpointer += snprintf(&text[textpointer],15,"\020%.0f\016\016%%\017 @ C", 100 * pDecoinfoStandard->super_saturation); 4201 textpointer += snprintf(&text[textpointer],10,"\020%.0f\016\016%%\017", 100 * pDecoinfoStandard->super_saturation);
4197 text[textpointer++] = '\n'; 4202 text[textpointer++] = '\n';
4198 text[textpointer++] = '\r'; 4203 text[textpointer++] = '\r';
4199 text[textpointer++] = '\t'; 4204 text[textpointer++] = '\002';
4200 textpointer += snprintf(&text[textpointer],15,"\020%.0f\016\016%%\017 @ 0", 100 * pDecoinfoStandard->gf_surf); 4205 textpointer += snprintf(&text[textpointer],10,"\020%.0f\016\016%%\017", 100 * pDecoinfoStandard->gf_surf);
4201 text[textpointer++] = '\n'; 4206 text[textpointer++] = '\n';
4202 text[textpointer++] = '\r'; 4207 text[textpointer++] = '\r';
4203 text[textpointer++] = '\t'; 4208 text[textpointer++] = '\002';
4204 textpointer += snprintf(&text[textpointer],10,"\020%.0f\016\016%%\017",fCNS); 4209 textpointer += snprintf(&text[textpointer],10,"\020%.0f\016\016%%\017",fCNS);
4205 text[textpointer++] = '\n'; 4210 text[textpointer++] = '\n';
4206 text[textpointer++] = '\r'; 4211 text[textpointer++] = '\r';
4207 text[textpointer++] = '\t'; 4212 text[textpointer++] = '\002';
4208 if (pDecoinfoFuture->output_time_to_surface_seconds < 1000 * 60) 4213 if (pDecoinfoFuture->output_time_to_surface_seconds < 1000 * 60)
4209 textpointer += snprintf(&text[textpointer],10,"\020%i'", (pDecoinfoFuture->output_time_to_surface_seconds + 59) / 60); 4214 textpointer += snprintf(&text[textpointer],10,"\020%i'", (pDecoinfoFuture->output_time_to_surface_seconds + 59) / 60);
4210 else 4215 else
4211 textpointer += snprintf(&text[textpointer],10,"\020%ih", (pDecoinfoFuture->output_time_to_surface_seconds + 59) / 3600); 4216 textpointer += snprintf(&text[textpointer],10,"\020%ih", (pDecoinfoFuture->output_time_to_surface_seconds + 59) / 3600);
4212 4217
4213 if (isScrubberTimerEnabled(pSettings)) { 4218 if (isScrubberTimerEnabled(pSettings)) {
4214 text[textpointer++] = '\n'; 4219 text[textpointer++] = '\n';
4215 text[textpointer++] = '\r'; 4220 text[textpointer++] = '\r';
4216 text[textpointer++] = '\t'; 4221 text[textpointer++] = '\002';
4217 4222
4218 textpointer += printScrubberText(&text[textpointer], 10, stateUsed->scrubberDataDive, pSettings, false); 4223 textpointer += printScrubberText(&text[textpointer], 10, stateUsed->scrubberDataDive, pSettings, false);
4219 } 4224 }
4220 text[textpointer++] = 0; 4225 text[textpointer++] = 0;
4221 Gfx_colorsscheme_mod(text, 0); 4226 Gfx_colorsscheme_mod(text, 0);