summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-01-07 08:51:26 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-01-07 08:51:26 -0800
commit989cf37fcf0453b72f3d542f202cf532bf1532db (patch)
tree727a8e1e0d9287b5f1024d66da3c967b5254e5d9
parent1b0ddfbbe218e25001512a18e5cc9224aabf8698 (diff)
downloadsubsurface-989cf37fcf0453b72f3d542f202cf532bf1532db.tar.gz
Remove the now obsolete hard coded test_plan
This was just a crutch to get something out there for people to play with. With the ability to input a plan in place this is now obsolete. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--dive.h1
-rw-r--r--gtk-gui.c7
-rw-r--r--planner.c18
3 files changed, 0 insertions, 26 deletions
diff --git a/dive.h b/dive.h
index 43010ffaf..45f070971 100644
--- a/dive.h
+++ b/dive.h
@@ -594,7 +594,6 @@ struct diveplan {
struct divedatapoint *dp;
};
-extern void test_planner(void);
void plan(struct diveplan *diveplan, char **cache_datap, struct dive **divep);
void plan_add_segment(struct diveplan *diveplan, int duration, int depth, int o2, int he);
void add_duration_to_nth_dp(struct diveplan *diveplan, int idx, int duration, gboolean is_rel);
diff --git a/gtk-gui.c b/gtk-gui.c
index 6c39d25fe..d1ddc97cf 100644
--- a/gtk-gui.c
+++ b/gtk-gui.c
@@ -1125,11 +1125,6 @@ static void next_dc(GtkWidget *w, gpointer data)
repaint_dive();
}
-static void test_planner_cb(GtkWidget *w, gpointer data)
-{
- test_planner();
-}
-
/*
* Get a value in tenths (so "10.2" == 102, "9" = 90)
*
@@ -1611,7 +1606,6 @@ static GtkActionEntry menu_items[] = {
{ "ViewThree", NULL, N_("Three"), CTRLCHAR "4", NULL, G_CALLBACK(view_three) },
{ "PrevDC", NULL, N_("Prev DC"), NULL, NULL, G_CALLBACK(prev_dc) },
{ "NextDC", NULL, N_("Next DC"), NULL, NULL, G_CALLBACK(next_dc) },
- { "TestPlan", NULL, N_("Test Planner"), NULL, NULL, G_CALLBACK(test_planner_cb) },
{ "InputPlan", NULL, N_("Input Plan"), NULL, NULL, G_CALLBACK(input_plan) },
};
static gint nmenu_items = sizeof (menu_items) / sizeof (menu_items[0]);
@@ -1662,7 +1656,6 @@ static const gchar* ui_string = " \
<menuitem name=\"SelectEvents\" action=\"SelectEvents\" /> \
</menu> \
<menu name=\"PlannerMenu\" action=\"PlannerMenuAction\"> \
- <menuitem name=\"TestPlan\" action=\"TestPlan\" /> \
<menuitem name=\"InputPlan\" action=\"InputPlan\" /> \
</menu> \
<menu name=\"Help\" action=\"HelpMenuAction\"> \
diff --git a/planner.c b/planner.c
index ce7b67279..e437cce4f 100644
--- a/planner.c
+++ b/planner.c
@@ -285,21 +285,3 @@ void plan(struct diveplan *diveplan, char **cached_datap, struct dive **divep)
report_dives(FALSE, FALSE);
select_last_dive();
}
-
-void test_planner()
-{
- struct dive *dive = NULL;
- struct diveplan diveplan = {};
- char *cache_data;
- int end_of_last_dive = dive_table.dives[dive_table.nr - 1]->when + dive_table.dives[dive_table.nr -1]->duration.seconds;
- diveplan.when = end_of_last_dive + 50 * 3600; /* don't take previous dives into account for deco calculation */
- diveplan.surface_pressure = 1013;
- plan_add_segment(&diveplan, 120, 36000, 209, 0);
- plan_add_segment(&diveplan, 1800, 36000, 209, 0);
- plan_add_segment(&diveplan, 59, 27000, 209, 0);
- plan_add_segment(&diveplan, 1, 27000, 400, 0);
-
- plan(&diveplan, &cache_data, &dive);
- /* we are not rerunning the plan, so free the cache right away */
- free(cache_data);
-}