Mercurial > public > ostc4
diff Discovery/Src/t7.c @ 216:7012a521fa95
Merged in janlmulder/ostc4/edit-fix (pull request #11)
Fix 3 presentation bugs
author | heinrichsweikamp <bitbucket@heinrichsweikamp.com> |
---|---|
date | Thu, 28 Mar 2019 13:05:29 +0000 |
parents | 4a0ebade04f5 |
children | 9b4b3decd9ba |
line wrap: on
line diff
--- a/Discovery/Src/t7.c Tue Mar 26 22:23:26 2019 +0000 +++ b/Discovery/Src/t7.c Thu Mar 28 13:05:29 2019 +0000 @@ -2172,9 +2172,9 @@ snprintf(TextR3,TEXTSIZE,"\032\f\002%c",TXT_TTS); GFX_write_string(&FontT42,&t7r3,TextR3,0); if(pDecoinfo->output_time_to_surface_seconds < 1000 * 60) - snprintf(TextR3,TEXTSIZE,"\020\002%i'",(pDecoinfo->output_time_to_surface_seconds + 30)/ 60); + snprintf(TextR3,TEXTSIZE,"\020\002%i'",(pDecoinfo->output_time_to_surface_seconds + 59)/ 60); else - snprintf(TextR3,TEXTSIZE,"\020\002%ih",pDecoinfo->output_time_to_surface_seconds / 3600); + snprintf(TextR3,TEXTSIZE,"\020\002%ih",(pDecoinfo->output_time_to_surface_seconds + 59)/ 3600); t7_colorscheme_mod(TextR3); if(time_elapsed_ms(pDecoinfo->tickstamp, HAL_GetTick()) > MAX_AGE_DECOINFO_MS) TextR2[0] = '\021'; @@ -2564,7 +2564,10 @@ /* Future TTS */ case 6: headerText[2] = TXT_FutureTTS; - snprintf(text,TEXTSIZE,"\020\016\016@+%u'\n\r" "%i' TTS",settingsGetPointer()->future_TTS, pDecoinfoFuture->output_time_to_surface_seconds / 60); + if (pDecoinfoFuture->output_time_to_surface_seconds < 1000 * 60) + snprintf(text,TEXTSIZE,"\020\016\016@+%u'\n\r" "%i' TTS",settingsGetPointer()->future_TTS, (pDecoinfoFuture->output_time_to_surface_seconds + 59) / 60); + else + snprintf(text,TEXTSIZE,"\020\016\016@+%u'\n\r" "%ih TTS",settingsGetPointer()->future_TTS, (pDecoinfoFuture->output_time_to_surface_seconds + 59) / 3600); tinyHeaderFont = 1; line = 1; break; @@ -3096,9 +3099,9 @@ text[textpointer++] = '\r'; text[textpointer++] = '\t'; if((pDecoinfoStandard->output_ceiling_meter > 99.9f) || (settingsGetPointer()->nonMetricalSystem)) - textpointer += snprintf(&text[textpointer],10,"\020%01.1f",unit_depth_float(pDecoinfoStandard->output_ceiling_meter)); + textpointer += snprintf(&text[textpointer],10,"\020%01.0f",unit_depth_float(pDecoinfoStandard->output_ceiling_meter)); else - textpointer += snprintf(&text[textpointer],10,"\020%01.0f",pDecoinfoStandard->output_ceiling_meter); + textpointer += snprintf(&text[textpointer],10,"\020%01.1f",pDecoinfoStandard->output_ceiling_meter); text[textpointer++] = '\n'; text[textpointer++] = '\r'; text[textpointer++] = '\t'; @@ -3110,7 +3113,10 @@ text[textpointer++] = '\n'; text[textpointer++] = '\r'; text[textpointer++] = '\t'; - textpointer += snprintf(&text[textpointer],10,"\020%i'", pDecoinfoFuture->output_time_to_surface_seconds / 60); + if (pDecoinfoFuture->output_time_to_surface_seconds < 1000 * 60) + textpointer += snprintf(&text[textpointer],10,"\020%i'", (pDecoinfoFuture->output_time_to_surface_seconds + 59) / 60); + else + textpointer += snprintf(&text[textpointer],10,"\020%ih", (pDecoinfoFuture->output_time_to_surface_seconds + 59) / 3600); text[textpointer++] = 0; t7_colorscheme_mod(text); GFX_write_string(&FontT42, &t7cY0free, text, 1);