Mercurial > public > ostc4
comparison Discovery/Src/t7.c @ 115:3834b6272ee5 FlipDisplay
Merge with 68181cd61f2069d061621c2cd2a6afddb7486f5e
author | Ideenmodellierer |
---|---|
date | Thu, 03 Jan 2019 19:59:36 +0100 |
parents | cc8e24374b83 f5d2f02dc73f |
children | cc9c18075e00 |
comparison
equal
deleted
inserted
replaced
114:79b19d56ab08 | 115:3834b6272ee5 |
---|---|
968 } | 968 } |
969 | 969 |
970 /* surface pressure and temperature */ | 970 /* surface pressure and temperature */ |
971 if(stateUsed->sensorErrorsRTE == 0) | 971 if(stateUsed->sensorErrorsRTE == 0) |
972 { | 972 { |
973 snprintf(text,30,"%01.0f\022\016\016 mbar", stateUsed->lifeData.pressure_surface_bar * 1000.0f); | 973 snprintf(text,30,"%01.0f\022\016\016 %s", stateUsed->lifeData.pressure_surface_bar * 1000.0f,TEXT_PRESSURE_UNIT); |
974 GFX_write_string(&FontT48,&t7surfaceL,text,3); | 974 GFX_write_string(&FontT48,&t7surfaceL,text,3); |
975 | 975 |
976 if(settingsGetPointer()->nonMetricalSystem) | 976 if(settingsGetPointer()->nonMetricalSystem) |
977 snprintf(text,40,"%01.0f\140\022\016\016 fahrenheit",unit_temperature_float(stateUsed->lifeData.temperature_celsius)); | 977 snprintf(text,40,"%01.0f\140\022\016\016 fahrenheit",unit_temperature_float(stateUsed->lifeData.temperature_celsius)); |
978 else | 978 else |
979 snprintf(text,30,"%01.0f\140\022\016\016 celsius",stateUsed->lifeData.temperature_celsius); | 979 snprintf(text,30,"%01.0f\140\022\016\016 celsius",stateUsed->lifeData.temperature_celsius); |
980 GFX_write_string(&FontT48,&t7surfaceL,text,4); | 980 GFX_write_string(&FontT48,&t7surfaceL,text,4); |
981 } | 981 } |
982 else | 982 else |
983 { | 983 { |
984 snprintf(text,30,"ERR\022\016\016 mbar"); | 984 snprintf(text,30,"ERR\022\016\016 %s",TEXT_PRESSURE_UNIT); |
985 GFX_write_string(&FontT48,&t7surfaceL,text,3); | 985 GFX_write_string(&FontT48,&t7surfaceL,text,3); |
986 | 986 |
987 if(settingsGetPointer()->nonMetricalSystem) | 987 if(settingsGetPointer()->nonMetricalSystem) |
988 snprintf(text,40,"ERR\022\016\016 fahrenheit"); | 988 snprintf(text,40,"ERR\022\016\016 fahrenheit"); |
989 else | 989 else |
1293 Gfx_write_label_var(&t7screen, 0,400,145,&FontT48,CLUT_Font020,TextL1); | 1293 Gfx_write_label_var(&t7screen, 0,400,145,&FontT48,CLUT_Font020,TextL1); |
1294 snprintf(TextL1,TEXTSIZE,"Z %i",stateUsed->lifeData.compass_DZ_f); | 1294 snprintf(TextL1,TEXTSIZE,"Z %i",stateUsed->lifeData.compass_DZ_f); |
1295 Gfx_write_label_var(&t7screen, 0,400,255,&FontT48,CLUT_Font020,TextL1); | 1295 Gfx_write_label_var(&t7screen, 0,400,255,&FontT48,CLUT_Font020,TextL1); |
1296 return; | 1296 return; |
1297 } | 1297 } |
1298 snprintf(TextL1,TEXTSIZE,"%01.0f mbar",stateUsed->lifeData.pressure_ambient_bar * 1000.0f); | 1298 snprintf(TextL1,TEXTSIZE,"%01.0f %s",stateUsed->lifeData.pressure_ambient_bar * 1000.0f,TEXT_PRESSURE_UNIT); |
1299 Gfx_write_label_var(&t7screen, 0,400, 0,&FontT42,CLUT_DiveMainLabel,"Ambient Pressure"); | 1299 Gfx_write_label_var(&t7screen, 0,400, 0,&FontT42,CLUT_DiveMainLabel,"Ambient Pressure"); |
1300 Gfx_write_label_var(&t7screen, 0,400, 45,&FontT48,CLUT_Font020,TextL1); | 1300 Gfx_write_label_var(&t7screen, 0,400, 45,&FontT48,CLUT_Font020,TextL1); |
1301 | 1301 |
1302 snprintf(TextL1,TEXTSIZE,"%01.2f C",stateUsed->lifeData.temperature_celsius); | 1302 snprintf(TextL1,TEXTSIZE,"%01.2f C",stateUsed->lifeData.temperature_celsius); |
1303 Gfx_write_label_var(&t7screen, 0,400,100,&FontT42,CLUT_DiveMainLabel,"Temperature"); | 1303 Gfx_write_label_var(&t7screen, 0,400,100,&FontT42,CLUT_DiveMainLabel,"Temperature"); |
1305 | 1305 |
1306 snprintf(TextL1,TEXTSIZE,"%03.0f %03.0f %03.0f",stateUsed->lifeData.compass_heading,stateUsed->lifeData.compass_roll,stateUsed->lifeData.compass_pitch); | 1306 snprintf(TextL1,TEXTSIZE,"%03.0f %03.0f %03.0f",stateUsed->lifeData.compass_heading,stateUsed->lifeData.compass_roll,stateUsed->lifeData.compass_pitch); |
1307 Gfx_write_label_var(&t7screen, 0,400,200,&FontT42,CLUT_DiveMainLabel,"Heading Roll Pitch"); | 1307 Gfx_write_label_var(&t7screen, 0,400,200,&FontT42,CLUT_DiveMainLabel,"Heading Roll Pitch"); |
1308 Gfx_write_label_var(&t7screen, 0,400,255,&FontT48,CLUT_Font020,TextL1); | 1308 Gfx_write_label_var(&t7screen, 0,400,255,&FontT48,CLUT_Font020,TextL1); |
1309 | 1309 |
1310 snprintf(TextL1,TEXTSIZE,"%01.0f mbar",stateUsed->lifeData.pressure_surface_bar * 1000.0f); | 1310 snprintf(TextL1,TEXTSIZE,"%01.0f %s",stateUsed->lifeData.pressure_surface_bar * 1000.0f,TEXT_PRESSURE_UNIT); |
1311 Gfx_write_label_var(&t7screen, 0,400,310,&FontT42,CLUT_DiveMainLabel,"Surface Pressure"); | 1311 Gfx_write_label_var(&t7screen, 0,400,310,&FontT42,CLUT_DiveMainLabel,"Surface Pressure"); |
1312 Gfx_write_label_var(&t7screen, 0,400,355,&FontT48,CLUT_Font020,TextL1); | 1312 Gfx_write_label_var(&t7screen, 0,400,355,&FontT48,CLUT_Font020,TextL1); |
1313 | 1313 |
1314 // gasIdFirst = stateUsed->lifeData.actualGas.GasIdInSettings; | 1314 // gasIdFirst = stateUsed->lifeData.actualGas.GasIdInSettings; |
1315 snprintf(TextL1,TEXTSIZE,"%u.%u",dataIn.RTE_VERSION_high,dataIn.RTE_VERSION_low); | 1315 snprintf(TextL1,TEXTSIZE,"%u.%u",dataIn.RTE_VERSION_high,dataIn.RTE_VERSION_low); |