comparison Discovery/Src/t3.c @ 237:ec16fd26e280 div-fixes-5

Bugfix: do not show NDL in bigscreen mode when zero The first minute of the dive, no deco or NDL data is shown in normal mode, but when starting in bigscreen mode, the first minute, the screen shows NDL 0', which is obviously wrong. Fix this, and simply show nothing like in normal mode. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
author Jan Mulder <jlmulder@xs4all.nl>
date Sat, 06 Apr 2019 20:35:21 +0200
parents 51a3aeffc6b3
children 74a8296a2318
comparison
equal deleted inserted replaced
236:ad6ddc4aabcd 237:ec16fd26e280
35 #include "math.h" 35 #include "math.h"
36 #include "tHome.h" 36 #include "tHome.h"
37 #include "timer.h" 37 #include "timer.h"
38 #include "unit.h" 38 #include "unit.h"
39 39
40 //* Importend function prototypes ---------------------------------------------*/ 40 //* Imported function prototypes ---------------------------------------------*/
41 extern uint8_t write_gas(char *text, uint8_t oxygen, uint8_t helium); 41 extern uint8_t write_gas(char *text, uint8_t oxygen, uint8_t helium);
42 42
43 /* Exported variables --------------------------------------------------------*/ 43 /* Exported variables --------------------------------------------------------*/
44 44
45 const uint16_t BigFontSeperationLeftRight = 399; 45 const uint16_t BigFontSeperationLeftRight = 399;
797 textpointer = 0; 797 textpointer = 0;
798 snprintf(&text[textpointer],TEXTSIZE,"\020\003\016%u:%02u",SafetyStopTime.Minutes,SafetyStopTime.Seconds); 798 snprintf(&text[textpointer],TEXTSIZE,"\020\003\016%u:%02u",SafetyStopTime.Minutes,SafetyStopTime.Seconds);
799 t3_basics_colorscheme_mod(text); 799 t3_basics_colorscheme_mod(text);
800 GFX_write_string(&FontT105,tXc1,text,1); 800 GFX_write_string(&FontT105,tXc1,text,1);
801 } 801 }
802 else // NDL 802 else if(pDecoinfo->output_ndl_seconds) // NDL
803 { 803 {
804 snprintf(text,TEXTSIZE,"\032\f%c",TXT_Nullzeit); 804 snprintf(text,TEXTSIZE,"\032\f%c",TXT_Nullzeit);
805 GFX_write_string(&FontT42,tXc1,text,0); 805 GFX_write_string(&FontT42,tXc1,text,0);
806 if(pDecoinfo->output_ndl_seconds < 1000 * 60) 806 if(pDecoinfo->output_ndl_seconds < 1000 * 60)
807 snprintf(text,TEXTSIZE,"\020\003%i'",pDecoinfo->output_ndl_seconds/60); 807 snprintf(text,TEXTSIZE,"\020\003%i'",pDecoinfo->output_ndl_seconds/60);