changeset 247:3949781096d4 bm-1

feature: Relative GF to Saturation renames Rename relevant code from Relative GF to Saturation. Involving UI elements, variable names, translated texts (that still need to be done), etc. No functional changes. Notice that I chose super_saturation as name, to provide a better link to the hwOS repo. Further notice that the TXT variable name is not changed. This is intensional, as there is also a desaturation variable, so things might get confusing renaming the TXT variable name. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
author Jan Mulder <jlmulder@xs4all.nl>
date Tue, 09 Apr 2019 16:30:21 +0200
parents ff0d23625cd5
children ac2b06b5d09f
files Common/Inc/data_central.h Discovery/Src/base.c Discovery/Src/buehlmann.c Discovery/Src/t7.c Discovery/Src/text_multilanguage.c Discovery/Src/vpm.c
diffstat 6 files changed, 10 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- a/Common/Inc/data_central.h	Tue Apr 09 15:38:31 2019 +0200
+++ b/Common/Inc/data_central.h	Tue Apr 09 16:30:21 2019 +0200
@@ -86,7 +86,7 @@
 	int output_time_to_surface_seconds;
 	int output_ndl_seconds;
 	float output_ceiling_meter;
-	float output_relative_gradient;
+	float super_saturation;
 	uint32_t tickstamp;
 } 	SDecoinfo;
 
--- a/Discovery/Src/base.c	Tue Apr 09 15:38:31 2019 +0200
+++ b/Discovery/Src/base.c	Tue Apr 09 16:30:21 2019 +0200
@@ -1707,7 +1707,7 @@
 		case CALC_BUEHLMANN:
 				buehlmann_calc_deco(&stateDeco.lifeData,&stateDeco.diveSettings,&stateDeco.decolistBuehlmann);
 				buehlmann_ceiling_calculator(&stateDeco.lifeData,&stateDeco.diveSettings,&stateDeco.decolistBuehlmann);
-				buehlmann_relative_gradient_calculator(&stateDeco.lifeData,&stateDeco.diveSettings,&stateDeco.decolistBuehlmann);
+				buehlmann_super_saturation_calculator(&stateDeco.lifeData,&stateDeco.diveSettings,&stateDeco.decolistBuehlmann);
 				decoLock = DECO_CALC_FINSHED_Buehlmann;
 				return;
 		 case CALC_BUEHLMANN_FUTURE:
--- a/Discovery/Src/buehlmann.c	Tue Apr 09 15:38:31 2019 +0200
+++ b/Discovery/Src/buehlmann.c	Tue Apr 09 16:30:21 2019 +0200
@@ -786,22 +786,3 @@
 		pDecoInfo->output_ceiling_meter = 999;
 	}
 }
-
-(??)
-(??)void buehlmann_super_saturation_calculator(SLifeData* pLifeData, SDiveSettings * pDiveSettings, SDecoinfo * pDecoInfo)
-(??){
-(??)	float temp_tissue;
-(??)	float limit;
-(??)	float pres_respiration;
-(??)	float gf = 0;
-(??)	
-(??)	limit = tissue_tolerance_without_gf_correction(&temp_tissue);
-(??)	pres_respiration = pLifeData->pressure_ambient_bar;
-(??)	
-(??)	if( temp_tissue > pres_respiration )
-(??)	{
-(??)		gf = (pres_respiration - temp_tissue) / (limit - temp_tissue);
-(??)	}
-(??)	
-(??)	pDecoInfo->super_saturation = gf;
-(??)}
--- a/Discovery/Src/t7.c	Tue Apr 09 15:38:31 2019 +0200
+++ b/Discovery/Src/t7.c	Tue Apr 09 16:30:21 2019 +0200
@@ -2578,7 +2578,7 @@
     /* actual GF */
     case 8:
         headerText[2] = TXT_ActualGradient;
-        snprintf(text,TEXTSIZE,"\020%.0f",100 * pDecoinfoStandard->output_relative_gradient);
+        snprintf(text,TEXTSIZE,"\020%.0f\016\016%%\017",100 * pDecoinfoStandard->super_saturation);
         break;
     }
     headerText[3] = 0;
@@ -3098,7 +3098,7 @@
     text[textpointer++] = '\n';
     text[textpointer++] = '\r';
     text[textpointer++] = '\t';
-    textpointer += snprintf(&text[textpointer],10,"\020%.0f",		100 * pDecoinfoStandard->output_relative_gradient);
+    textpointer += snprintf(&text[textpointer],10,"\020%.0f\016\016%%\017",		100 * pDecoinfoStandard->super_saturation);
     text[textpointer++] = '\n';
     text[textpointer++] = '\r';
     text[textpointer++] = '\t';
--- a/Discovery/Src/text_multilanguage.c	Tue Apr 09 15:38:31 2019 +0200
+++ b/Discovery/Src/text_multilanguage.c	Tue Apr 09 16:30:21 2019 +0200
@@ -156,11 +156,11 @@
 static uint8_t text_ES_Ceiling[] = "Techo";
 
 // dive mode
-static uint8_t text_EN_ActualGradient[] = "Relative GF";
-static uint8_t text_DE_ActualGradient[] = "Relativ GF";
-static uint8_t text_FR_ActualGradient[] = "GF relatif";
-static uint8_t text_IT_ActualGradient[] = "GF relativo";
-static uint8_t text_ES_ActualGradient[] = "GF relativo";
+static uint8_t text_EN_ActualGradient[] = "Saturation";
+static uint8_t text_DE_ActualGradient[] = "";
+static uint8_t text_FR_ActualGradient[] = "";
+static uint8_t text_IT_ActualGradient[] = "";
+static uint8_t text_ES_ActualGradient[] = "";
 
 // dive mode
 static uint8_t text_EN_Stopwatch[] = "Stopwatch";
--- a/Discovery/Src/vpm.c	Tue Apr 09 15:38:31 2019 +0200
+++ b/Discovery/Src/vpm.c	Tue Apr 09 16:30:21 2019 +0200
@@ -306,7 +306,7 @@
     pDECOINFO->output_time_to_surface_seconds = 0;
     pDECOINFO->output_ndl_seconds = 0;
     pDECOINFO->output_ceiling_meter = 0;
-    pDECOINFO->output_relative_gradient = 0;
+    pDECOINFO->super_saturation = 0;
     uint8_t tmp_calc_status;
     for(int i=0;i<DECOINFO_STRUCT_MAX_STOPS;i++)
     {