summaryrefslogtreecommitdiffstats
path: root/planner.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-02-12 22:28:31 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-02-12 22:28:31 -0800
commit5a540fb9d1200206328593a7813e97db6e8042d7 (patch)
tree13d58bf6a5ae8668a91519df24de829998d96911 /planner.c
parent883acc68d13d26b95296b2abc35d1d5d33728326 (diff)
downloadsubsurface-5a540fb9d1200206328593a7813e97db6e8042d7.tar.gz
Remove rounded O2 in air
To quote Linus, gentle as always: Stuff like this is just BS. Don't do it. You already fixed the bug with matching gas change events, so adding this idiotic workaround no longer fixes anything, and its confusing and actively misleading. It's not even percent. It's still permille, just rounded. So it's a nonsensical number and a misleading name. Just delete it as the abortion it is. It is only going to cause more problems later. Just use the correct value. Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'planner.c')
-rw-r--r--planner.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/planner.c b/planner.c
index 244fece53..6ae83333c 100644
--- a/planner.c
+++ b/planner.c
@@ -12,12 +12,6 @@
#include "divelist.h"
#include "display-gtk.h"
-/* while we normally track gases with permille precision, in the planner
- * we want to treat gases as identical based on percent granularity.
- * The reason for this is that the gaschange event only deals with
- * percent (this is inherited from libdivecomputer). */
-#define O2_IN_AIR_PERCENT 210
-
int decostoplevels[] = { 0, 3000, 6000, 9000, 12000, 15000, 18000, 21000, 24000, 27000,
30000, 33000, 36000, 39000, 42000, 45000, 48000, 51000, 54000, 57000,
60000, 63000, 66000, 69000, 72000, 75000, 78000, 81000, 84000, 87000,
@@ -191,7 +185,7 @@ struct dive *create_dive_from_plan(struct diveplan *diveplan)
struct divedatapoint *dp;
struct divecomputer *dc;
struct sample *sample;
- int oldo2 = O2_IN_AIR_PERCENT, oldhe = 0;
+ int oldo2 = O2_IN_AIR, oldhe = 0;
int oldpo2 = 0;
int lasttime = 0;
@@ -751,7 +745,7 @@ static int validate_gas(const char *text, int *o2_p, int *he_p)
return 0;
if (!strcasecmp(text, _("air"))) {
- o2 = O2_IN_AIR_PERCENT; he = 0; text += strlen(_("air"));
+ o2 = O2_IN_AIR; he = 0; text += strlen(_("air"));
} else if (!strncasecmp(text, _("ean"), 3)) {
o2 = get_permille(text+3, &text); he = 0;
} else {