comparison Small_CPU/Src/scheduler.c @ 904:5736b2641cb0 Evo_2_23

Ascent speed display: Do not calculate speed if the diver is close to surface.
author ideenmodellierer
date Sun, 13 Oct 2024 17:36:32 +0200
parents 2225c467f1e9
children
comparison
equal deleted inserted replaced
903:0f2e5a166d40 904:5736b2641cb0
1855 if(tickPressureDiff != 0) 1855 if(tickPressureDiff != 0)
1856 { 1856 {
1857 if(lastPressure_bar >= 0) 1857 if(lastPressure_bar >= 0)
1858 { 1858 {
1859 localAscentRate = (lastPressure_bar - global.lifeData.pressure_ambient_bar) * (60000.0 / tickPressureDiff) * 10; /* bar * 10 = meter */ 1859 localAscentRate = (lastPressure_bar - global.lifeData.pressure_ambient_bar) * (60000.0 / tickPressureDiff) * 10; /* bar * 10 = meter */
1860 if(fabs(localAscentRate) < 1.0) 1860 if((fabs(localAscentRate) < 1.0) || (global.lifeData.pressure_ambient_bar < START_DIVE_IMMEDIATLY_BAR))
1861 { 1861 {
1862 ascentState = ASCENT_NONE; 1862 ascentState = ASCENT_NONE;
1863 ascentStableCnt = 0; 1863 ascentStableCnt = 0;
1864 } 1864 }
1865 else if(localAscentRate > 0.0) 1865 else if(localAscentRate > 0.0)