diff Discovery/Src/t3.c @ 656:3ccf13af4651

Added visualization of scrubber time: The remaining scrubber timer may be displayed in minutes or percentage of maximum time (both countdown). The value is displayed in the lower left corner, the overview custom view in T7 display as well as in the O2 Monitor view of the T3 display.
author Ideenmodellierer
date Sun, 25 Apr 2021 20:47:01 +0200
parents c737cf5d9067
children 1b995079c045
line wrap: on
line diff
--- a/Discovery/Src/t3.c	Sun Apr 25 20:42:56 2021 +0200
+++ b/Discovery/Src/t3.c	Sun Apr 25 20:47:01 2021 +0200
@@ -1277,6 +1277,24 @@
                 textpointer += snprintf(&text[textpointer],TEXTSIZE,"%.2f",stateUsed->lifeData.ppO2Sensor_bar[i]);
             }
             GFX_write_string(&FontT105,tXc1,text,0);
+
+
+            if((pSettings->scrubTimerMode != SCRUB_TIMER_OFF) && (pSettings->dive_mode == DIVEMODE_CCR))
+            {
+                 snprintf(text,TEXTSIZE,"\032\002\f%c",TXT_ScrubTime);
+                 GFX_write_string(&FontT42,tXc1,text,0);
+
+            	textpointer = 0;
+                if(settingsGetPointer()->scrubTimerMode == SCRUB_TIMER_MINUTES)
+                {
+                	textpointer += snprintf(&text[textpointer],10,"\020\002%3u'", pSettings->scrubTimerCur);
+                }
+                else
+                {
+                	textpointer += snprintf(&text[textpointer],20,"\020\002%u\016\016%%\017", (uint16_t)(pSettings->scrubTimerCur * 100 / pSettings->scrubTimerMax));
+                }
+                GFX_write_string(&FontT105,tXc1,text,1);
+            }
         }
         break;