diff Discovery/Src/t7.c @ 517:85e0945552ce

Added color coding for cv gas list: In previous version only a warning was highlighted using the red color. Now a better gas selection is highlighted in green. Gas without notification is blue while the active gas is shown in white
author Ideenmodellierer
date Sun, 06 Sep 2020 21:15:34 +0200
parents 0004704906d0
children 962d7b2c18c6
line wrap: on
line diff
--- a/Discovery/Src/t7.c	Sun Sep 06 21:13:22 2020 +0200
+++ b/Discovery/Src/t7.c	Sun Sep 06 21:15:34 2020 +0200
@@ -1797,10 +1797,18 @@
             fPpO2ofGasAtThisDepth = (stateUsed->lifeData.pressure_ambient_bar - WATER_VAPOUR_PRESSURE) * pGasLine[gasId].oxygen_percentage / 100;
             if(pGasLine[gasId].note.ub.active == 0)
                 strcpy(&text[textpointer++],"\021");
+            else if(stateUsed->lifeData.actualGas.GasIdInSettings == gasId)	/* actual selected gas */
+            {
+            	strcpy(&text[textpointer++],"\030");
+            }
             else if((fPpO2ofGasAtThisDepth > fPpO2limitHigh) || (fPpO2ofGasAtThisDepth < fPpO2limitLow))
                 strcpy(&text[textpointer++],"\025");
+            else if(actualBetterGasId() == gasId)
+            {
+                strcpy(&text[textpointer++],"\026");			/* Highlight better gas */
+            }
             else
-                strcpy(&text[textpointer++],"\030");
+                strcpy(&text[textpointer++],"\023");
 
             text[textpointer++] = ' ';
             oxygen = pGasLine[gasId].oxygen_percentage;