Mercurial > public > ostc4
comparison Discovery/Src/t3.c @ 980:7149f372b0ba Evo_2_23
Fix a couple of bugs in the scrubber timer:
- double speed scrubber countdown in simulator mode
- unwanted updating of last scrubber use date in simulator mode
- invalid remaining scrubber display in surface mode
(mikeller)
| author | heinrichsweikamp |
|---|---|
| date | Tue, 04 Feb 2025 13:49:43 +0100 |
| parents | 4e4fbd73e329 |
| children | 8507a87f6401 |
comparison
equal
deleted
inserted
replaced
| 979:e7cd7ffd1879 | 980:7149f372b0ba |
|---|---|
| 1339 snprintf(text,TEXTSIZE,"\032\002\f%c",TXT_ScrubTime); | 1339 snprintf(text,TEXTSIZE,"\032\002\f%c",TXT_ScrubTime); |
| 1340 GFX_write_string(&FontT42,tXc1,text,0); | 1340 GFX_write_string(&FontT42,tXc1,text,0); |
| 1341 | 1341 |
| 1342 textpointer = 0; | 1342 textpointer = 0; |
| 1343 text[textpointer++] = '\002'; | 1343 text[textpointer++] = '\002'; |
| 1344 textpointer += printScrubberText(&text[textpointer], 10, pSettings); | 1344 textpointer += printScrubberText(&text[textpointer], 10, stateUsed->scrubberDataDive, pSettings); |
| 1345 GFX_write_string(&FontT105,tXc1,text,1); | 1345 GFX_write_string(&FontT105,tXc1,text,1); |
| 1346 } | 1346 } |
| 1347 } | 1347 } |
| 1348 break; | 1348 break; |
| 1349 | 1349 |
| 1994 uint8_t t3_getCustomView(void) | 1994 uint8_t t3_getCustomView(void) |
| 1995 { | 1995 { |
| 1996 return t3_selection_customview; | 1996 return t3_selection_customview; |
| 1997 } | 1997 } |
| 1998 | 1998 |
| 1999 int printScrubberText(char *text, size_t size, SSettings *settings) | 1999 int printScrubberText(char *text, size_t size, const SScrubberData *scrubberData, SSettings *settings) |
| 2000 { | 2000 { |
| 2001 int16_t currentTimerMinutes = stateUsed->scrubberDataDive[settings->scubberActiveId].TimerCur; | 2001 int16_t currentTimerMinutes = scrubberData[settings->scubberActiveId].TimerCur; |
| 2002 char colour = '\020'; | 2002 char colour = '\020'; |
| 2003 if (currentTimerMinutes <= 0) { | 2003 if (currentTimerMinutes <= 0) { |
| 2004 colour = '\025'; | 2004 colour = '\025'; |
| 2005 } else if (currentTimerMinutes <= 30) { | 2005 } else if (currentTimerMinutes <= 30) { |
| 2006 colour = '\024'; | 2006 colour = '\024'; |
