comparison Discovery/Src/t3.c @ 788:4abfb8a2a435

Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
author heinrichsweikamp
date Tue, 04 Jul 2023 14:39:06 +0200
parents b6d8a6fbf4fd
children 107c29934671
comparison
equal deleted inserted replaced
787:aeb72882f30a 788:4abfb8a2a435
256 uint8_t* pReplayMarker; 256 uint8_t* pReplayMarker;
257 uint16_t max_depth = 10; 257 uint16_t max_depth = 10;
258 char text[TEXTSIZE]; 258 char text[TEXTSIZE];
259 point_t start, stop; 259 point_t start, stop;
260 uint16_t diveMinutes = 0; 260 uint16_t diveMinutes = 0;
261 const SDecoinfo * pDecoinfo;
262 261
263 SSettings* pSettings; 262 SSettings* pSettings;
264 pSettings = settingsGetPointer(); 263 pSettings = settingsGetPointer();
265
266 if(stateUsed->diveSettings.deco_type.ub.standard == GF_MODE)
267 {
268 pDecoinfo = &stateUsed->decolistBuehlmann;
269 }
270 else
271 {
272 pDecoinfo = &stateUsed->decolistVPM;
273 }
274 264
275 wintemp.top = 479 - BigFontSeperationTopBottom + 5; 265 wintemp.top = 479 - BigFontSeperationTopBottom + 5;
276 wintemp.bottom = 479 - 5; 266 wintemp.bottom = 479 - 5;
277 267
278 if(!pSettings->FlipDisplay) 268 if(!pSettings->FlipDisplay)
331 if(getMiniLiveReplayLength() < 10) /* new dive startet => reset the visualization state for deco data */ 321 if(getMiniLiveReplayLength() < 10) /* new dive startet => reset the visualization state for deco data */
332 { 322 {
333 wasDecoDive = 0; 323 wasDecoDive = 0;
334 } 324 }
335 325
326 const SDecoinfo * pDecoinfo = getDecoInfo();
336 if((pDecoinfo->output_time_to_surface_seconds) || (wasDecoDive)) /* draw deco data first => will be overlayed by all other informations */ 327 if((pDecoinfo->output_time_to_surface_seconds) || (wasDecoDive)) /* draw deco data first => will be overlayed by all other informations */
337 { 328 {
338 wasDecoDive = 1; 329 wasDecoDive = 1;
339 GFX_graph_print(&t3screen,&wintemp,wintemp.top * -1,1,0,max_depth, getMiniLiveDecoPointerToData(),drawDataLength, CLUT_NiceGreen, NULL); 330 GFX_graph_print(&t3screen,&wintemp,wintemp.top * -1,1,0,max_depth, getMiniLiveDecoPointerToData(),drawDataLength, CLUT_NiceGreen, NULL);
340 } 331 }
918 909
919 SSettings* pSettings; 910 SSettings* pSettings;
920 pSettings = settingsGetPointer(); 911 pSettings = settingsGetPointer();
921 912
922 // CVIEW_T3_Decostop and CVIEW_T3_TTS 913 // CVIEW_T3_Decostop and CVIEW_T3_TTS
923 const SDecoinfo * pDecoinfo; 914 const SDecoinfo * pDecoinfo = getDecoInfo();
924 if(stateUsed->diveSettings.deco_type.ub.standard == GF_MODE)
925 pDecoinfo = &stateUsed->decolistBuehlmann;
926 else
927 pDecoinfo = &stateUsed->decolistVPM;
928 915
929 // CVIEW_T3_Decostop 916 // CVIEW_T3_Decostop
930 uint16_t nextstopLengthSeconds = 0; 917 uint16_t nextstopLengthSeconds = 0;
931 uint8_t nextstopDepthMeter = 0; 918 uint8_t nextstopDepthMeter = 0;
932 SDivetime SafetyStopTime = {0,0,0,0}; 919 SDivetime SafetyStopTime = {0,0,0,0};
1685 } 1672 }
1686 1673
1687 1674
1688 void t3_basics_change_customview(uint8_t *tX_selection_customview,const uint8_t *tX_customviews, uint8_t action) 1675 void t3_basics_change_customview(uint8_t *tX_selection_customview,const uint8_t *tX_customviews, uint8_t action)
1689 { 1676 {
1690 const SDecoinfo * pDecoinfo;
1691 if(stateUsed->diveSettings.deco_type.ub.standard == GF_MODE)
1692 pDecoinfo = &stateUsed->decolistBuehlmann;
1693 else
1694 pDecoinfo = &stateUsed->decolistVPM;
1695
1696 uint8_t curViewIdx = 0xff; 1677 uint8_t curViewIdx = 0xff;
1697 uint8_t index = 0; 1678 uint8_t index = 0;
1698 uint8_t indexOverrun = 0; 1679 uint8_t indexOverrun = 0;
1699 uint8_t lastViewIdx = 0; 1680 uint8_t lastViewIdx = 0;
1700 uint8_t iterate = 0; /* set to 1 if a view has to be skipped */ 1681 uint8_t iterate = 0; /* set to 1 if a view has to be skipped */
1760 } 1741 }
1761 else /* special case which are enabled but not to be displayed at the moment */ 1742 else /* special case which are enabled but not to be displayed at the moment */
1762 { 1743 {
1763 if(settingsGetPointer()->MotionDetection != MOTION_DETECT_SECTOR) /* no hiding in case of active sector view option (fixed mapping would change during dive) */ 1744 if(settingsGetPointer()->MotionDetection != MOTION_DETECT_SECTOR) /* no hiding in case of active sector view option (fixed mapping would change during dive) */
1764 { 1745 {
1746 const SDecoinfo * pDecoinfo = getDecoInfo();
1765 /* Skip TTS if value is 0 */ 1747 /* Skip TTS if value is 0 */
1766 if((tX_customviews[index] == CVIEW_T3_TTS) && (!pDecoinfo->output_time_to_surface_seconds)) 1748 if((tX_customviews[index] == CVIEW_T3_TTS) && (!pDecoinfo->output_time_to_surface_seconds))
1767 { 1749 {
1768 if(*tX_selection_customview == tX_customviews[index]) 1750 if(*tX_selection_customview == tX_customviews[index])
1769 { 1751 {