comparison Discovery/Src/t7.c @ 102:4276d56eb37c kittz

hPa instead of mbar, enabled Spanish language
author heinrichsweikamp
date Tue, 27 Nov 2018 18:31:21 +0100
parents 8f8ea3a32e82
children f5d2f02dc73f
comparison
equal deleted inserted replaced
101:83feba2ad1c3 102:4276d56eb37c
773 } 773 }
774 774
775 /* surface pressure and temperature */ 775 /* surface pressure and temperature */
776 if(stateUsed->sensorErrorsRTE == 0) 776 if(stateUsed->sensorErrorsRTE == 0)
777 { 777 {
778 snprintf(text,30,"%01.0f\022\016\016 mbar", stateUsed->lifeData.pressure_surface_bar * 1000.0f); 778 snprintf(text,30,"%01.0f\022\016\016 hPa", stateUsed->lifeData.pressure_surface_bar * 1000.0f);
779 GFX_write_string(&FontT48,&t7surfaceL,text,3); 779 GFX_write_string(&FontT48,&t7surfaceL,text,3);
780 780
781 if(settingsGetPointer()->nonMetricalSystem) 781 if(settingsGetPointer()->nonMetricalSystem)
782 snprintf(text,40,"%01.0f\140\022\016\016 fahrenheit",unit_temperature_float(stateUsed->lifeData.temperature_celsius)); 782 snprintf(text,40,"%01.0f\140\022\016\016 fahrenheit",unit_temperature_float(stateUsed->lifeData.temperature_celsius));
783 else 783 else
784 snprintf(text,30,"%01.0f\140\022\016\016 celsius",stateUsed->lifeData.temperature_celsius); 784 snprintf(text,30,"%01.0f\140\022\016\016 celsius",stateUsed->lifeData.temperature_celsius);
785 GFX_write_string(&FontT48,&t7surfaceL,text,4); 785 GFX_write_string(&FontT48,&t7surfaceL,text,4);
786 } 786 }
787 else 787 else
788 { 788 {
789 snprintf(text,30,"ERR\022\016\016 mbar"); 789 snprintf(text,30,"ERR\022\016\016 hPa");
790 GFX_write_string(&FontT48,&t7surfaceL,text,3); 790 GFX_write_string(&FontT48,&t7surfaceL,text,3);
791 791
792 if(settingsGetPointer()->nonMetricalSystem) 792 if(settingsGetPointer()->nonMetricalSystem)
793 snprintf(text,40,"ERR\022\016\016 fahrenheit"); 793 snprintf(text,40,"ERR\022\016\016 fahrenheit");
794 else 794 else
1088 Gfx_write_label_var(&t7screen, 0,400,145,&FontT48,CLUT_Font020,TextL1); 1088 Gfx_write_label_var(&t7screen, 0,400,145,&FontT48,CLUT_Font020,TextL1);
1089 snprintf(TextL1,TEXTSIZE,"Z %i",stateUsed->lifeData.compass_DZ_f); 1089 snprintf(TextL1,TEXTSIZE,"Z %i",stateUsed->lifeData.compass_DZ_f);
1090 Gfx_write_label_var(&t7screen, 0,400,255,&FontT48,CLUT_Font020,TextL1); 1090 Gfx_write_label_var(&t7screen, 0,400,255,&FontT48,CLUT_Font020,TextL1);
1091 return; 1091 return;
1092 } 1092 }
1093 snprintf(TextL1,TEXTSIZE,"%01.0f mbar",stateUsed->lifeData.pressure_ambient_bar * 1000.0f); 1093 snprintf(TextL1,TEXTSIZE,"%01.0f hPa",stateUsed->lifeData.pressure_ambient_bar * 1000.0f);
1094 Gfx_write_label_var(&t7screen, 0,400, 0,&FontT42,CLUT_DiveMainLabel,"Ambient Pressure"); 1094 Gfx_write_label_var(&t7screen, 0,400, 0,&FontT42,CLUT_DiveMainLabel,"Ambient Pressure");
1095 Gfx_write_label_var(&t7screen, 0,400, 45,&FontT48,CLUT_Font020,TextL1); 1095 Gfx_write_label_var(&t7screen, 0,400, 45,&FontT48,CLUT_Font020,TextL1);
1096 1096
1097 snprintf(TextL1,TEXTSIZE,"%01.2f C",stateUsed->lifeData.temperature_celsius); 1097 snprintf(TextL1,TEXTSIZE,"%01.2f C",stateUsed->lifeData.temperature_celsius);
1098 Gfx_write_label_var(&t7screen, 0,400,100,&FontT42,CLUT_DiveMainLabel,"Temperature"); 1098 Gfx_write_label_var(&t7screen, 0,400,100,&FontT42,CLUT_DiveMainLabel,"Temperature");
1100 1100
1101 snprintf(TextL1,TEXTSIZE,"%03.0f %03.0f %03.0f",stateUsed->lifeData.compass_heading,stateUsed->lifeData.compass_roll,stateUsed->lifeData.compass_pitch); 1101 snprintf(TextL1,TEXTSIZE,"%03.0f %03.0f %03.0f",stateUsed->lifeData.compass_heading,stateUsed->lifeData.compass_roll,stateUsed->lifeData.compass_pitch);
1102 Gfx_write_label_var(&t7screen, 0,400,200,&FontT42,CLUT_DiveMainLabel,"Heading Roll Pitch"); 1102 Gfx_write_label_var(&t7screen, 0,400,200,&FontT42,CLUT_DiveMainLabel,"Heading Roll Pitch");
1103 Gfx_write_label_var(&t7screen, 0,400,255,&FontT48,CLUT_Font020,TextL1); 1103 Gfx_write_label_var(&t7screen, 0,400,255,&FontT48,CLUT_Font020,TextL1);
1104 1104
1105 snprintf(TextL1,TEXTSIZE,"%01.0f mbar",stateUsed->lifeData.pressure_surface_bar * 1000.0f); 1105 snprintf(TextL1,TEXTSIZE,"%01.0f hPa",stateUsed->lifeData.pressure_surface_bar * 1000.0f);
1106 Gfx_write_label_var(&t7screen, 0,400,310,&FontT42,CLUT_DiveMainLabel,"Surface Pressure"); 1106 Gfx_write_label_var(&t7screen, 0,400,310,&FontT42,CLUT_DiveMainLabel,"Surface Pressure");
1107 Gfx_write_label_var(&t7screen, 0,400,355,&FontT48,CLUT_Font020,TextL1); 1107 Gfx_write_label_var(&t7screen, 0,400,355,&FontT48,CLUT_Font020,TextL1);
1108 1108
1109 // gasIdFirst = stateUsed->lifeData.actualGas.GasIdInSettings; 1109 // gasIdFirst = stateUsed->lifeData.actualGas.GasIdInSettings;
1110 snprintf(TextL1,TEXTSIZE,"%u.%u",dataIn.RTE_VERSION_high,dataIn.RTE_VERSION_low); 1110 snprintf(TextL1,TEXTSIZE,"%u.%u",dataIn.RTE_VERSION_high,dataIn.RTE_VERSION_low);