# HG changeset patch # User ideenmodellierer # Date 1589317409 -7200 # Node ID 5e6a612d03b5d2f65cf68746fa41fe445d7c0552 # Parent 19cff811616dc721fd131e8885cefbfaf4339f38 Only switch between "no fly" and "desaturation" in case there is desaturation time left: In previous versions a switch between the times were performed even desaturation time were 0 causing an empty field (nothing) to be displayed. In that case the remaining no fly time is shown Development option only: Show Pressure update for a short time in the custom field (as warning) diff -r 19cff811616d -r 5e6a612d03b5 Discovery/Src/t7.c --- a/Discovery/Src/t7.c Tue May 12 22:54:19 2020 +0200 +++ b/Discovery/Src/t7.c Tue May 12 23:03:29 2020 +0200 @@ -828,8 +828,7 @@ */ /* noFlyTime or DesaturationTime */ - - if((!display_count_high_time) && (stateUsed->lifeData.no_fly_time_minutes)) + if((stateUsed->lifeData.no_fly_time_minutes) && ((!display_count_high_time) || (stateUsed->lifeData.desaturation_time_minutes == 0))) { SSurfacetime NoFlyTime = {0,0,0,0}; t7_fill_surfacetime_helper(&NoFlyTime,stateUsed->lifeData.no_fly_time_minutes, 0); @@ -1321,6 +1320,12 @@ //count += stateUsed->warnings.lowBattery; count += stateUsed->warnings.sensorLinkLost; count += stateUsed->warnings.fallback; +#ifdef ENABLE_BOTTLE_SENSOR + if(stateUsed->warnings.newPressure) + { + count++; + } +#endif return count; } @@ -1331,6 +1336,12 @@ count = 0; count += stateUsed->cnsHigh_at_the_end_of_dive; count += stateUsed->decoMissed_at_the_end_of_dive; +#ifdef ENABLE_BOTTLE_SENSOR + if(stateUsed->warnings.newPressure) + { + count++; + } +#endif return count; } @@ -1369,6 +1380,14 @@ text[textpointer] = 0; lineFree--; } +#ifdef ENABLE_BOTTLE_SENSOR + if(stateUsed->warnings.newPressure) + { + sprintf(&text[textpointer] ," %u Bar\n", stateUsed->warnings.newPressure); + textpointer++; + lineFree--; + } +#endif if(textpointer != 0) GFX_write_string(&FontT48,&t7cW,text,1); } @@ -1438,6 +1457,14 @@ text[textpointer] = 0; lineFree--; } +#ifdef ENABLE_BOTTLE_SENSOR + if(stateUsed->warnings.newPressure) + { + sprintf(&text[textpointer]," %u Bar\n", stateUsed->warnings.newPressure); + textpointer++; + lineFree--; + } +#endif /* if(lineFree && stateUsed->warnings.lowBattery) {