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

PSCR Mode
author heinrichs weikamp
date Tue, 14 Dec 2021 15:36:10 +0100
parents 3ccf13af4651
children 8adf9b8fc7fa
comparison
equal deleted inserted replaced
661:87bee7cc77b3 662:1b995079c045
945 945
946 // CVIEW_T3_StopWatch 946 // CVIEW_T3_StopWatch
947 SDivetime Stopwatch = {0,0,0,0}; 947 SDivetime Stopwatch = {0,0,0,0};
948 float fAverageDepth, fAverageDepthAbsolute; 948 float fAverageDepth, fAverageDepthAbsolute;
949 949
950 #ifdef ENABLE_PSCR_MODE
951 uint8_t showSimPPO2 = 1;
952 #endif
950 uint16_t tempWinX0; 953 uint16_t tempWinX0;
951 uint16_t tempWinX1; 954 uint16_t tempWinX1;
952 uint16_t tempWinY0; 955 uint16_t tempWinY0;
953 uint16_t tempWinY1; 956 uint16_t tempWinY1;
954 uint16_t tempWinC2X0; 957 uint16_t tempWinC2X0;
1262 else if(i==2) 1265 else if(i==2)
1263 text[textpointer++] = '\002'; /* right */ 1266 text[textpointer++] = '\002'; /* right */
1264 1267
1265 if((stateUsed->diveSettings.ppo2sensors_deactivated & (1<<i)) || (stateUsed->lifeData.ppO2Sensor_bar[i] == 0.0)) 1268 if((stateUsed->diveSettings.ppo2sensors_deactivated & (1<<i)) || (stateUsed->lifeData.ppO2Sensor_bar[i] == 0.0))
1266 { 1269 {
1267 text[textpointer++] = '\031'; 1270 #ifdef ENABLE_PSCR_MODE
1268 text[textpointer++] = ' '; 1271 if((stateUsed->diveSettings.diveMode == DIVEMODE_PSCR) && (showSimPPO2) && (stateUsed->mode == MODE_DIVE)) /* display ppo2 sim in blue letters in case a slot is not used in the ppo2 custom view */
1269 text[textpointer++] = '-'; 1272 {
1270 text[textpointer++] = ' '; 1273 text[textpointer++] = '\023';
1271 text[textpointer++] = 0; 1274 textpointer += snprintf(&text[textpointer],TEXTSIZE,"%.2f",stateUsed->lifeData.ppo2Simulated_bar);
1275 showSimPPO2 = 0;
1276 }
1277 else
1278 #endif
1279 {
1280 text[textpointer++] = '\031';
1281 text[textpointer++] = ' ';
1282 text[textpointer++] = '-';
1283 text[textpointer++] = ' ';
1284 text[textpointer++] = 0;
1285 }
1272 } 1286 }
1273 else 1287 else
1274 { 1288 {
1275 if(stateUsed->warnings.sensorOutOfBounds[i]) 1289 if(stateUsed->warnings.sensorOutOfBounds[i])
1276 text[textpointer++] = '\025'; 1290 text[textpointer++] = '\025';
1277 textpointer += snprintf(&text[textpointer],TEXTSIZE,"%.2f",stateUsed->lifeData.ppO2Sensor_bar[i]); 1291 textpointer += snprintf(&text[textpointer],TEXTSIZE,"%.2f",stateUsed->lifeData.ppO2Sensor_bar[i]);
1278 } 1292 }
1279 GFX_write_string(&FontT105,tXc1,text,0); 1293 GFX_write_string(&FontT105,tXc1,text,0);
1280 1294
1281 1295
1282 if((pSettings->scrubTimerMode != SCRUB_TIMER_OFF) && (pSettings->dive_mode == DIVEMODE_CCR)) 1296 if((pSettings->scrubTimerMode != SCRUB_TIMER_OFF) && isLoopMode(pSettings->dive_mode))
1283 { 1297 {
1284 snprintf(text,TEXTSIZE,"\032\002\f%c",TXT_ScrubTime); 1298 snprintf(text,TEXTSIZE,"\032\002\f%c",TXT_ScrubTime);
1285 GFX_write_string(&FontT42,tXc1,text,0); 1299 GFX_write_string(&FontT42,tXc1,text,0);
1286 1300
1287 textpointer = 0; 1301 textpointer = 0;