diff Discovery/Src/t7.c @ 103:f5d2f02dc73f kittz

Generalize TEXT of pressure unit
author Dmitry Romanov <kitt@bk.ru>
date Wed, 28 Nov 2018 09:36:33 +0300
parents 4276d56eb37c
children 3834b6272ee5
line wrap: on
line diff
--- a/Discovery/Src/t7.c	Tue Nov 27 18:31:21 2018 +0100
+++ b/Discovery/Src/t7.c	Wed Nov 28 09:36:33 2018 +0300
@@ -775,7 +775,7 @@
     /* surface pressure  and temperature */
     if(stateUsed->sensorErrorsRTE == 0)
     {
-        snprintf(text,30,"%01.0f\022\016\016 hPa", stateUsed->lifeData.pressure_surface_bar * 1000.0f);
+        snprintf(text,30,"%01.0f\022\016\016 %s", stateUsed->lifeData.pressure_surface_bar * 1000.0f,TEXT_PRESSURE_UNIT);
         GFX_write_string(&FontT48,&t7surfaceL,text,3);
 
         if(settingsGetPointer()->nonMetricalSystem)
@@ -786,7 +786,7 @@
     }
     else
     {
-        snprintf(text,30,"ERR\022\016\016 hPa");
+        snprintf(text,30,"ERR\022\016\016 %s",TEXT_PRESSURE_UNIT);
         GFX_write_string(&FontT48,&t7surfaceL,text,3);
 
         if(settingsGetPointer()->nonMetricalSystem)
@@ -1090,7 +1090,7 @@
         Gfx_write_label_var(&t7screen,  0,400,255,&FontT48,CLUT_Font020,TextL1);
         return;
     }
-    snprintf(TextL1,TEXTSIZE,"%01.0f hPa",stateUsed->lifeData.pressure_ambient_bar * 1000.0f);
+    snprintf(TextL1,TEXTSIZE,"%01.0f %s",stateUsed->lifeData.pressure_ambient_bar * 1000.0f,TEXT_PRESSURE_UNIT);
     Gfx_write_label_var(&t7screen,  0,400,  0,&FontT42,CLUT_DiveMainLabel,"Ambient Pressure");
     Gfx_write_label_var(&t7screen,  0,400, 45,&FontT48,CLUT_Font020,TextL1);
 
@@ -1102,7 +1102,7 @@
     Gfx_write_label_var(&t7screen,  0,400,200,&FontT42,CLUT_DiveMainLabel,"Heading Roll Pitch");
     Gfx_write_label_var(&t7screen,  0,400,255,&FontT48,CLUT_Font020,TextL1);
 
-    snprintf(TextL1,TEXTSIZE,"%01.0f hPa",stateUsed->lifeData.pressure_surface_bar * 1000.0f);
+    snprintf(TextL1,TEXTSIZE,"%01.0f %s",stateUsed->lifeData.pressure_surface_bar * 1000.0f,TEXT_PRESSURE_UNIT);
     Gfx_write_label_var(&t7screen,  0,400,310,&FontT42,CLUT_DiveMainLabel,"Surface Pressure");
     Gfx_write_label_var(&t7screen,  0,400,355,&FontT48,CLUT_Font020,TextL1);