Don't do computationally expensive Boyle compensation when not using VPM-B

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Robert C. Helling 2015-08-21 17:22:07 +02:00 committed by Dirk Hohndel
parent d9b4f2b7e3
commit 652f7e9864

3
deco.c
View file

@ -362,6 +362,9 @@ void boyles_law(double next_stop_pressure)
{
int ci;
if (!in_planner() || prefs.deco_mode != VPMB)
return;
// This should be a tautology but prevents a numerical instability.
if (IS_FP_SAME(next_stop_pressure, first_stop_pressure))
return;