Mercurial > public > ostc4
comparison Discovery/Src/tMenuSystem.c @ 805:dd7ce655db26
Adds a simple countdown timer, available as a custom view in surface and dive mode.
This can be used to time safety stops, or to prebreathe a CCR (or to boil your breakfast eggs if you are so inclined). The duration of the timer is configurable from 1 second to 9:59 minutes in the System menu.
The timer is started by switching to the custom view, and remaining on it until a 10 second delay has elapsed. Once the timer has started the custom view can be changed and the timer will continue running in the background.
After the timer has run out 'Finished' will be shown for 10 seconds in the timer custom view, and then automatic switching of custom views (if configured) resumes.
In surface mode the dive computer will not go to sleep while the timer is running, and a mini timer will be shown when the timer custom view is not showing. (mikeller)
author | heinrichsweikamp |
---|---|
date | Mon, 21 Aug 2023 17:20:07 +0200 |
parents | 54c5ec8416c4 |
children | ce8f71217f45 |
comparison
equal
deleted
inserted
replaced
804:391b3d420a39 | 805:dd7ce655db26 |
---|---|
162 { | 162 { |
163 strcpy(&text[textPointer],"\n\r"); | 163 strcpy(&text[textPointer],"\n\r"); |
164 textPointer += 2; | 164 textPointer += 2; |
165 } | 165 } |
166 | 166 |
167 if((line == 0) || (line == 2)) | 167 if (line == 0 || line == 2) { |
168 textPointer += snprintf(&text[textPointer], 21, "%c%c\t%u:%02u \016\016[m:ss]\017\n\r", TXT_2BYTE, TXT2BYTE_Timer, data->timerDurationS / 60, data->timerDurationS % 60); | |
169 } else { | |
170 textPointer += snprintf(&text[textPointer], 3, "\n\r"); | |
171 } | |
172 | |
173 if((line == 0) || (line == 3)) | |
168 { | 174 { |
169 text[textPointer++] = TXT_Language; | 175 text[textPointer++] = TXT_Language; |
170 text[textPointer++] = '\t'; | 176 text[textPointer++] = '\t'; |
171 text[textPointer++] = TXT_LanguageName; | 177 text[textPointer++] = TXT_LanguageName; |
172 text[textPointer++] = '\n'; | 178 text[textPointer++] = '\n'; |
177 { | 183 { |
178 strcpy(&text[textPointer],"\n\r"); | 184 strcpy(&text[textPointer],"\n\r"); |
179 textPointer += 2; | 185 textPointer += 2; |
180 } | 186 } |
181 | 187 |
182 if((line == 0) || (line == 3)) | 188 if((line == 0) || (line == 4)) |
183 { | 189 { |
184 text[textPointer++] = TXT_2BYTE; | 190 text[textPointer++] = TXT_2BYTE; |
185 text[textPointer++] = TXT2BYTE_Layout; | 191 text[textPointer++] = TXT2BYTE_Layout; |
186 text[textPointer++] = '\t'; | 192 text[textPointer++] = '\t'; |
187 | 193 |
250 { | 256 { |
251 strcpy(&text[textPointer],"\n\r"); | 257 strcpy(&text[textPointer],"\n\r"); |
252 textPointer += 2; | 258 textPointer += 2; |
253 } | 259 } |
254 | 260 |
255 if((line == 0) || (line == 4)) | 261 if((line == 0) || (line == 5)) |
256 { | 262 { |
257 text[textPointer++] = TXT_Information; | 263 text[textPointer++] = TXT_Information; |
258 text[textPointer++] = '\t'; | 264 text[textPointer++] = '\t'; |
259 textPointer += snprintf(&text[textPointer],29,"RTE %u.%u OS %i.%i.%i" | 265 textPointer += snprintf(&text[textPointer],29,"RTE %u.%u OS %i.%i.%i" |
260 ,RTEhigh | 266 ,RTEhigh |
265 ); | 271 ); |
266 } | 272 } |
267 strcpy(&text[textPointer],"\n\r"); | 273 strcpy(&text[textPointer],"\n\r"); |
268 textPointer += 2; | 274 textPointer += 2; |
269 | 275 |
270 if((line == 0) || (line == 5)) | 276 if((line == 0) || (line == 6)) |
271 { | 277 { |
272 text[textPointer++] = TXT_2BYTE; | 278 text[textPointer++] = TXT_2BYTE; |
273 text[textPointer++] = TXT2BYTE_ResetMenu; | 279 text[textPointer++] = TXT2BYTE_ResetMenu; |
274 text[textPointer] = 0; | 280 text[textPointer] = 0; |
275 } | 281 } |